public:
- SGFile();
+ SGFile( const string& file );
~SGFile();
// open the file based on specified direction
- bool open( SGProtocolDir dir );
+ bool open( const SGProtocolDir dir );
// read a block of data of specified size
int read( char *buf, int length );
int readline( char *buf, int length );
// write data to a file
- int write( char *buf, int length );
+ int write( const char *buf, const int length );
// write null terminated string to a file
- int writestring( char *str );
+ int writestring( const char *str );
// close file
bool close();
inline string get_file_name() const { return file_name; }
- inline void set_file_name( const string& fn ) { file_name = fn; }
};