PIIODevice fullPathPrefix returns PIConstChars

This commit is contained in:
2022-05-04 16:33:05 +03:00
parent 28ce6e8f3f
commit 6995c25613
4 changed files with 36 additions and 16 deletions

View File

@@ -54,8 +54,8 @@ typedef bool (*ReadRetFunc)(void * , uchar * , int );
PIOBJECT_SUBCLASS(name, PIIODevice) \
PIIODevice * copy() const {return new name();} \
public: \
virtual const char * fullPathPrefix() const {return prefix;} \
static const char * fullPathPrefixS() {return prefix;} \
virtual PIConstChars fullPathPrefix() const {return prefix;} \
static PIConstChars fullPathPrefixS() {return prefix;} \
private:
@@ -244,9 +244,9 @@ public:
//! Returns full unambiguous string prefix. \ref PIIODevice_sec7
virtual const char * fullPathPrefix() const {return "";}
virtual PIConstChars fullPathPrefix() const {return "";}
static const char * fullPathPrefixS() {return "";}
static PIConstChars fullPathPrefixS() {return "";}
//! Returns full unambiguous string, describes this device, \a fullPathPrefix() + "://"
PIString constructFullPath() const;
@@ -280,7 +280,7 @@ public:
//! Returns class names of all registered devices
static PIStringList availableClasses();
static void registerDevice(const char * prefix, const char * classname, PIIODevice*(*fabric)());
static void registerDevice(PIConstChars prefix, PIConstChars classname, PIIODevice*(*fabric)());
EVENT_HANDLER(bool, open);