PIIODevice registration dramatically optimization

This commit is contained in:
2022-04-30 11:21:57 +03:00
parent 19e4eee222
commit 2bbdbc3ac9
29 changed files with 138 additions and 78 deletions

View File

@@ -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)