PIIODevice registration dramatically optimization
This commit is contained in:
@@ -3,7 +3,7 @@ void _() {
|
||||
|
||||
//! [0]
|
||||
class SomeIO: public PIIODevice {
|
||||
PIIODEVICE(SomeIO)
|
||||
PIIODEVICE(SomeIO, "myio")
|
||||
public:
|
||||
SomeIO(): PIIODevice() {}
|
||||
protected:
|
||||
@@ -19,9 +19,8 @@ protected:
|
||||
// write to your device here
|
||||
return written_bytes;
|
||||
}
|
||||
PIString fullPathPrefix() const {return "myio";}
|
||||
void configureFromFullPath(const PIString & full_path) {
|
||||
// parse full_path and configure device there
|
||||
// parse full_path and configure device here
|
||||
}
|
||||
};
|
||||
REGISTER_DEVICE(SomeIO)
|
||||
|
||||
Reference in New Issue
Block a user