Tweaking api.
This commit is contained in:
@@ -36,8 +36,9 @@
|
||||
FG_USING_STD(string);
|
||||
|
||||
|
||||
SGFile::SGFile() {
|
||||
SGFile::SGFile( const string &file) {
|
||||
set_type( sgFileType );
|
||||
file_name = file;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class SGFile : public SGIOChannel {
|
||||
|
||||
public:
|
||||
|
||||
SGFile();
|
||||
SGFile( const string& file );
|
||||
~SGFile();
|
||||
|
||||
// open the file based on specified direction
|
||||
@@ -74,7 +74,6 @@ public:
|
||||
bool close();
|
||||
|
||||
inline string get_file_name() const { return file_name; }
|
||||
inline void set_file_name( const string& fn ) { file_name = fn; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -33,10 +33,12 @@
|
||||
FG_USING_STD(string);
|
||||
|
||||
|
||||
SGSerial::SGSerial() :
|
||||
SGSerial::SGSerial( const string& device_name, const string& baud_rate ) :
|
||||
save_len(0)
|
||||
{
|
||||
set_type( sgSerialType );
|
||||
device = device_name;
|
||||
baud = baud_rate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class SGSerial : public SGIOChannel {
|
||||
|
||||
public:
|
||||
|
||||
SGSerial();
|
||||
SGSerial( const string& device_name, const string& baud_rate );
|
||||
~SGSerial();
|
||||
|
||||
// open the serial port based on specified direction
|
||||
@@ -79,9 +79,7 @@ public:
|
||||
bool close();
|
||||
|
||||
inline string get_device() const { return device; }
|
||||
inline void set_device( const string& d ) { device = d; }
|
||||
inline string get_baud() const { return baud; }
|
||||
inline void set_baud( const string& b ) { baud = b; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user