diff --git a/doc/html/annotated.html b/doc/html/annotated.html new file mode 100644 index 00000000..185aab61 --- /dev/null +++ b/doc/html/annotated.html @@ -0,0 +1,168 @@ + + +
+ + + +|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| CPIBinaryLog | Class for read and write binary data to logfile, and playback this data in realtime |
| ▼CPIByteArray | Byte array |
| CRawData | Help struct to store/restore custom blocks of data to/from PIByteArray |
| CPIChar | Unicode char |
| CPICLI | Command-line arguments parser |
| CPICollection | Interface to discover element groups |
| ▼CPIConfig | Configuration file |
| CBranch | Branch is a list of entries of configuration file |
| CEntry | Entry of configuration file |
| CPIConnection | Complex Input/Output point |
| CPIConsole | Console output class |
| CPICout | Class for formatted output similar std::cout |
| CPIDiagnostics | Connection quality diagnostics |
| ▼CPIEthernet | Ethernet device |
| CInterface | Network interface descriptor |
| CInterfaceList | Array of Interface with some features |
| CPIEvaluator | This class provide mathematical evaluations of custom expression |
| CPIFile | Local file |
| CPIFlags | This class used as container for bit flags |
| CPIIODevice | Base class for input/output classes |
| CPIKbdListener | Keyboard console input listener |
| CPIMutex | Mutex |
| CPIObject | This is base class for any classes which use events -> handlers mechanism |
| CPIPacketExtractor | Packets extractor |
| CPIProcess | |
| CPIProtocol | |
| CPISerial | Serial device |
| CPISet | Set of any type |
| ▼CPIStateMachine | Base class for custom state machine |
| CRule | Rule of transition between states of machine |
| CState | State of machine |
| CPIString | String class |
| CPIStringList | Strings array class |
| CPISystemTime | System time |
| CPIThread | Thread class |
| CPITimeMeasurer | Time measurements |
| CPITimer | Timer |
| CPIVariant | Variant type |
| CPIVector | Dynamic array of any type |
| CTransferFunction | Differential evaluations |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIBinaryLog, including all inherited members.
+| className() const | PIObject | inlinevirtual |
| closeDevice() | PIBinaryLog | protectedvirtual |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIBinaryLog | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| fullPathPrefix() const | PIBinaryLog | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| init() | PIIODevice | inlineprotectedvirtual |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| openDevice() | PIBinaryLog | protectedvirtual |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT | PIObject | related |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| REGISTER_DEVICE | PIIODevice | related |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| threadedRead(uchar *readed, int size) | PIBinaryLog | protectedvirtual |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Class for read and write binary data to logfile, and playback this data in realtime. + More...
+
Inheritance diagram for PIBinaryLog:+Protected Member Functions | |
| +PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| +void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| +bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable. | |
| +bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| +bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
Protected Member Functions inherited from PIIODevice | |
| +virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Class for read and write binary data to logfile, and playback this data in realtime.
+Binary Log is a file with simle header, where you can read and write some binary data. Any written data include special header with ID, size and timestamp. This header provides separation different messages from the one file by choosing different IDs. With filterID or special functions, like readBinLog() you can choose IDs what you want to read. With function writeBinLog() or setDefaultID() you can choose ID that mark you data. By default ID = 1, and filterID is empty, that mean you read any ID without filtering. ThreadedRead provide you playback data, with delay that you write data. You can choose realtime playbak or variable speed play back by set PlayMode.
+This class provide all functions of PIIODevice, such open(), close(), read() ,write(), and threaded read/write. function setLogDir() need to set directory for BinLog files function createNewFile() need to create new binlog file function restart() need start from the begining of binlog file
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIByteArray, including all inherited members.
+| append(const void *data_, int size_) | PIByteArray | inline |
| append(const PIByteArray &data_) | PIByteArray | inline |
| checksumPlain32() const | PIByteArray | |
| checksumPlain8() const | PIByteArray | |
| convertFromBase64() | PIByteArray | |
| convertToBase64() | PIByteArray | |
| fromBase64() const | PIByteArray | inline |
| operator!=(PIByteArray &f, PIByteArray &s) | PIByteArray | related |
| operator<<(std::ostream &s, const PIByteArray &ba) | PIByteArray | related |
| operator<<(PICout s, const PIByteArray &ba) | PIByteArray | related |
| operator<<(PIByteArray &s, uchar v) | PIByteArray | related |
| operator<<(PIByteArray &s, const short v) | PIByteArray | related |
| operator<<(PIByteArray &s, const int v) | PIByteArray | related |
| operator<<(PIByteArray &s, const long &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const llong &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ushort v) | PIByteArray | related |
| operator<<(PIByteArray &s, const uint v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ulong &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const ullong &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const float v) | PIByteArray | related |
| operator<<(PIByteArray &s, const double &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIByteArray &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIByteArray::RawData &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIPair< Type0, Type1 > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIVector< T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIList< T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIDeque< T > &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIString &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PIStringList &v) | PIByteArray | related |
| operator<<(PICout s, const PISystemTime &v) | PIByteArray | related |
| operator<<(PIByteArray &s, const PISystemTime &v) | PIByteArray | related |
| operator==(PIByteArray &f, PIByteArray &s) | PIByteArray | related |
| operator>>(PIByteArray &s, uchar &v) | PIByteArray | related |
| operator>>(PIByteArray &s, short &v) | PIByteArray | related |
| operator>>(PIByteArray &s, int &v) | PIByteArray | related |
| operator>>(PIByteArray &s, long &v) | PIByteArray | related |
| operator>>(PIByteArray &s, llong &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ushort &v) | PIByteArray | related |
| operator>>(PIByteArray &s, uint &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ulong &v) | PIByteArray | related |
| operator>>(PIByteArray &s, ullong &v) | PIByteArray | related |
| operator>>(PIByteArray &s, float &v) | PIByteArray | related |
| operator>>(PIByteArray &s, double &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIByteArray &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIByteArray::RawData v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIPair< Type0, Type1 > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIVector< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIList< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIDeque< T > &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIString &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PIStringList &v) | PIByteArray | related |
| operator>>(PIByteArray &s, PISystemTime &v) | PIByteArray | related |
| PIByteArray() | PIByteArray | inline |
| PIByteArray(const uint size) | PIByteArray | inline |
| PIByteArray(const void *data, const uint size) | PIByteArray | inline |
| resized(int new_size) const | PIByteArray | inline |
| toBase64() const | PIByteArray | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Byte array. + More...
+ +Inherits PIDeque< T >.
++Classes | |
| struct | RawData |
| Help struct to store/restore custom blocks of data to/from PIByteArray. More... | |
+Public Member Functions | |
| + | PIByteArray () |
| Constructs an empty byte array. | |
| + | PIByteArray (const uint size) |
| Constructs 0-filled byte array with size "size". | |
| + | PIByteArray (const void *data, const uint size) |
| Constructs byte array from data "data" and size "size". | |
| +PIByteArray | resized (int new_size) const |
| Return resized byte array. | |
| +PIByteArray & | convertToBase64 () |
| Convert data to Base 64 and return this byte array. | |
| +PIByteArray & | convertFromBase64 () |
| Convert data from Base 64 and return this byte array. | |
| +PIByteArray | toBase64 () const |
| Return converted to Base 64 data. | |
| +PIByteArray | fromBase64 () const |
| Return converted from Base 64 data. | |
| +PIByteArray & | append (const void *data_, int size_) |
| Add to the end data "data" with size "size". | |
| +PIByteArray & | append (const PIByteArray &data_) |
| Add to the end byte array "data". | |
| +uchar | checksumPlain8 () const |
| Returns plain 8-bit checksum. | |
| +uint | checksumPlain32 () const |
| Returns plain 32-bit checksum. | |
+Related Functions | |
(Note that these are not member functions.) + | |
| +std::ostream & | operator<< (std::ostream &s, const PIByteArray &ba) |
| Output to std::ostream operator. | |
| +PICout | operator<< (PICout s, const PIByteArray &ba) |
| Output to PICout operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, uchar v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const short v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const int v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const long &v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const llong &v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const ushort v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const uint v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const ulong &v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const ullong &v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const float v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const double &v) |
| Store operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const PIByteArray &v) |
| Store operator, see Attention for details. | |
| +PIByteArray & | operator<< (PIByteArray &s, const PIByteArray::RawData &v) |
| Store operator, see Attention for details. | |
| +template<typename Type0 , typename Type1 > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIPair< Type0, Type1 > &v) |
| Store operator. | |
| +template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIVector< T > &v) |
| Store operator. | |
| +template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIList< T > &v) |
| Store operator. | |
| +template<typename T > | |
| PIByteArray & | operator<< (PIByteArray &s, const PIDeque< T > &v) |
| Store operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, uchar &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, short &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, int &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, long &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, llong &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, ushort &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, uint &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, ulong &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, ullong &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, float &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, double &v) |
| Restore operator. | |
| +PIByteArray & | operator>> (PIByteArray &s, PIByteArray &v) |
| Restore operator, see Attention for details. | |
| +PIByteArray & | operator>> (PIByteArray &s, PIByteArray::RawData v) |
| Restore operator, see Attention for details. | |
| +template<typename Type0 , typename Type1 > | |
| PIByteArray & | operator>> (PIByteArray &s, PIPair< Type0, Type1 > &v) |
| Restore operator. | |
| +template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIVector< T > &v) |
| Restore operator. | |
| +template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIList< T > &v) |
| Restore operator. | |
| +template<typename T > | |
| PIByteArray & | operator>> (PIByteArray &s, PIDeque< T > &v) |
| Restore operator. | |
| +bool | operator== (PIByteArray &f, PIByteArray &s) |
| Byte arrays compare operator. | |
| +bool | operator!= (PIByteArray &f, PIByteArray &s) |
| Byte arrays compare operator. | |
| +PIByteArray & | operator<< (PIByteArray &s, const PIString &v) |
| Output operator to PIByteArray. | |
| +PIByteArray & | operator>> (PIByteArray &s, PIString &v) |
| Input operator from PIByteArray. | |
| +PIByteArray & | operator<< (PIByteArray &s, const PIStringList &v) |
| Output operator to PIByteArray. | |
| +PIByteArray & | operator>> (PIByteArray &s, PIStringList &v) |
| Input operator from PIByteArray. | |
| +PICout | operator<< (PICout s, const PISystemTime &v) |
| Output operator to PICout. | |
| +PIByteArray & | operator<< (PIByteArray &s, const PISystemTime &v) |
| Output operator to PIByteArray. | |
| +PIByteArray & | operator>> (PIByteArray &s, PISystemTime &v) |
| Input operator from PIByteArray. | |
Byte array.
+This class based on PIDeque<uchar> and provide some handle function to manipulate it.
+PIByteArray can be used to store custom data and manipulate it. There are many stream operators to store/restore common types to byte array. Store operators places data at the end of array, restore operators takes data from the beginning of array. In addition there are Base 64 convertions and checksums:
One of the major usage of PIByteArray is stream functions. You can form binary packet from many types (also dynamic types, e.g. PIVector) with one line:
Or you can descibe stream operator of your own type and store/restore vectors of your type:
For store/restore custom data blocks there is PIByteArray::RawData class. Stream operators of this class simply store/restore data block to/from byte array.
Stream operator of PIByteArray store byte array as vector, not simply append content of byte array. This operators useful to transmit custom data as PIByteArray packed into parent byte array, e.g. to form packet from PIByteArray. To append one byte array to another use funtion append().
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PICLI, including all inherited members.
+| addArgument(const PIString &name, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const PIChar &shortKey, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const char *shortKey, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const PIChar &shortKey, const PIString &fullKey, bool value=false) | PICLI | inline |
| addArgument(const PIString &name, const char *shortKey, const PIString &fullKey, bool value=false) | PICLI | inline |
| className() const | PIObject | inlinevirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| name() const | PIObject | inline |
| PICLI(int argc, char *argv[]) | PICLI | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| programCommand() | PICLI | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| rawArgument(int index) | PICLI | inline |
| rawArguments() | PICLI | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| superClassName() const | PIObject | inlinevirtual |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Command-line arguments parser. + More...
+
Inheritance diagram for PICLI:+Public Member Functions | |
| + | PICLI (int argc, char *argv[]) |
| Constructor. | |
| +void | addArgument (const PIString &name, bool value=false) |
| Add argument with name "name", short key = name first letter, full key = name. | |
| +void | addArgument (const PIString &name, const PIChar &shortKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = name. | |
| +void | addArgument (const PIString &name, const char *shortKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = name. | |
| +void | addArgument (const PIString &name, const PIChar &shortKey, const PIString &fullKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = "fullKey". | |
| +void | addArgument (const PIString &name, const char *shortKey, const PIString &fullKey, bool value=false) |
| Add argument with name "name", short key = "shortKey", full key = "fullKey". | |
| +PIString | rawArgument (int index) |
| Returns unparsed command-line argument by index "index". Index 0 is program execute command. | |
| +const PIStringList & | rawArguments () |
| Returns unparsed command-line arguments. | |
| +PIString | programCommand () |
| Returns program execute command without arguments. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Command-line arguments parser.
+This class provide handy parsing of command-line arguments. First you should add arguments to PICLI with function addArgument(). Then you can check if there is some argument in application command-line with function hasArgument();
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIChar, including all inherited members.
+| isAlpha() const | PIChar | inline |
| isAscii() const | PIChar | inline |
| isControl() const | PIChar | inline |
| isDigit() const | PIChar | inline |
| isGraphical() const | PIChar | inline |
| isHex() const | PIChar | inline |
| isLower() const | PIChar | inline |
| isPrint() const | PIChar | inline |
| isSpace() const | PIChar | inline |
| isUpper() const | PIChar | inline |
| operator!=(const PIChar &o) const | PIChar | inline |
| operator<(const PIChar &o) const | PIChar | inline |
| operator<<(PIByteArray &s, const PIChar &v) | PIChar | friend |
| operator<=(const PIChar &o) const | PIChar | inline |
| operator=(const char v) | PIChar | inline |
| operator==(const PIChar &o) const | PIChar | inline |
| operator>(const PIChar &o) const | PIChar | inline |
| operator>=(const PIChar &o) const | PIChar | inline |
| operator>>(PIByteArray &s, PIChar &v) | PIChar | friend |
| PIChar(const char c) | PIChar | inline |
| PIChar(const short c) | PIChar | inline |
| PIChar(const int c) | PIChar | inline |
| PIChar(const uchar c) | PIChar | inline |
| PIChar(const ushort c) | PIChar | inline |
| PIChar(const uint c=0) | PIChar | inline |
| PIChar(const char *c) | PIChar | inline |
| toCharPtr() const | PIChar | inline |
| toLower() const | PIChar | inline |
| toUpper() const | PIChar | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Unicode char. + More...
++Public Member Functions | |
| + | PIChar (const char c) |
| Contructs ascii symbol. | |
| + | PIChar (const short c) |
| Contructs 2-bytes symbol. | |
| + | PIChar (const int c) |
| Contructs 4-bytes symbol. | |
| + | PIChar (const uchar c) |
| Contructs ascii symbol. | |
| + | PIChar (const ushort c) |
| Contructs 2-bytes symbol. | |
| + | PIChar (const uint c=0) |
| Default constructor. Contructs 4-bytes symbol. | |
| + | PIChar (const char *c) |
| Contructs symbol from no more than 4 bytes of string. | |
| +PIChar & | operator= (const char v) |
| Copy operator. | |
| +bool | operator== (const PIChar &o) const |
| Compare operator. | |
| +bool | operator!= (const PIChar &o) const |
| Compare operator. | |
| +bool | operator> (const PIChar &o) const |
| Compare operator. | |
| +bool | operator< (const PIChar &o) const |
| Compare operator. | |
| +bool | operator>= (const PIChar &o) const |
| Compare operator. | |
| +bool | operator<= (const PIChar &o) const |
| Compare operator. | |
| +bool | isDigit () const |
| Return true if symbol is digit ('0' to '9') | |
| +bool | isHex () const |
| Return true if symbol is HEX digit ('0' to '9', 'a' to 'f', 'A' to 'F') | |
| +bool | isGraphical () const |
| Return true if symbol is drawable (without space) | |
| +bool | isControl () const |
| Return true if symbol is control byte (< 32 or 127) | |
| +bool | isLower () const |
| Return true if symbol is in lower case. | |
| +bool | isUpper () const |
| Return true if symbol is in upper case. | |
| +bool | isPrint () const |
| Return true if symbol is printable (with space) | |
| +bool | isSpace () const |
| Return true if symbol is space or tab. | |
| +bool | isAlpha () const |
| Return true if symbol is alphabetical letter. | |
| +bool | isAscii () const |
| Return true if symbol is ascii (< 128) | |
| +const char * | toCharPtr () const |
Return as "char * " string. | |
| +PIChar | toUpper () const |
| Return symbol in upper case. | |
| +PIChar | toLower () const |
| Return symbol in lower case. | |
+Friends | |
| +PIByteArray & | operator<< (PIByteArray &s, const PIChar &v) |
Write operator to PIByteArray. | |
| +PIByteArray & | operator>> (PIByteArray &s, PIChar &v) |
Read operator from PIByteArray. | |
Unicode char.
+This class is wrapper around "uint". There are many contructors and information functions
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PICollection, including all inherited members.
+| ADD_NEW_TO_COLLECTION | PICollection | related |
| ADD_TO_COLLECTION | PICollection | related |
| groupElements(const PIString &group) | PICollection | static |
| groups() | PICollection | static |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Interface to discover element groups. + More...
++Static Public Member Functions | |
| +static PIStringList | groups () |
| Returns all existing groups by their names. | |
| +static PIVector< const PIObject * > | groupElements (const PIString &group) |
| Returns all elements of group "group". | |
+Related Functions | |
(Note that these are not member functions.) + | |
| #define | ADD_TO_COLLECTION(group, object) |
| Add existing element "object" in group with name "group". More... | |
| #define | ADD_NEW_TO_COLLECTION(group, class) |
| Add new element of class "class" in group with name "group". More... | |
Interface to discover element groups.
+This class has only static functions so no need to create instance of the PICollection. This class provide macros to add some classes or existing objects to global collection and access to them from any place of the code.
+
|
+ +related | +
Add existing element "object" in group with name "group".
+If there is no group with name "group" it will be created. Only one element of the class "object" can be in group "group". If this is already exists nothing be happens.
+ "object" should to be pointer to object based on PIObject.
+
|
+ +related | +
Add new element of class "class" in group with name "group".
+If there is no group with name "group" it will be created. Only one element of the class "class" can be in group "group". If this is already exists nothing be happens.
+ "class" should to be name of the any class based on PIObject.
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIConfig, including all inherited members.
+| allLeaves() | PIConfig | inline |
| allTree() | PIConfig | inline |
| className() const | PIObject | inlinevirtual |
| clear() | PIConfig | inline |
| closeDevice() | PIFile | protectedvirtual |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIFile | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| delimiter() const | PIConfig | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| entriesCount() const | PIConfig | inline |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| fullPathPrefix() const | PIFile | inlineprotectedvirtual |
| getValue(const PIString &vname, const PIString &def=PIString(), bool *exists=0) | PIConfig | |
| getValue(const PIString &vname, const char *def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const PIStringList &def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const bool def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const short def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const int def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const long def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const uchar def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const ushort def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const uint def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const ulong def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const float def, bool *exists=0) | PIConfig | inline |
| getValue(const PIString &vname, const double def, bool *exists=0) | PIConfig | inline |
| getValues(const PIString &vname) | PIConfig | |
| HANDLER | PIObject | related |
| init() | PIIODevice | inlineprotectedvirtual |
| isEntryExists(const PIString &name) const | PIConfig | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| openDevice() | PIFile | protectedvirtual |
| PIConfig(const PIString &path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) | PIConfig | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| readAll() | PIConfig | |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| REGISTER_DEVICE | PIIODevice | related |
| rootEntry() | PIConfig | inline |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setDelimiter(const PIString &d) | PIConfig | inline |
| PIFile::setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setValue(const PIString &name, const PIString &value, const PIString &type="s", bool write=true) | PIConfig | |
| setValue(const PIString &name, const PIStringList &value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const char *value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const bool value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const short value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const int value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const long value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const uchar value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const ushort value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const uint value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const ulong value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const float value, bool write=true) | PIConfig | inline |
| setValue(const PIString &name, const double value, bool write=true) | PIConfig | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| threadedRead(uchar *readed, int size) | PIIODevice | inlineprotectedvirtual |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| writeAll() | PIConfig |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Configuration file. + More...
+
Inheritance diagram for PIConfig:+Classes | |
| class | Branch |
| Branch is a list of entries of configuration file More... | |
| class | Entry |
| Entry of configuration file More... | |
+Public Member Functions | |
| + | PIConfig (const PIString &path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite) |
| Contructs and read configuration file at path "path" in mode "mode". | |
| +Entry & | getValue (const PIString &vname, const PIString &def=PIString(), bool *exists=0) |
| Returns top-level entry with name "vname", if doesn`t exists return entry with value "def" and set *exist to false. | |
| +Entry & | getValue (const PIString &vname, const char *def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const PIStringList &def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const bool def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const short def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const int def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const long def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const uchar def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const ushort def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const uint def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const ulong def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const float def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const double def, bool *exists=0) |
| Returns top-level entry with name "vname" and default value "def". | |
| +Branch | getValues (const PIString &vname) |
| Returns top-level entries with names with substrings "vname". | |
| +void | setValue (const PIString &name, const PIString &value, const PIString &type="s", bool write=true) |
| Set top-level entry with name "name" value to "value", type to "type" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const PIStringList &value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "l" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const char *value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "s" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const bool value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "b" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const short value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const int value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const long value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const uchar value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const ushort value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const uint value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const ulong value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "n" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const float value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "f" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +void | setValue (const PIString &name, const double value, bool write=true) |
| Set top-level entry with name "name" value to "value", type to "f" and if "write" immediate write to file. Add new entry if there is no suitable exists. | |
| +Entry & | rootEntry () |
| Returns root entry. | |
| +int | entriesCount () const |
| Returns top-level entries count. | |
| +bool | isEntryExists (const PIString &name) const |
| Returns if top-level entry with name "name" exists. | |
| +Branch | allTree () |
| Returns all top-level entries. | |
| +Branch | allLeaves () |
| Returns all entries without children. | |
| +void | clear () |
| Remove all tree and file content. | |
| +void | readAll () |
| Parse file and build internal tree. | |
| +void | writeAll () |
| Write all internal tree to file. | |
| +const PIString & | delimiter () const |
| Returns current tree delimiter, default ".". | |
| +void | setDelimiter (const PIString &d) |
| Set current tree delimiter. | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIFile | |
| +PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| +void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| +bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable. | |
| +bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
Protected Member Functions inherited from PIIODevice | |
| +virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| +virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Configuration file.
+This class provide handle access to configuration file.
+PIConfig reads configuration file and create internal dendritic representation of all entries of this file. You can easily read some values and write new.
PIConfig supports also INI-style files with sections "[section]". In this case line with section name interpret as prefix to the next lines. For example, these configs are equal:
Each node of internal tree has type PIConfig::Entry. PIConfig has one root element rootEntry(). Any entry of configuration file is a child of this element.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIConfig::Branch, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Branch is a list of entries of configuration file + More...
+
Inheritance diagram for PIConfig::Branch:Branch is a list of entries of configuration file
+Branch provides some features to get entries lists.
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIConfig::Entry, including all inherited members.
+| child(const int index) const | PIConfig::Entry | inline |
| childCount() const | PIConfig::Entry | inline |
| children() const | PIConfig::Entry | inline |
| comment() const | PIConfig::Entry | inline |
| findChild(const PIString &name) | PIConfig::Entry | inline |
| findChild(const PIString &name) const | PIConfig::Entry | inline |
| fullName() const | PIConfig::Entry | inline |
| getValue(const PIString &vname, const PIString &def=PIString(), bool *exists=0) | PIConfig::Entry | |
| getValue(const PIString &vname, const char *def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const PIStringList &def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const bool def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const short def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const int def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const long def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const uchar def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const ushort def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const uint def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const ulong def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const float def, bool *exists=0) | PIConfig::Entry | inline |
| getValue(const PIString &vname, const double def, bool *exists=0) | PIConfig::Entry | inline |
| getValues(const PIString &vname) | PIConfig::Entry | |
| isEntryExists(const PIString &name) const | PIConfig::Entry | inline |
| isLeaf() const | PIConfig::Entry | inline |
| name() const | PIConfig::Entry | inline |
| operator bool() | PIConfig::Entry | inline |
| operator char() | PIConfig::Entry | inline |
| operator double() | PIConfig::Entry | inline |
| operator float() | PIConfig::Entry | inline |
| operator int() | PIConfig::Entry | inline |
| operator long() | PIConfig::Entry | inline |
| operator PIString() | PIConfig::Entry | inline |
| operator PIStringList() | PIConfig::Entry | inline |
| operator short() | PIConfig::Entry | inline |
| operator uchar() | PIConfig::Entry | inline |
| operator uint() | PIConfig::Entry | inline |
| operator ulong() | PIConfig::Entry | inline |
| operator ushort() | PIConfig::Entry | inline |
| parent() const | PIConfig::Entry | inline |
| setComment(const PIString &value) | PIConfig::Entry | inline |
| setName(const PIString &value) | PIConfig::Entry | inline |
| setType(const PIString &value) | PIConfig::Entry | inline |
| setValue(const PIString &value) | PIConfig::Entry | inline |
| setValue(const PIStringList &value) | PIConfig::Entry | inline |
| setValue(const char *value) | PIConfig::Entry | inline |
| setValue(const bool value) | PIConfig::Entry | inline |
| setValue(const char value) | PIConfig::Entry | inline |
| setValue(const short value) | PIConfig::Entry | inline |
| setValue(const int value) | PIConfig::Entry | inline |
| setValue(const long value) | PIConfig::Entry | inline |
| setValue(const uchar value) | PIConfig::Entry | inline |
| setValue(const ushort value) | PIConfig::Entry | inline |
| setValue(const uint value) | PIConfig::Entry | inline |
| setValue(const ulong value) | PIConfig::Entry | inline |
| setValue(const float value) | PIConfig::Entry | inline |
| setValue(const double value) | PIConfig::Entry | inline |
| type() const | PIConfig::Entry | inline |
| value() const | PIConfig::Entry | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Entry of configuration file + More...
++Public Member Functions | |
| +Entry * | parent () const |
| Returns parent entry, or 0 if there is no parent (root of default value) | |
| +int | childCount () const |
| Returns children count. | |
| +Branch & | children () const |
| Returns children as PIConfig::Branch. | |
| +Entry * | child (const int index) const |
| Returns child at index "index". | |
| +Entry * | findChild (const PIString &name) |
| Returns first child with name "name". | |
| +const Entry * | findChild (const PIString &name) const |
| Returns first child with name "name". | |
| +bool | isLeaf () const |
| Returns true if there is no children. | |
| +const PIString & | name () const |
| Returns name. | |
| +const PIString & | value () const |
| Returns value. | |
| +const PIString & | type () const |
| Returns type. | |
| +const PIString & | comment () const |
| Returns comment. | |
| const PIString & | fullName () const |
| Returns full name, i.e. name as it looks in file. More... | |
| +Entry & | setName (const PIString &value) |
| Set name to "value" and returns this. | |
| +Entry & | setType (const PIString &value) |
| Set type to "value" and returns this. | |
| +Entry & | setComment (const PIString &value) |
| Set comment to "value" and returns this. | |
| +Entry & | setValue (const PIString &value) |
| Set value to "value" and returns this. | |
| +Entry & | setValue (const PIStringList &value) |
| Set value to "value" and returns this. Type is set to "l". | |
| +Entry & | setValue (const char *value) |
| Set value to "value" and returns this. Type is set to "s". | |
| +Entry & | setValue (const bool value) |
| Set value to "value" and returns this. Type is set to "b". | |
| +Entry & | setValue (const char value) |
| Set value to "value" and returns this. Type is set to "s". | |
| +Entry & | setValue (const short value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const int value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const long value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const uchar value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const ushort value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const uint value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const ulong value) |
| Set value to "value" and returns this. Type is set to "n". | |
| +Entry & | setValue (const float value) |
| Set value to "value" and returns this. Type is set to "f". | |
| +Entry & | setValue (const double value) |
| Set value to "value" and returns this. Type is set to "f". | |
| Entry & | getValue (const PIString &vname, const PIString &def=PIString(), bool *exists=0) |
| Returns entry with name "vname" and default value "def". More... | |
| +Entry & | getValue (const PIString &vname, const char *def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const PIStringList &def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const bool def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const short def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const int def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const long def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const uchar def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const ushort def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const uint def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const ulong def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const float def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Entry & | getValue (const PIString &vname, const double def, bool *exists=0) |
| Returns entry with name "vname" and default value "def". | |
| +Branch | getValues (const PIString &vname) |
| Find all entries with names with substrings "vname" and returns them as PIConfig::Branch. | |
| +bool | isEntryExists (const PIString &name) const |
| If there is no children returns if name == "name". Else returns if any child has name == "name". | |
| + | operator bool () |
| Convertion to boolean. | |
| + | operator char () |
| Convertion to char. | |
| + | operator short () |
| Convertion to short. | |
| + | operator int () |
| Convertion to int. | |
| + | operator long () |
| Convertion to long. | |
| + | operator uchar () |
| Convertion to uchar. | |
| + | operator ushort () |
| Convertion to ushort. | |
| + | operator uint () |
| Convertion to uint. | |
| + | operator ulong () |
| Convertion to ulong. | |
| + | operator float () |
| Convertion to float. | |
| + | operator double () |
| Convertion to double. | |
| + | operator PIString () |
| Convertion to PIString. | |
| + | operator PIStringList () |
| Convertion to PIStringList. | |
Entry of configuration file
+This class is node of internal PIConfig tree. Entry provide access to elements of PIConfig. Each entry has children or next properties:
Each property is a PIString. These properties forms from text line with format:
Type and comment are optional fields. Type is a single letter immediately after comment symbol "#".
+
+Entry has many implicit convertions to common types: boolean, integers, float, double, PIString, PIStringList.
+
+Generally there is no need to create instance of PIConfig::Entry manually, it returns by functions getValue() of PIConfig, PIConfig::Entry or PIConfig::Branch. If there is no suitable entry to return, reference to internal instance of PIConfig::Entry with "default" value will be returned.
+
|
+ +inline | +
| PIConfig::Entry & PIConfig::Entry::getValue | +( | +const PIString & | +vname, | +
| + | + | const PIString & | +def = PIString(), |
+
| + | + | bool * | +exists = 0 |
+
| + | ) | ++ |
Returns entry with name "vname" and default value "def".
+If there is no suitable entry found, reference to default internal entry with value = "def" will be returned, and if "exists" not null it will be set to false
+ +|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIConnection, including all inherited members.
+| addChannel(const PIString &name_from, const PIString &name_to) | PIConnection | |
| addChannel(const PIString &name_from, const PIIODevice *dev_to) | PIConnection | inline |
| addChannel(const PIIODevice *dev_from, const PIString &name_to) | PIConnection | inline |
| addChannel(const PIIODevice *dev_from, const PIIODevice *dev_to) | PIConnection | inline |
| addDevice(const PIString &full_path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite, bool start=false) | PIConnection | |
| addFilter(const PIString &name, const PIString &full_path_name, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) | PIConnection | |
| addFilter(const PIString &name, const PIIODevice *dev, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) | PIConnection | inline |
| addSender(const PIString &name, const PIString &full_path, float frequency, bool start=false) | PIConnection | |
| addSender(const PIString &name, const PIIODevice *dev, float frequency, bool start=false) | PIConnection | inline |
| allConnections() | PIConnection | static |
| allDevices() | PIConnection | static |
| boundedDevices() const | PIConnection | |
| channels() const | PIConnection | |
| className() const | PIObject | inlinevirtual |
| clearSenderFixedData(const PIString &name) | PIConnection | |
| configureFromConfig(const PIString &config, const PIString &name) | PIConnection | |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| dataReceived(const PIString &from, const PIByteArray &data) | PIConnection | inlineprotectedvirtual |
| dataReceivedEvent(const PIString &from, const PIByteArray &data) | PIConnection | |
| debug() const | PIObject | inline |
| device(const PIString &full_path) const | PIConnection | |
| diagnostic(const PIString &full_path_name) const | PIConnection | |
| diagnostic(const PIIODevice *dev) const | PIConnection | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| filter(const PIString &name) const | PIConnection | |
| filterBoundedDevices(const PIString &name) const | PIConnection | |
| filterNames() const | PIConnection | |
| filters() const | PIConnection | |
| filterValidateFooter(const PIString &filter_name, uchar *src, uchar *rec, int size) | PIConnection | protectedvirtual |
| filterValidateHeader(const PIString &filter_name, uchar *src, uchar *rec, int size) | PIConnection | protectedvirtual |
| filterValidatePayload(const PIString &filter_name, uchar *rec, int size) | PIConnection | protectedvirtual |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isEmpty() const | PIConnection | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| makeConfig() const | PIConnection | |
| name() const | PIObject | inline |
| packetReceived(const PIString &from, const PIByteArray &data) | PIConnection | inlineprotectedvirtual |
| packetReceivedEvent(const PIString &from, const PIByteArray &data) | PIConnection | |
| PIConnection() | PIConnection | |
| PIConnection(const PIString &name) | PIConnection | |
| PIConnection(const PIString &config, const PIString &name) | PIConnection | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| removeAllChannels() | PIConnection | |
| removeAllDevices() | PIConnection | |
| removeAllFilters() | PIConnection | |
| removeAllSenders() | PIConnection | |
| removeChannel(const PIString &name_from, const PIString &name_to) | PIConnection | |
| removeChannel(const PIString &name_from, const PIIODevice *dev_to) | PIConnection | inline |
| removeChannel(const PIIODevice *dev_from, const PIString &name_to) | PIConnection | inline |
| removeChannel(const PIIODevice *dev_from, const PIIODevice *dev_to) | PIConnection | inline |
| removeChannel(const PIString &name_from) | PIConnection | |
| removeChannel(const PIIODevice *dev_from) | PIConnection | inline |
| removeDevice(const PIString &full_path) | PIConnection | |
| removeFilter(const PIString &name, const PIString &full_path_name) | PIConnection | |
| removeFilter(const PIString &name, const PIIODevice *dev) | PIConnection | |
| removeFilter(const PIString &name) | PIConnection | |
| removeSender(const PIString &name, const PIString &full_path) | PIConnection | |
| removeSender(const PIString &name, const PIIODevice *dev) | PIConnection | inline |
| removeSender(const PIString &name) | PIConnection | |
| senderData(const PIString &sender_name) | PIConnection | protectedvirtual |
| senderFixedData(const PIString &name) const | PIConnection | |
| senderFrequency(const PIString &name) const | PIConnection | |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSenderFixedData(const PIString &name, const PIByteArray &data) | PIConnection | |
| start() | PIConnection | inline |
| startAllSenders() | PIConnection | |
| startAllThreadedReads() | PIConnection | |
| startSender(const PIString &name) | PIConnection | |
| startThreadedRead(const PIString &full_path) | PIConnection | |
| startThreadedRead(const PIIODevice *dev) | PIConnection | inline |
| stop() | PIConnection | inline |
| stopAllSenders() | PIConnection | |
| stopAllThreadedReads() | PIConnection | |
| stopSender(const PIString &name) | PIConnection | |
| stopThreadedRead(const PIString &full_path) | PIConnection | |
| stopThreadedRead(const PIIODevice *dev) | PIConnection | inline |
| superClassName() const | PIObject | inlinevirtual |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const PIString &full_path, const PIByteArray &data) | PIConnection | |
| write(const PIIODevice *dev, const PIByteArray &data) | PIConnection | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Complex Input/Output point. + More...
+
Inheritance diagram for PIConnection:+Public Member Functions | |
| + | PIConnection () |
| Constructs an empty connection. | |
| + | PIConnection (const PIString &name) |
| Constructs connection with name "name". | |
| + | PIConnection (const PIString &config, const PIString &name) |
| Constructs connection and configure it from config file "config" from section "name". | |
| bool | configureFromConfig (const PIString &config, const PIString &name) |
| Configure connection from config file "config" from section "name". Returns if configuration was successful. More... | |
| +PIString | makeConfig () const |
| Returns config file section of current connection configuration. | |
| PIIODevice * | addDevice (const PIString &full_path, PIIODevice::DeviceMode mode=PIIODevice::ReadWrite, bool start=false) |
| Add device with full path "full_path", open mode "mode" to Device pool and connection. More... | |
| bool | removeDevice (const PIString &full_path) |
| Remove device with full path "full_path" from connection. More... | |
| void | removeAllDevices () |
| Remove all device from connection. More... | |
| +PIIODevice * | device (const PIString &full_path) const |
| Returns device with full path "full_path" or null if there is no such device. | |
| +PIVector< PIIODevice * > | boundedDevices () const |
| Returns all devices bounded to this connection. | |
| PIPacketExtractor * | addFilter (const PIString &name, const PIString &full_path_name, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) |
| Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name". More... | |
| +PIPacketExtractor * | addFilter (const PIString &name, const PIIODevice *dev, PIPacketExtractor::SplitMode mode=PIPacketExtractor::None) |
| Add filter with name "name" to device "dev". | |
| bool | removeFilter (const PIString &name, const PIString &full_path_name) |
| Remove from filter with name "name" device with full path "full_path_name" or filter "full_path_name". More... | |
| +bool | removeFilter (const PIString &name, const PIIODevice *dev) |
| Remove from filter with name "name" device or filter "dev". | |
| +bool | removeFilter (const PIString &name) |
| Remove filter with name "name". Returns if filter was removed. | |
| +void | removeAllFilters () |
| Remove all filters from connection. | |
| +PIVector< PIPacketExtractor * > | filters () const |
| Returns all filters of connection. | |
| +PIStringList | filterNames () const |
| Returns all filter names of connection. | |
| +PIPacketExtractor * | filter (const PIString &name) const |
| Returns PIPacketExtractor * assosiated with filter "name" or null if there is no such filter. | |
| +PIVector< PIIODevice * > | filterBoundedDevices (const PIString &name) const |
| Returns all devices bounded to filter "name". | |
| bool | addChannel (const PIString &name_from, const PIString &name_to) |
| Add to connection channel from "name_from" to "name_to". More... | |
| +bool | addChannel (const PIString &name_from, const PIIODevice *dev_to) |
| Add to connection channel from "name_from" to "dev_to". | |
| +bool | addChannel (const PIIODevice *dev_from, const PIString &name_to) |
| Add to connection channel from "dev_from" to "name_to". | |
| +bool | addChannel (const PIIODevice *dev_from, const PIIODevice *dev_to) |
| Add to connection channel from "dev_from" to "dev_to". | |
| bool | removeChannel (const PIString &name_from, const PIString &name_to) |
| Remove from connection channel from "name_from" to "name_to". More... | |
| +bool | removeChannel (const PIString &name_from, const PIIODevice *dev_to) |
| Remove from connection channel from "name_from" to "dev_to". | |
| +bool | removeChannel (const PIIODevice *dev_from, const PIString &name_to) |
| Remove from connection channel from "dev_from" to "name_to". | |
| +bool | removeChannel (const PIIODevice *dev_from, const PIIODevice *dev_to) |
| Remove from connection channel from "dev_from" to "dev_to". | |
| bool | removeChannel (const PIString &name_from) |
| Remove from connection all channels from "name_from". More... | |
| +bool | removeChannel (const PIIODevice *dev_from) |
| Remove from connection all channels from "dev_from". | |
| +void | removeAllChannels () |
| Remove from connection all channels. | |
|
+PIVector< PIPair< PIString, +PIString > > | channels () const |
| Returns all channels of this connection as full pathes or filter names pair array (from, to) | |
| void | addSender (const PIString &name, const PIString &full_path, float frequency, bool start=false) |
| Add to connection sender with name "name" device with full path "full_path". More... | |
| +void | addSender (const PIString &name, const PIIODevice *dev, float frequency, bool start=false) |
| Add to connection sender with name "name" device "dev". | |
| bool | removeSender (const PIString &name, const PIString &full_path) |
| Remove from sender with name "name" device with full path "full_path_name". More... | |
| +bool | removeSender (const PIString &name, const PIIODevice *dev) |
| Remove from sender with name "name" device "dev". | |
| +bool | removeSender (const PIString &name) |
| Remove sender with name "name", returns if sender was removed. | |
| +bool | setSenderFixedData (const PIString &name, const PIByteArray &data) |
| Set sender "name" fixed send data "data", returns if sender exists. | |
| +bool | clearSenderFixedData (const PIString &name) |
| Remove sender "name" fixed send data, returns if sender exists. | |
| +PIByteArray | senderFixedData (const PIString &name) const |
| Returns sender "name" fixed send data. | |
| +float | senderFrequency (const PIString &name) const |
| Returns sender "name" timer frequency, -1 if there is no such sender, or 0 if sender is not started yet. | |
| +void | removeAllSenders () |
| Remove from connection all senders. | |
| +void | startThreadedRead (const PIString &full_path) |
| Start read thread of device with full path "full_path". | |
| +void | startThreadedRead (const PIIODevice *dev) |
| Start read thread of device "dev". | |
| +void | startAllThreadedReads () |
| Start read threads of all Device pool device. | |
| +void | startSender (const PIString &name) |
| Start sender "name" timer. | |
| +void | startAllSenders () |
| Start all senders timers. | |
| +void | start () |
| Start all read threads and senders. | |
| +void | stopThreadedRead (const PIString &full_path) |
| Stop read thread of device with full path "full_path". | |
| +void | stopThreadedRead (const PIIODevice *dev) |
| Stop read thread of device "dev". | |
| +void | stopAllThreadedReads () |
| Stop read threads of all Device pool device. | |
| +void | stopSender (const PIString &name) |
| Stop sender "name" timer. | |
| +void | stopAllSenders () |
| Stop all senders timers. | |
| +void | stop () |
| Stop all read threads and senders. | |
| +bool | isEmpty () const |
| Returns if there are no devices in this connection. | |
| +PIDiagnostics * | diagnostic (const PIString &full_path_name) const |
| Returns PIDiagnostics * assosiated with device with full path "full_path_name" or filter "full_path_name". | |
| +PIDiagnostics * | diagnostic (const PIIODevice *dev) const |
| Returns PIDiagnostics * assosiated with device or filter "dev". | |
| +int | write (const PIString &full_path, const PIByteArray &data) |
| Write data "data" to device with full path "full_path" and returns result of write() function of device. | |
| +int | write (const PIIODevice *dev, const PIByteArray &data) |
| Write data "data" to device "dev" and returns result of write() function of device. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Static Public Member Functions | |
| +static PIVector< PIConnection * > | allConnections () |
| Returns all connections in application. | |
| +static PIVector< PIIODevice * > | allDevices () |
| Returns all devices in Device pool. | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
+Protected Member Functions | |
| +virtual void | dataReceived (const PIString &from, const PIByteArray &data) |
| Executes on data received from device with full path "from". | |
| +virtual void | packetReceived (const PIString &from, const PIByteArray &data) |
| Executes on packet received from filter with name "from". | |
| +virtual bool | filterValidateHeader (const PIString &filter_name, uchar *src, uchar *rec, int size) |
| Validate header "rec" with source header "src" and size "size", executes from filter "filter_name". | |
| +virtual bool | filterValidateFooter (const PIString &filter_name, uchar *src, uchar *rec, int size) |
| Validate footer "rec" with source footer "src" and size "size", executes from filter "filter_name". | |
| +virtual bool | filterValidatePayload (const PIString &filter_name, uchar *rec, int size) |
| Validate payload "rec" with size "size", executes from filter "filter_name". | |
| +virtual PIByteArray | senderData (const PIString &sender_name) |
| You should returns data for sender "sender_name". | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Events | |
| +void | dataReceivedEvent (const PIString &from, const PIByteArray &data) |
| Raise on data received from device with full path "from". | |
| +void | packetReceivedEvent (const PIString &from, const PIByteArray &data) |
| Raise on packet received from filter with name "from". | |
+Additional Inherited Members | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Complex Input/Output point.
+PIConnection provides abstract layer over physical devices, filtering and connecting data streams. Each PIConnection works through Device Pool, so several PIConnections can read from single physical device. General scheme:
Device pool is static object, single for each application, which contains unique devices. Each PIConnection works with real devices through Device pool. Each device has assosiated thread for read and it can be started or stopped with PIConnection functions startThreadedRead() and stopThreadedRead().
+PIConnection filter is a PIPacketExtractor and assosiated array of devices or other filters. When read thread is successfully read from device this data can be passed to one or more filters. Each filter has name and filter names should be unique. You can use this name for access to PIPacketExtractor* with function filter(), or get array of assosiated devices and filters with function filterBoundedDevices(). One filter can receive data from several sources, and can be bounded to several filters.
PIConnection create PIDiagnostics for each device or filter. You can access to these objects with functions diagnostic().
+PIConnection can send data to devices with named timers ("senders"). You can create sender or add device to sender with function addSender(). Each sender has internal timer and every tick execute virtual function senderData(). Returns value of this function sended to bounded devices. You can assign fixed send data to sender with function setSenderFixedData(). In this case sender will NOT execute senderData(), but send assigned data.
You can create PIConnection from config file section or configure it later with function configureFromConfig(). Devices describes with its full pathes, for details see Creating devices by unambiguous string. Example:
Also PIConnection can create PIString with its configuration with function makeConfig(). This string can be directly inserted into the config file.
+| bool PIConnection::configureFromConfig | +( | +const PIString & | +config, | +
| + | + | const PIString & | +name | +
| + | ) | ++ |
Configure connection from config file "config" from section "name". Returns if configuration was successful.
+Warning: all devices, filters and channels removed before configure!
+ +| PIIODevice * PIConnection::addDevice | +( | +const PIString & | +full_path, | +
| + | + | PIIODevice::DeviceMode | +mode = PIIODevice::ReadWrite, |
+
| + | + | bool | +start = false |
+
| + | ) | ++ |
Add device with full path "full_path", open mode "mode" to Device pool and connection.
+Returns pointer to device or null if device can not be created. If "start" is true, read thread is started immediately. Else, you can start read thread with functions startThreadedRead() or startAllThreadedReads(). By default, read thread doesn`t start
+ +| bool PIConnection::removeDevice | +( | +const PIString & | +full_path | ) | ++ |
Remove device with full path "full_path" from connection.
+Returns if device was removed. If there is no connection bounded to this device, it will be removed from Device pool
+ +| void PIConnection::removeAllDevices | +( | +) | ++ |
Remove all device from connection.
+If there is no connection bounded to there devices, they removed from Device pool
+ +| PIPacketExtractor * PIConnection::addFilter | +( | +const PIString & | +name, | +
| + | + | const PIString & | +full_path_name, | +
| + | + | PIPacketExtractor::SplitMode | +mode = PIPacketExtractor::None |
+
| + | ) | ++ |
Add filter with name "name" to device with full path "full_path_name" or filter "full_path_name".
+If there is no filter with name "name", connection create new with split mode "mode" and bound to it device "full_path_name" or filter "full_path_name". If filter with name "name" already exists, device "full_path_name" or filter "full_path_name" add to this filter. This function returns PIPacketExtractor * assosiated with this filter
+ Attention! "mode" is altual olny if new filter was created!
| bool PIConnection::removeFilter | +( | +const PIString & | +name, | +
| + | + | const PIString & | +full_path_name | +
| + | ) | ++ |
Remove from filter with name "name" device with full path "full_path_name" or filter "full_path_name".
+If there is no devices bounded to this filter, it will be removed. Returns if device was removed
+ +| bool PIConnection::addChannel | +( | +const PIString & | +name_from, | +
| + | + | const PIString & | +name_to | +
| + | ) | ++ |
Add to connection channel from "name_from" to "name_to".
+"name_from" and "name_to" can be full pathes of devices or filter names. Returns false if there if no such device or filter, else create channel and returns true
+ +| bool PIConnection::removeChannel | +( | +const PIString & | +name_from, | +
| + | + | const PIString & | +name_to | +
| + | ) | ++ |
Remove from connection channel from "name_from" to "name_to".
+"name_from" and "name_to" can be full pathes of devices or filter names. Returns false if there if no such device or filter, else remove channel and returns true
+ +| bool PIConnection::removeChannel | +( | +const PIString & | +name_from | ) | ++ |
Remove from connection all channels from "name_from".
+"name_from" can be full path of device or filter name. Returns false if there if no such device or filter, else remove channels and returns true
+ +| void PIConnection::addSender | +( | +const PIString & | +name, | +
| + | + | const PIString & | +full_path, | +
| + | + | float | +frequency, | +
| + | + | bool | +start = false |
+
| + | ) | ++ |
Add to connection sender with name "name" device with full path "full_path".
+If there is no sender with name "name", connection create new, bound to it device "full_path_name" and start sender timer with frequency "frequency". If sender with name "name" already exists, device "full_path_name" add to this sender If "start" is true, sender is started immediately. Else, you can start sender with functions startSender()
+ Attention! "frequency" is altual olny if new sender was created!
| bool PIConnection::removeSender | +( | +const PIString & | +name, | +
| + | + | const PIString & | +full_path | +
| + | ) | ++ |
Remove from sender with name "name" device with full path "full_path_name".
+If there is no devices bounded to this sender, it will be removed. Returns if sender was removed
+ +|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIConsole, including all inherited members.
+| addBitVariable(const PIString &name, const void *ptr, int fromBit, int bitsCount, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addCustomStatus(const PIString &str) | PIConsole | inline |
| addEmptyLine(int column=1, uint count=1) | PIConsole | |
| addString(const PIString &name, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addTab(const PIString &name, char bind_key=0) | PIConsole | |
| addVariable(const PIString &name, const PIString *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const char *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const bool *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const short *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const int *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const long *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const llong *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const uchar *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const ushort *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const uint *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const ulong *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const ullong *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const float *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const double *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const PISystemTime *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const PIProtocol *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| addVariable(const PIString &name, const PIDiagnostics *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) | PIConsole | |
| Alignment enum name | PIConsole | |
| BackBlack enum value | PIConsole | |
| BackBlue enum value | PIConsole | |
| BackCyan enum value | PIConsole | |
| BackGreen enum value | PIConsole | |
| BackMagenta enum value | PIConsole | |
| BackRed enum value | PIConsole | |
| BackWhite enum value | PIConsole | |
| BackYellow enum value | PIConsole | |
| Bin enum value | PIConsole | |
| Black enum value | PIConsole | |
| Blink enum value | PIConsole | |
| Blue enum value | PIConsole | |
| Bold enum value | PIConsole | |
| className() const | PIObject | inlinevirtual |
| clearCustomStatus() | PIConsole | inline |
| clearTabs(bool clearScreen=true) | PIConsole | inline |
| clearVariables(bool clearScreen) | PIConsole | inline |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| currentTab() const | PIConsole | inline |
| Cyan enum value | PIConsole | |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| Dec enum value | PIConsole | |
| defaultAlignment() const | PIConsole | inline |
| disableExitCapture() | PIConsole | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| enableExitCapture(char key= 'Q') | PIConsole | inline |
| end() | PIThread | inlineprotectedvirtual |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| exitCaptured() const | PIConsole | inline |
| exitKey() const | PIConsole | inline |
| findByName(const PIString &name) | PIObject | inlinestatic |
| Format enum name | PIConsole | |
| Green enum value | PIConsole | |
| HANDLER | PIObject | related |
| Hex enum value | PIConsole | |
| Inverse enum value | PIConsole | |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| keyPressed(char key, void *data) | PIConsole | |
| Left enum value | PIConsole | |
| lock() | PIThread | inline |
| Magenta enum value | PIConsole | |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| Normal enum value | PIConsole | |
| Nothing enum value | PIConsole | |
| Oct enum value | PIConsole | |
| PIConsole(bool startNow=true, KBFunc slot=0) | PIConsole | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT | PIObject | related |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| Red enum value | PIConsole | |
| removeTab(uint index) | PIConsole | |
| removeTab(const PIString &name) | PIConsole | |
| Right enum value | PIConsole | |
| Scientific enum value | PIConsole | |
| setColumnAlignment(int col, Alignment align) | PIConsole | inline |
| setColumnAlignmentToAll(Alignment align) | PIConsole | inline |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setDefaultAlignment(Alignment align) | PIConsole | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setTab(uint index) | PIConsole | |
| setTab(const PIString &name) | PIConsole | |
| setTabBindKey(uint index, char bind_key) | PIConsole | |
| setTabBindKey(const PIString &name, char bind_key) | PIConsole | |
| start(bool wait) | PIConsole | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stop(bool clear) | PIConsole | |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| SystemTimeSeconds enum value | PIConsole | |
| SystemTimeSplit enum value | PIConsole | |
| tabsCount() const | PIConsole | inline |
| terminate() | PIThread | |
| Underline enum value | PIConsole | |
| unlock() | PIThread | inline |
| waitForFinish() | PIConsole | inline |
| PIThread::waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| White enum value | PIConsole | |
| Yellow enum value | PIConsole |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Console output class. + More...
+
Inheritance diagram for PIConsole:+Public Types | |
| enum | Format { + Normal = 0x01, +Bold = 0x02 +, Underline = 0x10, +Blink = 0x20, + + Inverse = 0x40, +Black = 0x100, +Red = 0x200, +Green = 0x400, + + Yellow = 0x800, +Blue = 0x1000, +Magenta = 0x2000, +Cyan = 0x4000, + + White = 0x8000, +BackBlack = 0x10000, +BackRed = 0x20000, +BackGreen = 0x40000, + + BackYellow = 0x80000, +BackBlue = 0x100000, +BackMagenta = 0x200000, +BackCyan = 0x400000, + + BackWhite = 0x800000, +Dec = 0x1000000, +Hex = 0x2000000, +Oct = 0x4000000, + + Bin = 0x8000000, +Scientific = 0x10000000, +SystemTimeSplit = 0x20000000, +SystemTimeSeconds = 0x40000000 + + } |
| Variables output format. More... | |
| enum | Alignment { Nothing, +Left, +Right + } |
| Column labels alignment. More... | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
+Public Member Functions | |
| + | PIConsole (bool startNow=true, KBFunc slot=0) |
| Constructs PIConsole with key handler "slot" and if "startNow" start it. | |
| +void | addString (const PIString &name, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" string "name" with format "format". | |
| +void | addVariable (const PIString &name, const PIString *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const char *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const bool *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const short *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const int *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const long *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const llong *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const uchar *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const ushort *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const uint *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const ulong *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const ullong *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const float *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const double *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| +void | addVariable (const PIString &name, const PISystemTime *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". | |
| void | addVariable (const PIString &name, const PIProtocol *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". More... | |
| void | addVariable (const PIString &name, const PIDiagnostics *ptr, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format". More... | |
| +void | addBitVariable (const PIString &name, const void *ptr, int fromBit, int bitsCount, int column=1, PIFlags< PIConsole::Format > format=PIConsole::Normal) |
| Add to current tab to column "column" bits field with label "name", pointer "ptr" and format "format". | |
| +void | addEmptyLine (int column=1, uint count=1) |
| Add to current tab to column "column" "count" empty lines. | |
| +uint | tabsCount () const |
| Returns tabs count. | |
| +PIString | currentTab () const |
| Returns current tab name. | |
| +int | addTab (const PIString &name, char bind_key=0) |
| Add new tab with name "name", bind key "bind_key" and returns this tab index. | |
| +void | removeTab (uint index) |
| Remove tab with index "index". | |
| +void | removeTab (const PIString &name) |
| Remove tab with name "name". | |
| +bool | setTab (uint index) |
| Set current tab to tab with index "index", returns if tab exists. | |
| +bool | setTab (const PIString &name) |
| Set current tab to tab with name "name", returns if tab exists. | |
| +bool | setTabBindKey (uint index, char bind_key) |
| Set tab with index "index" bind key to "bind_key", returns if tab exists. | |
| +bool | setTabBindKey (const PIString &name, char bind_key) |
| Set tab with name "name" bind key to "bind_key", returns if tab exists. | |
| +void | clearTabs (bool clearScreen=true) |
| Remove all tabs and if "clearScreen" clear the screen. | |
| +void | addCustomStatus (const PIString &str) |
| Set custom status text of current tab to "str". | |
| +void | clearCustomStatus () |
| Clear custom status text of current tab. | |
| +Alignment | defaultAlignment () const |
| Returns default alignment. | |
| +void | setDefaultAlignment (Alignment align) |
| Set default alignment to "align". | |
| +void | setColumnAlignment (int col, Alignment align) |
| Set column "col" alignment to "align". | |
| +void | setColumnAlignmentToAll (Alignment align) |
| Set all columns of all tabs alignment to "align". | |
| +void | enableExitCapture (char key= 'Q') |
| Directly call function from PIKbdListener. | |
| +void | disableExitCapture () |
| Directly call function from PIKbdListener. | |
| +bool | exitCaptured () const |
| Directly call function from PIKbdListener. | |
| +char | exitKey () const |
| Directly call function from PIKbdListener. | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Handlers | |
| +void | clearVariables (bool clearScreen) |
| Remove all columns at current tab and if "clearScreen" clear the screen. | |
| +void | waitForFinish () |
| block until finished (exit key will be pressed) | |
| +void | start (bool wait) |
| Start console output and if "wait" block until finished (exit key will be pressed) | |
| +void | stop (bool clear) |
| Stop console output and if "clear" clear the screen. | |
+Events | |
| +void | keyPressed (char key, void *data) |
| Raise on key "key" pressed, "data" is pointer to PIConsole object. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIThread | |
| +virtual void | end () |
| Function executed once at the end of thread. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Console output class.
+This class provides output to console with automatic alignment and update. It supports tabs, keyboard listening, formats and colors.
+PIConsole works with variable pointers. You should add your variables with functions addVariable() which receives label name, pointer to variable and optional column and format. Columns count is dynamically increased if new column used. E.g. if you add variable to empty tab to column 3, columns count will be increased to 3, but two firsts columns will be empty. Each column filled from top to bottom, but you can add just string with function addString() or add empty line with function addEmptyLine(). Layout scheme:
PIConsole should to be single in application. PIConsole aggregate PIKbdListener which grab keyboard and automatic switch tabs by theirs bind keys. If there is no tab binded to pressed key external function "slot" will be called
+| enum PIConsole::Format | +
Variables output format.
+| Enumerator | |
|---|---|
| Normal |
+ Default console format + |
| Bold |
+ Bold text + |
| Underline |
+ Underlined text + |
| Blink |
+ Blinked text + |
| Inverse |
+ Swap text and background colors + |
| Black |
+ Black text + |
| Red |
+ Red text + |
| Green |
+ Green text + |
| Yellow |
+ Yellow text + |
| Blue |
+ Blue text + |
| Magenta |
+ Magenta text + |
| Cyan |
+ Cyan text + |
| White |
+ White text + |
| BackBlack |
+ Black background + |
| BackRed |
+ Red background + |
| BackGreen |
+ Green background + |
| BackYellow |
+ Yellow background + |
| BackBlue |
+ Blue background + |
| BackMagenta |
+ Magenta background + |
| BackCyan |
+ Cyan background + |
| BackWhite |
+ White background + |
| Dec |
+ Decimal base for integers + |
| Hex |
+ Hexadecimal base for integers + |
| Oct |
+ Octal base for integers + |
| Bin |
+ Binary base for integers + |
| Scientific |
+ Scientific representation of floats + |
| SystemTimeSplit |
+ PISystemTime split representation (* s, * ns) + |
| SystemTimeSeconds |
+ PISystemTime seconds representation (*.* s) + |
| enum PIConsole::Alignment | +
| void PIConsole::addVariable | +( | +const PIString & | +name, | +
| + | + | const PIProtocol * | +ptr, | +
| + | + | int | +col = 1, |
+
| + | + | PIFlags< PIConsole::Format > | +format = PIConsole::Normal |
+
| + | ) | ++ |
Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format".
+This function add to column "column" next lines:
| void PIConsole::addVariable | +( | +const PIString & | +name, | +
| + | + | const PIDiagnostics * | +ptr, | +
| + | + | int | +col = 1, |
+
| + | + | PIFlags< PIConsole::Format > | +format = PIConsole::Normal |
+
| + | ) | ++ |
Add to current tab to column "column" variable with label "name", pointer "ptr" and format "format".
+This function add to column "column" next lines:
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PICout, including all inherited members.
+| newLine() | PICout | |
| operator<<(const char *v) | PICout | |
| operator<<(const string &v) | PICout | |
| operator<<(const bool v) | PICout | |
| operator<<(const char v) | PICout | |
| operator<<(const uchar v) | PICout | |
| operator<<(const short v) | PICout | |
| operator<<(const ushort v) | PICout | |
| operator<<(const int v) | PICout | |
| operator<<(const uint v) | PICout | |
| operator<<(const long v) | PICout | |
| operator<<(const ulong v) | PICout | |
| operator<<(const llong v) | PICout | |
| operator<<(const ullong v) | PICout | |
| operator<<(const float v) | PICout | |
| operator<<(const double v) | PICout | |
| operator<<(const void *v) | PICout | |
| operator<<(const PIObject *v) | PICout | |
| operator<<(const PICoutSpecialChar v) | PICout | |
| operator<<(const PIFlags< PICoutFormat > v) | PICout | inline |
| operator<<(const PICoutFormat v) | PICout | inline |
| operator<<(const PICoutAction v) | PICout | |
| operator<<(PICout s, const PIString &v) | PICout | related |
| operator<<(PICout s, const PIStringList &v) | PICout | related |
| PICout(PIFlags< PICoutControl > controls=AddSpaces|AddNewLine) | PICout | |
| quote() | PICout | |
| restoreControl() | PICout | inline |
| saveControl() | PICout | inline |
| setControl(PICoutControl c, bool on=true) | PICout | inline |
| setControl(PICoutControls c, bool save=false) | PICout | inline |
| space() | PICout |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Class for formatted output similar std::cout. + More...
++Public Member Functions | |
| + | PICout (PIFlags< PICoutControl > controls=AddSpaces|AddNewLine) |
| Default constructor with default features (AddSpaces and AddNewLine) | |
| +PICout | operator<< (const char *v) |
Output operator for strings with "const char * " type. | |
| +PICout | operator<< (const string &v) |
Output operator for strings with "std::string" type. | |
| +PICout | operator<< (const bool v) |
| Output operator for boolean values. | |
| +PICout | operator<< (const char v) |
Output operator for "char" values. | |
| +PICout | operator<< (const uchar v) |
Output operator for "unsigned char" values. | |
| +PICout | operator<< (const short v) |
Output operator for "short" values. | |
| +PICout | operator<< (const ushort v) |
Output operator for "unsigned short" values. | |
| +PICout | operator<< (const int v) |
Output operator for "int" values. | |
| +PICout | operator<< (const uint v) |
Output operator for "unsigned int" values. | |
| +PICout | operator<< (const long v) |
Output operator for "long" values. | |
| +PICout | operator<< (const ulong v) |
Output operator for "unsigned long" values. | |
| +PICout | operator<< (const llong v) |
Output operator for "long long" values. | |
| +PICout | operator<< (const ullong v) |
Output operator for "unsigned long long" values. | |
| +PICout | operator<< (const float v) |
Output operator for "float" values. | |
| +PICout | operator<< (const double v) |
Output operator for "double" values. | |
| +PICout | operator<< (const void *v) |
| Output operator for pointers. | |
| +PICout | operator<< (const PIObject *v) |
| Output operator for PIObject and ancestors. | |
| +PICout | operator<< (const PICoutSpecialChar v) |
| Output operator for PICoutSpecialChar values. | |
| +PICout | operator<< (const PIFlags< PICoutFormat > v) |
| Output operator for PIFlags<PICoutFormat> values. | |
| +PICout | operator<< (const PICoutFormat v) |
| Output operator for PICoutFormat values. | |
| PICout | operator<< (const PICoutAction v) |
| Do some action. More... | |
| +PICout & | setControl (PICoutControl c, bool on=true) |
| Set control flag "c" is "on" state. | |
| +PICout & | setControl (PICoutControls c, bool save=false) |
| Set control flags "c" and if "save" exec saveControl() | |
| PICout & | saveControl () |
| Save control flags to internal stack. More... | |
| PICout & | restoreControl () |
| Restore control flags from internal stack. More... | |
| PICout & | space () |
| Conditional put space character to output. More... | |
| PICout & | quote () |
| Conditional put quote character to output. More... | |
| PICout & | newLine () |
| Conditional put new line character to output. More... | |
+Related Functions | |
(Note that these are not member functions.) + | |
| +PICout | operator<< (PICout s, const PIString &v) |
| Output operator to PICout. | |
| +PICout | operator<< (PICout s, const PIStringList &v) |
| Output operator to PICout. | |
Class for formatted output similar std::cout.
+This class provide many stream operators for output with some features. Output to PICout is thread-sequential, i.e. doesn`t mixed from parallel threads.
+| PICout PICout::operator<< | +( | +const PICoutAction | +v | ) | ++ |
Do some action.
+TODO !!!
+ +
+
|
+ +inline | +
Save control flags to internal stack.
+
+
|
+ +inline | +
Restore control flags from internal stack.
+| PICout & PICout::space | +( | +) | ++ |
| PICout & PICout::quote | +( | +) | ++ |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIDiagnostics, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Connection quality diagnostics. + More...
+
Inheritance diagram for PIDiagnostics:+Public Types | |
| enum | Quality { + Unknown = 1, +Failure = 2, +Bad = 3, +Average = 4, + + Good = 5 + + } |
| Connection quality. More... | |
+Public Member Functions | |
| + | PIDiagnostics (bool start_=true) |
| Constructs an empty diagnostics and if "strat_" start it. | |
| +float | disconnectTimeout () const |
| Returns period of full disconnect in seconds and period of averaging frequency. | |
| +void | setDisconnectTimeout (float s) |
| Returns period of full disconnect in seconds and period of averaging frequency. | |
| +float | immediateFrequency () const |
| Returns immediate receive frequency, packets/s. | |
| +float | integralFrequency () const |
| Returns integral receive frequency for disconnectTimeout() seconds, packets/s. | |
| +ullong | receiveCountPerSec () const |
| Returns correct received packets per second. | |
| +ullong | sendCountPerSec () const |
| Returns sended packets per second. | |
| +ullong | receiveBytesPerSec () const |
| Returns correct received bytes per second. | |
| +ullong | sendBytesPerSec () const |
| Returns sended bytes per second. | |
| +ullong | receiveCount () const |
| Returns overall correct received packets count. | |
| +ullong | wrongCount () const |
| Returns overall wrong received packets count. | |
| +ullong | sendCount () const |
| Returns overall sended packets count. | |
| +PIDiagnostics::Quality | quality () const |
| Returns connection quality. | |
| +PIString | receiveSpeed () const |
| Returns receive speed in format "n {B|kB|MB|GB|TB}/s". | |
| +PIString | sendSpeed () const |
| Returns send speed in format "n {B|kB|MB|GB|TB}/s". | |
| +const float * | immediateFrequency_ptr () const |
| Returns immediate receive frequency pointer, packets/s. Useful for output to PIConsole. | |
| +const float * | integralFrequency_ptr () const |
| Returns integral receive frequency pointer for period, packets/s. Useful for output to PIConsole. | |
| +const ullong * | receiveCountPerSec_ptr () const |
| Returns correct received packets per second pointer. Useful for output to PIConsole. | |
| +const ullong * | sendCountPerSec_ptr () const |
| Returns sended packets per second pointer. Useful for output to PIConsole. | |
| +const ullong * | receiveBytesPerSec_ptr () const |
| Returns correct received bytes per second pointer. Useful for output to PIConsole. | |
| +const ullong * | sendBytesPerSec_ptr () const |
| Returns sended bytes per second pointer. Useful for output to PIConsole. | |
| +const ullong * | receiveCount_ptr () const |
| Returns overall correct received packets count pointer. Useful for output to PIConsole. | |
| +const ullong * | wrongCount_ptr () const |
| Returns overall wrong received packets count pointer. Useful for output to PIConsole. | |
| +const ullong * | sendCount_ptr () const |
| Returns overall sended packets count pointer. Useful for output to PIConsole. | |
| +const int * | quality_ptr () const |
| Returns connection quality pointer. Useful for output to PIConsole. | |
| +const PIString * | receiveSpeed_ptr () const |
| Returns receive speed pointer in format "n {B|kB|MB|GB|TB}/s". Useful for output to PIConsole. | |
| +const PIString * | sendSpeed_ptr () const |
| Returns send speed pointer in format "n {B|kB|MB|GB|TB}/s". Useful for output to PIConsole. | |
+Handlers | |
| +void | start (double msecs) |
| Start diagnostics evaluations with period "msecs" milliseconds. | |
| +void | reset () |
| Reset diagnostics counters. | |
| +void | received (int size, bool correct) |
| Notify diagnostics about "correct" corected received packet. | |
| +void | sended (int size) |
| Notify diagnostics about sended packet. | |
+Events | |
| +void | qualityChanged (PIDiagnostics::Quality new_quality, PIDiagnostics::Quality old_quality) |
| Raise on change receive quality from "old_quality" to "new_quality". | |
+Additional Inherited Members | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Connection quality diagnostics.
+This class provide abstract connection quality diagnostics and counting. You should create instance of PIDiagnostics and on packet receive call function received(), on packet send call function sended(). PIDiagnostics calculates correct, wrong and sended counters, packets per second, bytes per seconds, immediate and integral receive frequencies and receive/send speeds in human readable representation. There statistics are calculates one time per period, by default 1 second. To calculate them you should start PIDiagnostics with function start() or pass true to constructor.
+| enum PIDiagnostics::Quality | +
Connection quality.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIEthernet, including all inherited members.
+| allAddresses() | PIEthernet | static |
| Broadcast enum value | PIEthernet | |
| broadcast | PIEthernet | |
| className() const | PIObject | inlinevirtual |
| closeDevice() | PIEthernet | protectedvirtual |
| configureDevice(const void *e_main, const void *e_parent=0) | PIEthernet | protectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIEthernet | protectedvirtual |
| connect() | PIEthernet | |
| connect(const PIString &ip, int port) | PIEthernet | inline |
| connect(const PIString &ip_port) | PIEthernet | inline |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| connected() | PIEthernet | |
| CONNECTU | PIObject | related |
| constructFullPath() const | PIEthernet | virtual |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| disconnected(bool withError) | PIEthernet | |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| fullPathPrefix() const | PIEthernet | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| ifActive enum value | PIEthernet | |
| ifBroadcast enum value | PIEthernet | |
| ifLoopback enum value | PIEthernet | |
| ifMulticast enum value | PIEthernet | |
| ifPTP enum value | PIEthernet | |
| ifRunning enum value | PIEthernet | |
| init() | PIEthernet | protectedvirtual |
| InterfaceFlag enum name | PIEthernet | |
| InterfaceFlags typedef | PIEthernet | |
| interfaces() | PIEthernet | static |
| ip | PIEthernet | |
| isConnected() const | PIEthernet | inline |
| isParameterSet(PIEthernet::Parameters parameter) const | PIEthernet | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| joinMulticastGroup(const PIString &group) | PIEthernet | |
| leaveMulticastGroup(const PIString &group) | PIEthernet | |
| listen(bool threaded=false) | PIEthernet | |
| listen(const PIString &ip, int port, bool threaded=false) | PIEthernet | inline |
| listen(const PIString &ip_port, bool threaded=false) | PIEthernet | inline |
| lock() | PIThread | inline |
| multicastGroups() const | PIEthernet | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| newConnection(PIEthernet *client) | PIEthernet | |
| openDevice() | PIEthernet | protectedvirtual |
| parameters() const | PIEthernet | inline |
| Parameters enum name | PIEthernet | |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIEthernet() | PIEthernet | |
| PIEthernet(Type type, const PIString &ip_port=PIString(), const PIFlags< Parameters > params=0) | PIEthernet | |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| port | PIEthernet | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIEthernet | protectedvirtual |
| read(void *read_to, int max_size) | PIEthernet | virtual |
| readAddress() const | PIEthernet | inline |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| readIP() const | PIEthernet | inline |
| readPort() const | PIEthernet | inline |
| readTimeout() const | PIEthernet | inline |
| received(const void *data, int size) | PIEthernet | inlineprotectedvirtual |
| REGISTER_DEVICE | PIIODevice | related |
| ReuseAddress enum value | PIEthernet | |
| reuseAddress | PIEthernet | |
| send(const PIString &ip, int port, const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const PIString &ip_port, const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const void *data, int size, bool threaded=false) | PIEthernet | inline |
| send(const PIByteArray &data, bool threaded=false) | PIEthernet | inline |
| sendAddress() const | PIEthernet | inline |
| sendIP() const | PIEthernet | inline |
| sendPort() const | PIEthernet | inline |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setParameter(PIEthernet::Parameters parameter, bool on=true) | PIEthernet | |
| setParameters(PIFlags< PIEthernet::Parameters > parameters_) | PIEthernet | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setReadAddress(const PIString &ip, int port) | PIEthernet | inline |
| setReadAddress(const PIString &ip_port) | PIEthernet | inline |
| setReadIP(const PIString &ip) | PIEthernet | inline |
| setReadPort(int port) | PIEthernet | inline |
| setReadTimeout(double ms) | PIEthernet | inline |
| setSendAddress(const PIString &ip, int port) | PIEthernet | inline |
| setSendAddress(const PIString &ip_port) | PIEthernet | inline |
| setSendIP(const PIString &ip) | PIEthernet | inline |
| setSendPort(int port) | PIEthernet | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| setWriteTimeout(double ms) | PIEthernet | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| TCP_Client enum value | PIEthernet | |
| TCP_Server enum value | PIEthernet | |
| threadedRead(uchar *readed, int size) | PIIODevice | inlineprotectedvirtual |
| type() const | PIEthernet | inline |
| Type enum name | PIEthernet | |
| UDP enum value | PIEthernet | |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PIEthernet | virtual |
| write(const PIByteArray &data) | PIEthernet | inline |
| writeTimeout() const | PIEthernet | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Ethernet device. + More...
+
Inheritance diagram for PIEthernet:+Classes | |
| struct | Interface |
| Network interface descriptor. More... | |
| class | InterfaceList |
| Array of Interface with some features. More... | |
+Public Types | |
| enum | Type { UDP, +TCP_Client, +TCP_Server + } |
| Type of PIEthernet. More... | |
| enum | Parameters { ReuseAddress = 0x1, +Broadcast = 0x2 + } |
| Parameters of PIEthernet. More... | |
| enum | InterfaceFlag { + ifActive = 0x1, +ifRunning = 0x2, +ifBroadcast = 0x4, +ifMulticast = 0x8, + + ifLoopback = 0x10, +ifPTP = 0x20 + + } |
| Flags of network interface. More... | |
| +typedef PIFlags< InterfaceFlag > | InterfaceFlags |
| PIFlags of network interface flags | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
+Public Member Functions | |
| + | PIEthernet () |
| Contructs UDP PIEthernet with empty read address. | |
| + | PIEthernet (Type type, const PIString &ip_port=PIString(), const PIFlags< Parameters > params=0) |
| Contructs PIEthernet with type "type", read address "ip_port" and parameters "params". | |
| +void | setReadAddress (const PIString &ip, int port) |
| Set read address. | |
| +void | setReadAddress (const PIString &ip_port) |
| Set read address in format "i.i.i.i:p". | |
| +void | setReadIP (const PIString &ip) |
| Set read IP. | |
| +void | setReadPort (int port) |
| Set read port. | |
| +void | setSendAddress (const PIString &ip, int port) |
| Set send address. | |
| +void | setSendAddress (const PIString &ip_port) |
| Set send address in format "i.i.i.i:p". | |
| +void | setSendIP (const PIString &ip) |
| Set send IP. | |
| +void | setSendPort (int port) |
| Set send port. | |
| +PIString | readAddress () const |
| Returns read address in format "i.i.i.i:p". | |
| +PIString | readIP () const |
| Returns read IP. | |
| +int | readPort () const |
| Returns read port. | |
| +PIString | sendAddress () const |
| Returns send address in format "i.i.i.i:p". | |
| +PIString | sendIP () const |
| Returns send IP. | |
| +int | sendPort () const |
| Returns send port. | |
| +void | setParameters (PIFlags< PIEthernet::Parameters > parameters_) |
| Set parameters to "parameters_". You should to reopen PIEthernet to apply them. | |
| +void | setParameter (PIEthernet::Parameters parameter, bool on=true) |
| Set parameter "parameter" to state "on". You should to reopen PIEthernet to apply this. | |
| +bool | isParameterSet (PIEthernet::Parameters parameter) const |
| Returns if parameter "parameter" is set. | |
| +PIFlags< PIEthernet::Parameters > | parameters () const |
| Returns parameters. | |
| +Type | type () const |
| Returns PIEthernet type. | |
| +double | readTimeout () const |
| Returns read timeout. | |
| +double | writeTimeout () const |
| Returns write timeout. | |
| +void | setReadTimeout (double ms) |
| Set timeout for read. | |
| +void | setWriteTimeout (double ms) |
| Set timeout for write. | |
| +bool | joinMulticastGroup (const PIString &group) |
| Join to multicast group with address "group". Use only for UDP. | |
| +bool | leaveMulticastGroup (const PIString &group) |
| Leave multicast group with address "group". Use only for UDP. | |
| +const PIStringList & | multicastGroups () const |
| Returns joined multicast groups. Use only for UDP. | |
| +bool | connect () |
| Connect to TCP server with address readAddress(). Use only for TCP_Client. | |
| +bool | connect (const PIString &ip, int port) |
| Connect to TCP server with address "ip":"port". Use only for TCP_Client. | |
| +bool | connect (const PIString &ip_port) |
| Connect to TCP server with address "ip_port". Use only for TCP_Client. | |
| +bool | isConnected () const |
| Returns if PIEthernet connected to TCP server. Use only for TCP_Client. | |
| +bool | listen (bool threaded=false) |
| Start listen for incoming TCP connections on address readAddress(). Use only for TCP_Server. | |
| +bool | listen (const PIString &ip, int port, bool threaded=false) |
| Start listen for incoming TCP connections on address "ip":"port". Use only for TCP_Server. | |
| +bool | listen (const PIString &ip_port, bool threaded=false) |
| Start listen for incoming TCP connections on address "ip_port". Use only for TCP_Server. | |
| +bool | send (const PIString &ip, int port, const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address "ip":"port". | |
| +bool | send (const PIString &ip_port, const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address "ip_port". | |
| +bool | send (const void *data, int size, bool threaded=false) |
| Send data "data" with size "size" to address sendAddress() for UDP or readAddress() for TCP_Client. | |
| +bool | send (const PIByteArray &data, bool threaded=false) |
| Send data "data" to address sendAddress() for UDP or readAddress() for TCP_Client. | |
| +int | read (void *read_to, int max_size) |
| Wait for some data and read it to "read_to". | |
| +int | write (const void *data, int max_size) |
| Send data "read_to" with size "max_size" to address sendAddress() for UDP or readAddress() for TCP_Client. | |
| +int | write (const PIByteArray &data) |
| Send data "data" to address sendAddress() for UDP or readAddress() for TCP_Client. | |
| +PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Static Public Member Functions | |
| +static InterfaceList | interfaces () |
| Returns all system network interfaces. | |
| +static PIStringList | allAddresses () |
| Returns all system network IP addresses. | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
+Protected Member Functions | |
| +void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
| +PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| +void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| +bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| +virtual void | received (const void *data, int size) |
| Executes when any read function was successful. Default implementation does nothing. | |
| +bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable. | |
| +bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
Protected Member Functions inherited from PIIODevice | |
| +virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
+Events | |
| +void | newConnection (PIEthernet *client) |
| Raise on new TCP connection received. | |
| +void | connected () |
| Raise if succesfull TCP connection. | |
| +void | disconnected (bool withError) |
| Raise if TCP connection was closed. | |
+Configurable parameters | |
| +string | ip |
| read ip, default "" | |
| +int | port |
| read port, default 0 | |
| +bool | broadcast |
| Broadcast parameter, default false. | |
| +bool | reuseAddress |
| ReuseAddress parameter, default false. | |
+Additional Inherited Members | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Ethernet device.
+PIEthernet designed to work with IPv4 network by two protocols: UDP and TCP. This class allow you send and receive packets to/from another computer through network.
+User Datagram Protocol
+Transmission Control Protocol
+| enum PIEthernet::Type | +
| enum PIEthernet::Parameters | +
| enum PIEthernet::InterfaceFlag | +
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIEthernet::InterfaceList, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Array of Interface with some features. + More...
+
Inheritance diagram for PIEthernet::InterfaceList:+Public Member Functions | |
| +const Interface * | getByIndex (int index) const |
| Get interface with system index "index" or 0 if there is no one. | |
| +const Interface * | getByName (const PIString &name) const |
| Get interface with system name "name" or 0 if there is no one. | |
| +const Interface * | getByAddress (const PIString &address) const |
| Get interface with IP address "address" or 0 if there is no one. | |
| +const Interface * | getLoopback () const |
| Get loopback interface or 0 if there is no one. | |
Array of Interface with some features.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIEvaluator, including all inherited members.
+| check(const PIString &string) | PIEvaluator | |
| clearCustomVariables() | PIEvaluator | inline |
| data() | PIEvaluator | inline |
| error() const | PIEvaluator | inline |
| evaluate() | PIEvaluator | |
| expression() const | PIEvaluator | inline |
| isCorrect() const | PIEvaluator | inline |
| lastResult() const | PIEvaluator | inline |
| PIEvaluator() | PIEvaluator | inline |
| removeVariable(const PIString &name) | PIEvaluator | inline |
| setData(void *_data) | PIEvaluator | inline |
| setVariable(const PIString &name, complexd value=0.) | PIEvaluator | inline |
| setVariable(int index, complexd value=0.) | PIEvaluator | inline |
| unknownVariables() const | PIEvaluator | inline |
| variableIndex(const PIString &name) const | PIEvaluator | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This class provide mathematical evaluations of custom expression. + More...
++Public Member Functions | |
| + | PIEvaluator () |
| Constructs an empty evaluator. | |
| +void * | data () |
| Returns custom data. | |
| +void | setData (void *_data) |
| Set custom data to "_data". | |
| +bool | check (const PIString &string) |
| Check mathematical expression and parse it to list of instructions. | |
| +bool | isCorrect () const |
| Returns true if expression was checked succesfully. | |
| +int | setVariable (const PIString &name, complexd value=0.) |
| Set variable value with name "name" to value "value". Add variable if it doesn`t exists. | |
| +void | setVariable (int index, complexd value=0.) |
Set variable value with index "index" to value "value". Dont add variable if it doesnt exists. | |
| +complexd | evaluate () |
| Evaluate last successfully checked with function check() expression and returns result. | |
| +void | removeVariable (const PIString &name) |
| Remove variable with name "name". | |
| +void | clearCustomVariables () |
| Remove all manually added variables. | |
| +int | variableIndex (const PIString &name) const |
| Returns index of variable with name "name". | |
| +const PIStringList & | unknownVariables () const |
| Returns all unknown variables founded in last expression passed to check() function. | |
| +const PIString & | expression () const |
| Returns processed last expression passed to check() function. | |
| +const PIString & | error () const |
| Returns last error description occured in check() function. | |
| +const complexd & | lastResult () const |
| Returns last result of evaluate() | |
This class provide mathematical evaluations of custom expression.
+PIEvaluator developed for stream evaluations of once set expression. It`s create internal list of instructions on function check() and executes very fast on function evaluate(). Once given expression can be evaluated any times with different variable values. Evaluator supports many common mathematic functions described below. Also it`s automatic puts unnecessarily signs and bracets. Processed expression can be obtains with function expression(). If there is an error in expression you can get it with function error(). Last evaluated result you can get with function lastResult().
+First you should set your variables with function setVariable(). Next give your expression with function check() and check for error with functions isCorrect() and error(). If expression is correct you can get processed expression with function expression() and evaluate it with function evaluate(). You can change variable values without rechecking expression.
+PIEvaluator supports arithmetical operations with complex numbers, this is their list in priority order:
In addition there are compare and logical operations:
Compare and logical functions works with real operators part and returns 0 or 1.
+Mathematical functions:
There are some built-in constans:
All trigonometric functions takes angle in radians.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIFile, including all inherited members.
+| className() const | PIObject | inlinevirtual |
| closeDevice() | PIFile | protectedvirtual |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIFile | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| fullPathPrefix() const | PIFile | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| init() | PIIODevice | inlineprotectedvirtual |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| openDevice() | PIFile | protectedvirtual |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT | PIObject | related |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| priority() const | PIThread | inline |
| Priority enum name | PIThread | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| REGISTER_DEVICE | PIIODevice | related |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| threadedRead(uchar *readed, int size) | PIIODevice | inlineprotectedvirtual |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Local file. + More...
+
Inheritance diagram for PIFile:+Protected Member Functions | |
| +PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| +void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| +bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable. | |
| +bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
Protected Member Functions inherited from PIIODevice | |
| +virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| +virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Local file.
+This class provide access to local file. You can manipulate binary content or use this class as text stream. To binary access there are function read(), write(), and many writeBinary() functions. For write variables to file in their text representation threr are many "<<" operators.
+Each opened file has a read/write position - logical position in the file content you read from or you write to. You can find out current position with function pos(). Function seek(llong position) move position to position "position", seekToBegin() move position to the begin of file, seekToEnd() move position to the end of file.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIFlags< Enum >, including all inherited members.
+| operator int() const | PIFlags< Enum > | inline |
| operator!=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator!=(const Enum &e) | PIFlags< Enum > | inline |
| operator!=(const int i) | PIFlags< Enum > | inline |
| operator&(PIFlags f) const | PIFlags< Enum > | inline |
| operator&(Enum e) const | PIFlags< Enum > | inline |
| operator&(int i) const | PIFlags< Enum > | inline |
| operator&=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator&=(const Enum &e) | PIFlags< Enum > | inline |
| operator&=(const int i) | PIFlags< Enum > | inline |
| operator<(const PIFlags &f) | PIFlags< Enum > | inline |
| operator<(const Enum &e) | PIFlags< Enum > | inline |
| operator<(const int i) | PIFlags< Enum > | inline |
| operator<=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator<=(const Enum &e) | PIFlags< Enum > | inline |
| operator<=(const int i) | PIFlags< Enum > | inline |
| operator=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator=(const Enum &e) | PIFlags< Enum > | inline |
| operator=(const int &i) | PIFlags< Enum > | inline |
| operator==(const PIFlags &f) | PIFlags< Enum > | inline |
| operator==(const Enum &e) | PIFlags< Enum > | inline |
| operator==(const int i) | PIFlags< Enum > | inline |
| operator>(const PIFlags &f) | PIFlags< Enum > | inline |
| operator>(const Enum &e) | PIFlags< Enum > | inline |
| operator>(const int i) | PIFlags< Enum > | inline |
| operator>=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator>=(const Enum &e) | PIFlags< Enum > | inline |
| operator>=(const int i) | PIFlags< Enum > | inline |
| operator[](Enum e) const | PIFlags< Enum > | inline |
| operator^(PIFlags f) const | PIFlags< Enum > | inline |
| operator^(Enum e) const | PIFlags< Enum > | inline |
| operator^(int i) const | PIFlags< Enum > | inline |
| operator^=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator^=(const Enum &e) | PIFlags< Enum > | inline |
| operator^=(const int i) | PIFlags< Enum > | inline |
| operator|(PIFlags f) const | PIFlags< Enum > | inline |
| operator|(Enum e) const | PIFlags< Enum > | inline |
| operator|(int i) const | PIFlags< Enum > | inline |
| operator|=(const PIFlags &f) | PIFlags< Enum > | inline |
| operator|=(const Enum &e) | PIFlags< Enum > | inline |
| operator|=(const int i) | PIFlags< Enum > | inline |
| PIFlags() | PIFlags< Enum > | inline |
| PIFlags(Enum e) | PIFlags< Enum > | inline |
| PIFlags(const PIFlags &f) | PIFlags< Enum > | inline |
| PIFlags(const int i) | PIFlags< Enum > | inline |
| setFlag(const PIFlags &f, bool on=true) | PIFlags< Enum > | inline |
| setFlag(const Enum &e, bool on=true) | PIFlags< Enum > | inline |
| setFlag(const int &i, bool on=true) | PIFlags< Enum > | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This class used as container for bit flags. + More...
++Public Member Functions | |
| + | PIFlags () |
| Constructor with flags = 0. | |
| + | PIFlags (Enum e) |
| Constructor with flags = Enum "e". | |
| + | PIFlags (const PIFlags &f) |
| Constructor with flags = PIFlags "f". | |
| + | PIFlags (const int i) |
| Constructor with flags = int "i". | |
| +PIFlags & | setFlag (const PIFlags &f, bool on=true) |
| Set flags "f" to value "on". | |
| +PIFlags & | setFlag (const Enum &e, bool on=true) |
| Set flag "e" to value "on". | |
| +PIFlags & | setFlag (const int &i, bool on=true) |
| Set flag "i" to value "on". | |
| +void | operator= (const PIFlags &f) |
| copy operator | |
| +void | operator= (const Enum &e) |
| copy operator | |
| +void | operator= (const int &i) |
| copy operator | |
| +bool | operator== (const PIFlags &f) |
| compare operator | |
| +bool | operator== (const Enum &e) |
| compare operator | |
| +bool | operator== (const int i) |
| compare operator | |
| +bool | operator!= (const PIFlags &f) |
| compare operator | |
| +bool | operator!= (const Enum &e) |
| compare operator | |
| +bool | operator!= (const int i) |
| compare operator | |
| +bool | operator> (const PIFlags &f) |
| compare operator | |
| +bool | operator> (const Enum &e) |
| compare operator | |
| +bool | operator> (const int i) |
| compare operator | |
| +bool | operator< (const PIFlags &f) |
| compare operator | |
| +bool | operator< (const Enum &e) |
| compare operator | |
| +bool | operator< (const int i) |
| compare operator | |
| +bool | operator>= (const PIFlags &f) |
| compare operator | |
| +bool | operator>= (const Enum &e) |
| compare operator | |
| +bool | operator>= (const int i) |
| compare operator | |
| +bool | operator<= (const PIFlags &f) |
| compare operator | |
| +bool | operator<= (const Enum &e) |
| compare operator | |
| +bool | operator<= (const int i) |
| compare operator | |
| +void | operator&= (const PIFlags &f) |
| Bit-wise AND operator. | |
| +void | operator&= (const Enum &e) |
| Bit-wise AND operator. | |
| +void | operator&= (const int i) |
| Bit-wise AND operator. | |
| +void | operator|= (const PIFlags &f) |
| Bit-wise OR operator. | |
| +void | operator|= (const Enum &e) |
| Bit-wise OR operator. | |
| +void | operator|= (const int i) |
| Bit-wise OR operator. | |
| +void | operator^= (const PIFlags &f) |
| Bit-wise XOR operator. | |
| +void | operator^= (const Enum &e) |
| Bit-wise XOR operator. | |
| +void | operator^= (const int i) |
| Bit-wise XOR operator. | |
| +PIFlags | operator& (PIFlags f) const |
| Bit-wise AND operator. | |
| +PIFlags | operator& (Enum e) const |
| Bit-wise AND operator. | |
| +PIFlags | operator& (int i) const |
| Bit-wise AND operator. | |
| +PIFlags | operator| (PIFlags f) const |
| Bit-wise OR operator. | |
| +PIFlags | operator| (Enum e) const |
| Bit-wise OR operator. | |
| +PIFlags | operator| (int i) const |
| Bit-wise OR operator. | |
| +PIFlags | operator^ (PIFlags f) const |
| Bit-wise XOR operator. | |
| +PIFlags | operator^ (Enum e) const |
| Bit-wise XOR operator. | |
| +PIFlags | operator^ (int i) const |
| Bit-wise XOR operator. | |
| +bool | operator[] (Enum e) const |
| Test flag operator. | |
| + | operator int () const |
Implicity conversion to int. | |
This class used as container for bit flags.
+PIFlags is wrapper around "int". There are many bit-wise operators, native conversion to int and function to test flag.
+ Example:
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIIODevice, including all inherited members.
+| className() const | PIObject | inlinevirtual |
| closeDevice() | PIIODevice | inlineprotectedvirtual |
| configureDevice(const void *e_main, const void *e_parent=0) | PIIODevice | inlineprotectedvirtual |
| configureFromFullPath(const PIString &full_path) | PIIODevice | inlineprotectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| fullPathPrefix() const | PIIODevice | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| init() | PIIODevice | inlineprotectedvirtual |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| openDevice()=0 | PIIODevice | protectedpure virtual |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT | PIObject | related |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| REGISTER_DEVICE | PIIODevice | related |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| threadedRead(uchar *readed, int size) | PIIODevice | inlineprotectedvirtual |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Base class for input/output classes. + More...
+
Inheritance diagram for PIIODevice:+Protected Member Functions | |
| +virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| +virtual bool | openDevice ()=0 |
| Reimplement to open device, return value will be set to "opened_" variable. | |
| +virtual bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| +virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
| +virtual PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| +virtual void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Related Functions | |
(Note that these are not member functions.) + | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
+Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Base class for input/output classes.
+This class provide open/close logic, threaded read/write and virtual input/output functions read() and write(). You should implement pure virtual function openDevice() in your subclass.
+PIIODevice have boolean variable indicated open status. Returns of functions openDevice() and closeDevice() change this variable.
+PIIODevice based on PIThread, so it`s overload run() to exec read() in background thread. If read is successful virtual function threadedRead() is executed. Default implementation of this function execute external static function set by setThreadedReadSlot() with data set by setThreadedReadData(). Extrenal static function should have format
+bool func_name(void * Threaded_read_data, uchar * readed_data, int readed_size)
+Threaded read starts with function startThreadedRead().
PIIODevice aggregate another PIThread to perform a threaded write by function writeThreaded(). This function add task to internal queue and return queue entry ID. You should start write thread by function startThreadedWrite. On successful write event threadedWriteEvent is raised with two arguments - task ID and written bytes count.
+PIIODevice have internal buffer for threaded read, and threadedRead() function receive pointer to this buffer in first argument. You can adjust size of this buffer by function setThreadedReadBufferSize()
+Default size of this buffer is 4096 bytes.
When threaded read is begin its call open() if device is closed. While threaded read running PIIODevice check if device opened every read and if not call open() every reopen timeout if reopen enabled. Reopen timeout is set by setReopenTimeout(), reopen enable is set by setReopenEnabled().
+This is virtual function configureDevice() which executes when configure() executes. This function takes two arguments: "e_main" and "e_parent" as void*. There are pointers to PIConfig::Entry entries of section "section" and their parent. If there is no parent "e_parent" = 0. Function configure() set three parameters of device: "reopenEnabled", "reopenTimeout" and "threadedReadBufferSize", then execute function configureDevice().
+ Each ancestor of PIIODevice reimlements configureDevice() function to be able to be confured from configuration file. This parameters described at section "Configurable parameters" in the class reference.
+ Usage example:
Implementation example:
There are some virtual functions to describe child class without its declaration.
+ fullPathPrefix() should returns unique prefix of device
+ constructFullPath() should returns full unambiguous string, contains prefix and all device parameters
+ configureFromFullPath() provide configuring device from full unambiguous string without prefix and "://"
+ Macro PIIODEVICE should be used instead of PIOBJECT
+ Macro REGISTER_DEVICE should be used after definition of class, i.e. at the last line of *.cpp file
+
+ If custom I/O device corresponds there rules, it can be returned by function createFromFullPath().
+ Each PIP I/O device has custom unambiguous string description:
+
|
+ +related | +
Service function. useful for configuring devices.
+Function takes entry name "name", default value "def" and two PIConfig::Entry sections: "em" and their parent "ep". If there is no parent ep = 0. If "ep" is not null and entry "name" exists in "ep" function returns this value. Else returns value of entry "name" in section "em" or "def" if entry doesn`t exists.
+ This function useful to read settings from configuration file in implementation PIIODevice::configureDevice() function
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIKbdListener, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Keyboard console input listener. + More...
+
Inheritance diagram for PIKbdListener:+Public Types | |
| enum | SpecialSymbol { + UpArrow = -1, +DownArrow = -2, +RightArrow = -3, +LeftArrow = -4, + + CtrlUpArrow = -5, +CtrlDownArrow = -6, +CtrlRightArrow = -7, +CtrlLeftArrow = -8 + + } |
| Special keyboard keys. More... | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
+Public Member Functions | |
| + | PIKbdListener (KBFunc slot=0, void *data=0) |
| Constructs keyboard listener with external function "slot" and custom data "data". | |
| +void * | data () |
| Returns custom data. | |
| +void | setData (void *_data) |
| Set custom data to "_data". | |
| +void | setSlot (KBFunc slot) |
| Set external function to "slot". | |
| +bool | exitCaptured () const |
| Returns if exit key if awaiting. | |
| +char | exitKey () const |
| Returns exit key, default 'Q'. | |
| +bool | isActive () |
| Returns if keyboard listening is active (not running!) | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Handlers | |
| +void | enableExitCapture (char key) |
| Enable exit key "key" awaiting. | |
| +void | disableExitCapture () |
| Disable exit key awaiting. | |
| +void | setActive (bool yes) |
| Set keyboard listening is active or not. | |
+Events | |
| +void | keyPressed (char key, void *data) |
| Raise on key "key" pressed, "data" is custom data. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Keyboard console input listener.
+This class provide listening of console keyboard input. There is two ways to receive pressed key:
Also there is static variable exiting which by default is set to false. If enableExitCapture() was called and listener was started with function start(), this variable will be set to true if exit key will be pressed. By default exit key is 'Q' = shift + 'q'. To wait for this variable changes to true there is WAIT_FOR_EXIT macro
| enum PIKbdListener::SpecialSymbol | +
Special keyboard keys.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Mutex. + More...
++Public Member Functions | |
| + | PIMutex () |
| Constructs unlocked mutex. | |
| void | lock () |
| Lock mutex. More... | |
| void | unlock () |
| Unlock mutex. More... | |
| bool | tryLock () |
| Try to lock mutex. More... | |
Mutex.
+PIMutex provides synchronization blocks between several threads. Using mutex guarantees execution of some code only one of threads. Mutex contains logic state and functions to change it: lock(), unlock() and tryLock().
+Block of code that should to be executed only one thread simultaniously should to be started with lock() and ended with unlock().
"mutex" in this example is one for all threads.
+
+
|
+ +inline | +
Lock mutex.
+If mutex is unlocked it set to locked state and returns immediate. If mutex is already locked function blocks until mutex will be unlocked
+ +
+
|
+ +inline | +
Unlock mutex.
+In any case this function returns immediate
+ +
+
|
+ +inline | +
Try to lock mutex.
+If mutex is unlocked it set to locked state and returns "true" immediate. If mutex is already locked function returns immediate an returns "false"
+ +|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIObject, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is base class for any classes which use events -> handlers mechanism. + More...
+
Inheritance diagram for PIObject:+Public Member Functions | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Static Public Member Functions | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
+Protected Member Functions | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Related Functions | |
(Note that these are not member functions.) + | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
This is base class for any classes which use events -> handlers mechanism.
+PIObject provide notification mechanism similar Qt but implemented on language capabilities without any special preprocessors or compilers. Any class inherits PIObject should use macro PIOBJECT() immediate after declaration to proper compile.
+Event is a some abstract event that can be raised at any time. Event is a function but declared with special macro EVENT(). To raise event simply execute event function.
+Event handler is a function but declared with special macro EVENT_HANDLER(). You can use event handlers as ordinary functions.
+Main goal of this mechanism is perform abstract connections between various objects. This functionality provide macro CONNECT() which connect some event of first object to some event handler or event of second object. Each event can be connected any times to any event handlers.
+
+Example:
Result:
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIPacketExtractor, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Packets extractor. + More...
+
Inheritance diagram for PIPacketExtractor:+Public Types | |
| enum | SplitMode { + None, +Header, +Footer, +HeaderAndFooter, + + Size, +Timeout + + } |
| Extract algorithms. More... | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
+Public Member Functions | |
| + | PIPacketExtractor (PIIODevice *device_=0, SplitMode mode=None) |
| Contructs extractor with child device "device_" and extract algorithm "mode". | |
| +PIIODevice * | device () |
| Returns child device. | |
| +void | setDevice (PIIODevice *device_) |
| Set child device to "device_". | |
| +int | bufferSize () const |
| Returns buffer size. | |
| +void | setBufferSize (int new_size) |
| Set buffer size to "new_size" bytes, should be at least greater than whole packet size. | |
| +void | setSplitMode (SplitMode mode) |
| Set extract algorithm. | |
| +void | setPayloadSize (int size) |
| Set payload size, used for PIPacketExtractor::Header and PIPacketExtractor::Footer algorithms. | |
| +void | setHeader (const PIByteArray &data) |
| Set header data, used for PIPacketExtractor::Header and PIPacketExtractor::HeaderAndFooter algorithms. | |
| +void | setFooter (const PIByteArray &data) |
| Set footer data, used for PIPacketExtractor::Footer and PIPacketExtractor::HeaderAndFooter algorithms. | |
| +void | setPacketSize (int size) |
| Set packet size, used for PIPacketExtractor::Size algorithm. | |
| +void | setTimeout (double msecs) |
| Set timeout in milliseconds, used for PIPacketExtractor::Timeout algorithm. | |
| +SplitMode | splitMode () const |
| Returns current extract algorithm. | |
| +int | payloadSize () const |
| Returns current payload size, used for PIPacketExtractor::Header and PIPacketExtractor::Footer algorithms. | |
| +PIByteArray | header () const |
| Returns current header data, used for PIPacketExtractor::Header and PIPacketExtractor::HeaderAndFooter algorithms. | |
| +PIByteArray | footer () const |
| Returns current footer data, used for PIPacketExtractor::Footer and PIPacketExtractor::HeaderAndFooter algorithms. | |
| +int | packetSize () const |
| Returns current packet size, used for PIPacketExtractor::Size algorithm. | |
| +double | timeout () const |
| Returns current timeout in milliseconds, used for PIPacketExtractor::Timeout algorithm. | |
| +ullong | missedBytes () const |
| Returns missed by validating functions bytes count. | |
| +const ullong * | missedBytes_ptr () const |
| Returns pointer to missedBytes() count. Useful for output to PIConsole. | |
| +int | read (void *read_to, int max_size) |
| Directly call read() function of child device. | |
| +int | write (const void *data, int max_size) |
| Directly call write() function of child device. | |
| +PIString | constructFullPath () const |
| Reimplement to construct full unambiguous string, describes this device, default returns fullPathPrefix() + "://" + path() | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Protected Member Functions | |
| virtual bool | validateHeader (uchar *src, uchar *rec, int size) |
| Function to validate header. More... | |
| virtual bool | validateFooter (uchar *src, uchar *rec, int size) |
| Function to validate footer. More... | |
| virtual bool | validatePayload (uchar *rec, int size) |
| Function to validate payload. More... | |
Protected Member Functions inherited from PIIODevice | |
| +virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +virtual bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| +virtual bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
| +virtual void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
+Events | |
| +void | packetReceived (uchar *data, int size) |
| Raise on successfull packetValidate() function. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Packets extractor.
+This class implements packet recognition by various algorithms and custom validating from data stream. Stream is formed from child PIIODevice passed from contructor or with function setDevice().
+PIPacketExtractor works with child PIIODevice. read and write functions directly call child device functions. You should start threaded read of extractor (not child device) to proper work. Extractor read data from child device, try to detect packet from readed data and raise packetReceived() event on success.
+There are 6 algorithms:
+
There are three parameters:
Extractor can detect packet with compare your header with readed data. It is default implementation of function packetHeaderValidate(). If header validating passed, function packetValidate() will be called. If either of this function return false extractor shifts by one byte and takes next header. If both functions returns true extractor shifts by whole packet size.
+| enum PIPacketExtractor::SplitMode | +
Extract algorithms.
+| Enumerator | |
|---|---|
| None |
+ No data processing + |
| Header |
+ Detect packets with header() and following payloadSize() + |
| Footer |
+ Detect packets with footer() and leading payloadSize() + |
| HeaderAndFooter |
+ Detect packets with header() and footer() without payloadSize() + |
| Size |
+ Detect packets with packetSize() + |
| Timeout |
+ Wait for first read, then read for timeout() milliseconds + |
+
|
+ +inlineprotectedvirtual | +
Function to validate header.
+| src | Your header content |
| rec | Received header |
| size | Header size |
Default implementation returns by-byte "src" with "rec" compare result
+ +
+
|
+ +inlineprotectedvirtual | +
Function to validate footer.
+| src | Your footer content |
| rec | Received footer |
| size | Footer size |
Default implementation returns by-byte "src" with "rec" compare result
+ +
+
|
+ +inlineprotectedvirtual | +
Function to validate payload.
+| rec | Received payload |
| size | payload size |
Default implementation returns true
+ +|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIProcess, including all inherited members.
+| begin() | PIThread | inlineprivatevirtual |
| className() const | PIObject | inlineprivatevirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inlineprivate |
| debug() const | PIObject | inlineprivate |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprivate |
| end() | PIThread | inlineprivatevirtual |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlineprivatestatic |
| HANDLER | PIObject | related |
| isPropertyExists(const PIString &name) const | PIObject | inlineprivate |
| isRunning() const | PIThread | inlineprivate |
| lock() | PIThread | inlineprivate |
| mutex() | PIThread | inlineprivate |
| name() const | PIObject | inlineprivate |
| needLockRun(bool need) | PIThread | inlineprivate |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | privatestatic |
| piDisconnect(PIObject *src) | PIObject | privatestatic |
| piHigh enum value | PIThread | private |
| piHighest enum value | PIThread | private |
| piLow enum value | PIThread | private |
| piLowerst enum value | PIThread | private |
| piNormal enum value | PIThread | private |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | private |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | private |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | private |
| priority() const | PIThread | inlineprivate |
| Priority enum name | PIThread | private |
| properties() const | PIObject | inlineprivate |
| propertiesCount() const | PIObject | inlineprivate |
| property(const PIString &name) const | PIObject | inlineprivate |
| propertyChanged(const PIString &name) | PIObject | inlineprivatevirtual |
| setData(void *d) | PIThread | inlineprivate |
| setDebug(bool debug) | PIObject | inlineprivate |
| setName(const PIString &name) | PIObject | inlineprivate |
| setPriority(PIThread::Priority prior) | PIThread | private |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inlineprivate |
| setSlot(ThreadFunc func) | PIThread | inlineprivate |
| start(int timer_delay) | PIThread | private |
| start(ThreadFunc func, int timer_delay) | PIThread | inlineprivate |
| started() | PIThread | private |
| startOnce() | PIThread | private |
| startOnce(ThreadFunc func) | PIThread | inlineprivate |
| stop(bool wait) | PIThread | inlineprivate |
| stopped() | PIThread | private |
| superClassName() const | PIObject | inlineprivatevirtual |
| unlock() | PIThread | inlineprivate |
| waitForStart(int timeout_msecs) | PIThread | private |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Inheritance diagram for PIProcess:+Additional Inherited Members | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
events: execStarted(PIString program) execFinished(PIString program, int exit_code)
+handlers: bool exec(const PIString & program) bool exec(const PIString & program, const PIString & arg1) bool exec(const PIString & program, const PIString & arg1, const PIString & arg2) bool exec(const PIString & program, const PIString & arg1, const PIString & arg2, const PIString & arg3) bool exec(const PIString & program, const PIStringList & args) void terminate() bool waitForFinish(int timeout_msecs = 60000)
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIProtocol, including all inherited members.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Inheritance diagram for PIProtocol:+Public Types | |
| enum | Quality { + Unknown = 1, +Failure = 2, +Bad = 3, +Average = 4, + + Good = 5 + + } |
| Connection quality. More... | |
+Public Member Functions | |
| + | PIProtocol () |
| Contructs an empty unconfigured protocol. | |
| + | PIProtocol (const PIString &config, const PIString &name, void *recHeaderPtr=0, int recHeaderSize=0, void *recDataPtr=0, int recDataSize=0, void *sendDataPtr=0, int sendDataSize=0) |
| Contructs protocol configured from file "config", config file section "name". | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
events: void receiverStarted() void receiverStopped() void senderStarted() void senderStopped() void received(bool validate_is_ok) void qualityChanged(PIProtocol::Quality old_quality, PIProtocol::Quality new_quality)
+handlers: void startReceive(float exp_frequency = -1.f) void stopReceive() void startSend(float frequency = -1.f) void stopSend() void start() void stop() void send() void send(const void * data, int size, bool direct = false)
+| enum PIProtocol::Quality | +
Connection quality.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PISerial, including all inherited members.
+| className() const | PIObject | inlinevirtual |
| closeDevice() | PISerial | protectedvirtual |
| configureDevice(const void *e_main, const void *e_parent=0) | PISerial | protectedvirtual |
| configureFromFullPath(const PIString &full_path) | PISerial | protectedvirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| fullPathPrefix() const | PISerial | inlineprotectedvirtual |
| HANDLER | PIObject | related |
| init() | PIIODevice | inlineprotectedvirtual |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| openDevice() | PISerial | protectedvirtual |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| PIIODEVICE | PIIODevice | related |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| readDeviceSetting(const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) | PIIODevice | related |
| received(const void *data, int size) | PISerial | inlineprotectedvirtual |
| REGISTER_DEVICE | PIIODevice | related |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| PIThread::start(int timer_delay) | PIThread | |
| PIThread::start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| threadedRead(uchar *readed, int size) | PIIODevice | inlineprotectedvirtual |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
| write(const void *data, int max_size) | PISerial | inlineprotectedvirtual |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Serial device. + More...
+
Inheritance diagram for PISerial:+Protected Member Functions | |
| +PIString | fullPathPrefix () const |
| Reimplement to construct full unambiguous string prefix. Creating devices by unambiguous string. | |
| +void | configureFromFullPath (const PIString &full_path) |
| Reimplement to configure your device with parameters of full unambiguous string. Default implementation does nothing. | |
| +bool | configureDevice (const void *e_main, const void *e_parent=0) |
| Reimplement to configure device from entries "e_main" and "e_parent", cast arguments to PIConfig::Entry*. | |
| +int | write (const void *data, int max_size) |
| Reimplement this function to write to your device. | |
| +virtual void | received (const void *data, int size) |
| Executes when any read function was successful. Default implementation does nothing. | |
| +bool | openDevice () |
| Reimplement to open device, return value will be set to "opened_" variable. | |
| +bool | closeDevice () |
| Reimplement to close device, inverse return value will be set to "opened_" variable. | |
Protected Member Functions inherited from PIIODevice | |
| +virtual bool | init () |
| Function executed before first openDevice() or from constructor. | |
| +virtual bool | threadedRead (uchar *readed, int size) |
| Function executed when thread read some data, default implementation execute external slot "ret_func_". | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Additional Inherited Members | |
Public Types inherited from PIThread | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
Public Member Functions inherited from PIThread | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIIODevice | |
| template<typename T > | |
| T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep) |
| Service function. useful for configuring devices. More... | |
| +#define | REGISTER_DEVICE(class) |
| Use this macro to enable automatic creation instances of your class with createFromFullPath() function. | |
| +#define | PIIODEVICE(class) |
| Use this macro instead of PIOBJECT when describe your own PIIODevice. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PISet< T >, including all inherited members.
+| operator[](const T &t) const | PISet< T > | inline |
| PISet() | PISet< T > | inline |
| PISet(const T &value) | PISet< T > | inline |
| PISet(const T &v0, const T &v1) | PISet< T > | inline |
| PISet(const T &v0, const T &v1, const T &v2) | PISet< T > | inline |
| PISet(const T &v0, const T &v1, const T &v2, const T &v3) | PISet< T > | inline |
| remove(const T &t) | PISet< T > | inline |
| toVector() const | PISet< T > | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Set of any type. + More...
+ +Inherits PIMap< Key, T >.
++Public Member Functions | |
| + | PISet () |
| Contructs an empty set. | |
| + | PISet (const T &value) |
| Contructs set with one element "value". | |
| + | PISet (const T &v0, const T &v1) |
| Contructs set with elements "v0" and "v1". | |
| + | PISet (const T &v0, const T &v1, const T &v2) |
| Contructs set with elements "v0", "v1" and "v2". | |
| + | PISet (const T &v0, const T &v1, const T &v2, const T &v3) |
| Contructs set with elements "v0", "v1", "v2" and "v3". | |
| +bool | operator[] (const T &t) const |
| Returns if element "t" exists in this set. | |
| +PISet< T > & | remove (const T &t) |
| Returns if element "t" exists in this set. | |
| +PIVector< T > | toVector () const |
| Returns content of set as PIVector. | |
Set of any type.
+This class used to store collection of unique elements of any type. You can only add values to set with operator<< or with function insert(). You can discover if value already in set with operator[] or with function find(). These function has logarithmic complexity.
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIStateMachine< Type >, including all inherited members.
+| addRule(Type from, Type to, const PIString &condition, Handler handler=0, bool autoTransition=false, bool resetAllConditions=false) | PIStateMachine< Type > | inline |
| addRule(Type from, Type to, Handler handler, bool autoTransition=false, bool resetAllConditions=false) | PIStateMachine< Type > | inline |
| addRule(Type from, Type to, const PIStringList &conditions=PIStringList(), Handler handler=0, bool autoTransition=false, bool resetAllConditions=false) | PIStateMachine< Type > | inline |
| addRule(const Rule &rule) | PIStateMachine< Type > | inline |
| addState(Type value, const PIString &name="", Handler handler=0) | PIStateMachine< Type > | inline |
| className() const | PIObject | inlinevirtual |
| clearRules() | PIStateMachine< Type > | inline |
| clearStates() | PIStateMachine< Type > | inline |
| Condition typedef | PIStateMachine< Type > | |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| currentConditions() const | PIStateMachine< Type > | inline |
| currentState() const | PIStateMachine< Type > | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| execution(const State &state) | PIStateMachine< Type > | inlineprotectedvirtual |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| name() const | PIObject | inline |
| performCondition(const PIString &name, int times=1) | PIStateMachine< Type > | inline |
| performConditions(const PIStringList &names) | PIStateMachine< Type > | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| PIStateMachine(void *_parent=0) | PIStateMachine< Type > | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| reset() | PIStateMachine< Type > | inline |
| resetCondition(const PIString &name) | PIStateMachine< Type > | inline |
| resetConditions() | PIStateMachine< Type > | inline |
| rulesCount() const | PIStateMachine< Type > | inline |
| setDebug(bool debug) | PIObject | inline |
| setInitialState(Type value) | PIStateMachine< Type > | inline |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| statesCount() const | PIStateMachine< Type > | inline |
| superClassName() const | PIObject | inlinevirtual |
| switchToState(Type to) | PIStateMachine< Type > | inline |
| tick() | PIStateMachine< Type > | inline |
| tick(void *data, int delim) | PIStateMachine< Type > | inline |
| transition(const State &from, const State &to) | PIStateMachine< Type > | inlineprotectedvirtual |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Base class for custom state machine. + More...
+
Inheritance diagram for PIStateMachine< Type >:+Classes | |
| struct | Rule |
| Rule of transition between states of machine More... | |
| struct | State |
| State of machine More... | |
+Public Types | |
| +typedef PIPair< PIString, int > | Condition |
| Condition is a pair (string, number) | |
+Public Member Functions | |
| + | PIStateMachine (void *_parent=0) |
| Constructs an empty state machine. | |
| +void | addState (Type value, const PIString &name="", Handler handler=0) |
| Add state of machine. | |
| +int | statesCount () const |
| States count. | |
| +void | clearStates () |
| Remove all states. | |
| +void | addRule (Type from, Type to, const PIString &condition, Handler handler=0, bool autoTransition=false, bool resetAllConditions=false) |
| Add rule of transition. | |
| +void | addRule (Type from, Type to, Handler handler, bool autoTransition=false, bool resetAllConditions=false) |
| Add rule of transition. | |
| +void | addRule (Type from, Type to, const PIStringList &conditions=PIStringList(), Handler handler=0, bool autoTransition=false, bool resetAllConditions=false) |
| Add rule of transition. | |
| +void | addRule (const Rule &rule) |
| Add rule of transition. | |
| +int | rulesCount () const |
| Rules count. | |
| +void | clearRules () |
| Remove all rules. | |
| +void | setInitialState (Type value) |
| Setup initial state. reset() will set machine state to "value". | |
| bool | switchToState (Type to) |
| Try to switch machine state to state "to". More... | |
| +void | reset () |
| Reset machine state to initial and clear all conditions. | |
| +const State & | currentState () const |
| Returns current state of machine. | |
| +void | resetConditions () |
| Reset all performed conditions. | |
| +void | resetCondition (const PIString &name) |
| Reset performed condition with name "name". | |
| +void | performCondition (const PIString &name, int times=1) |
| Perform condition with name "name" "times" times. | |
| +void | performConditions (const PIStringList &names) |
| Perform every condition with name from "names" one time. | |
| +const PIVector< Condition > & | currentConditions () const |
| Returns all current performed conditions. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Protected Member Functions | |
| +virtual void | execution (const State &state) |
| Reimplement this function to process current state of machine. | |
| +virtual void | transition (const State &from, const State &to) |
| Reimplement this function to process switching current state of machine. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Handlers | |
| +void | tick () |
| Main function of machine. Execute execution() and check if need to switch state. | |
| +void | tick (void *data, int delim) |
| Main function of machine. Execute execution() and check if need to switch state. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Base class for custom state machine.
+This class provide functionality of state machine. You should inherit from this class, implement execution() and transition() functions, set rules and periodically call tick() function to proper work of machine.
+State machine operates with "state", "rule" and "condition".
int), associated name and optional "handler" - pointer to function executed on every tick();First of all you should define states of your machine by function addState(). Then you should define transition rules for machine by function addRule(). Finally you can set initial state by function setInitialState() and provide periodically execution of function tick().
+At any time the state machine is in some state. You can ask machine to enter in new state by function switchToState(). If all conditions done machine switch it state immediately, else machine remember request and will be try switch to the new state every tick. Successfull state switching execute function transition(), every tick execute function execution() with current state. On successfull transition if rule "handler" is not null it execute. Every tick() if current state "handler" is not null it execute.
+Each rule has transition condition. Condition is array of pairs (string, number). It means that every condition by name "string" should be performed as least "number" times. Empty condition always permits transition.
+State machine have current performed conditions. You can read this conditions by function currentConditions() and perform new conditions by functions performCondition() and performConditions(). Currend conditions can de erased by function resetConditions().
+This is simple example demonstrates all features:
+
|
+ +inline | +
Try to switch machine state to state "to".
+If there is rule of transition exists and this rule conditions is performed then machine switched to new state immediately. Otherwise machine will be try to enter to new state every tick().
true if state switched immediately, otherwise false |
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIString, including all inherited members.
+| append(const PIString &str) | PIString | inline |
| cutLeft(const int len) | PIString | inline |
| cutMid(const int start, const int len) | PIString | |
| cutRight(const int len) | PIString | inline |
| data() const | PIString | |
| endsWith(const PIString &str) const | PIString | |
| expandLeftTo(const int len, const PIChar &c) | PIString | inline |
| expandRightTo(const int len, const PIChar &c) | PIString | inline |
| find(const char str, const int start=0) const | PIString | |
| find(const PIString str, const int start=0) const | PIString | |
| find(const char *str, const int start=0) const | PIString | inline |
| find(const string str, const int start=0) const | PIString | inline |
| findCWord(const PIString &word, const int start=0) const | PIString | |
| findLast(const char str, const int start=0) const | PIString | |
| findLast(const PIString str, const int start=0) const | PIString | |
| findLast(const char *str, const int start=0) const | PIString | inline |
| findLast(const string str, const int start=0) const | PIString | inline |
| findWord(const PIString &word, const int start=0) const | PIString | |
| fromBool(const bool value) | PIString | inlinestatic |
| fromNumber(const short value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const ushort value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const int value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const uint value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const long value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const ulong value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const llong &value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const ullong &value, int base=10, bool *ok=0) | PIString | inlinestatic |
| fromNumber(const float value) | PIString | inlinestatic |
| fromNumber(const double &value) | PIString | inlinestatic |
| fromNumber(const ldouble &value) | PIString | inlinestatic |
| insert(const int index, const PIChar &c) | PIString | inline |
| insert(const int index, const char &c) | PIString | inline |
| insert(const int index, const PIString &str) | PIString | |
| insert(const int index, const char *c) | PIString | inline |
| isEmpty() const | PIString | inline |
| left(const int len) const | PIString | inline |
| length() const | PIString | inline |
| lengthAscii() const | PIString | |
| mid(const int start, const int len=-1) const | PIString | |
| operator const char *() | PIString | inline |
| operator const string() | PIString | inline |
| operator!=(const PIString &str) const | PIString | |
| operator!=(const PIChar c) const | PIString | inline |
| operator!=(const char *str) const | PIString | inline |
| operator!=(const string &str) const | PIString | inline |
| operator+(const PIString &str, const PIString &f) | PIString | related |
| operator+(const PIString &f, const char *str) | PIString | related |
| operator+(const PIString &f, const string &str) | PIString | related |
| operator+(const char *str, const PIString &f) | PIString | related |
| operator+(const string &str, const PIString &f) | PIString | related |
| operator<(const PIString &str) const | PIString | |
| operator<(const PIChar c) const | PIString | inline |
| operator<(const char *str) const | PIString | inline |
| operator<(const string &str) const | PIString | inline |
| operator<<(const PIString &str) | PIString | inline |
| operator<<(const PIChar &c) | PIString | inline |
| operator<<(const char *str) | PIString | inline |
| operator<<(const wchar_t *str) | PIString | inline |
| operator<<(const string &str) | PIString | inline |
| operator<<(const int &num) | PIString | inline |
| operator<<(const short &num) | PIString | inline |
| operator<<(const long &num) | PIString | inline |
| operator<<(const float &num) | PIString | inline |
| operator<<(const double &num) | PIString | inline |
| operator<<(std::ostream &s, const PIString &v) | PIString | related |
| operator<=(const PIString &str) const | PIString | inline |
| operator<=(const PIChar c) const | PIString | inline |
| operator<=(const char *str) const | PIString | inline |
| operator<=(const string &str) const | PIString | inline |
| operator==(const PIString &str) const | PIString | |
| operator==(const PIChar c) const | PIString | inline |
| operator==(const char *str) const | PIString | inline |
| operator==(const string &str) const | PIString | inline |
| operator>(const PIString &str) const | PIString | |
| operator>(const PIChar c) const | PIString | inline |
| operator>(const char *str) const | PIString | inline |
| operator>(const string &str) const | PIString | inline |
| operator>=(const PIString &str) const | PIString | inline |
| operator>=(const PIChar c) const | PIString | inline |
| operator>=(const char *str) const | PIString | inline |
| operator>=(const string &str) const | PIString | inline |
| operator>>(std::istream &s, PIString &v) | PIString | related |
| operator[](const int pos) const | PIString | inline |
| operator[](const int pos) | PIString | inline |
| PIString() | PIString | inline |
| PIString(const PIChar &c) | PIString | inline |
| PIString(const char *str) | PIString | inline |
| PIString(const wchar_t *str) | PIString | inline |
| PIString(const string &str) | PIString | inline |
| PIString(const PIByteArray &ba) | PIString | inline |
| PIString(const PIChar *str, const int len) | PIString | inline |
| PIString(const char *str, const int len) | PIString | inline |
| PIString(const int len, const char c) | PIString | inline |
| PIString(const int len, const PIChar &c) | PIString | inline |
| prepend(const PIString &str) | PIString | inline |
| readableSize(llong bytes) | PIString | inlinestatic |
| repeat(int times) | PIString | inline |
| repeated(int times) const | PIString | inline |
| replace(const int from, const int count, const PIString &with) | PIString | |
| replace(const PIString &what, const PIString &with, bool *ok=0) | PIString | |
| replaceAll(const PIString &what, const PIString &with) | PIString | |
| replaced(const int from, const int count, const PIString &with) const | PIString | inline |
| replaced(const PIString &what, const PIString &with, bool *ok=0) const | PIString | inline |
| reverse() | PIString | inline |
| reversed() const | PIString | inline |
| right(const int len) const | PIString | inline |
| setNumber(const short value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const ushort value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const int value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const uint value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const long value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const ulong value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const llong &value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const ullong &value, int base=10, bool *ok=0) | PIString | inline |
| setNumber(const float value) | PIString | inline |
| setNumber(const double &value) | PIString | inline |
| setNumber(const ldouble &value) | PIString | inline |
| setReadableSize(llong bytes) | PIString | |
| split(const PIString &delim) const | PIString | |
| startsWith(const PIString &str) const | PIString | |
| stdString() const | PIString | inline |
| takeCWord() | PIString | |
| takeLeft(const int len) | PIString | inline |
| takeLine() | PIString | |
| takeMid(const int start, const int len=-1) | PIString | inline |
| takeNumber() | PIString | |
| takeRange(const PIChar &start, const PIChar &end, const PIChar &shield= '\\') | PIString | |
| takeRight(const int len) | PIString | inline |
| takeSymbol() | PIString | |
| takeWord() | PIString | |
| toBool() const | PIString | inline |
| toByteArray() const | PIString | inline |
| toChar() const | PIString | |
| toDouble() const | PIString | inline |
| toFloat() const | PIString | inline |
| toInt(int base=-1, bool *ok=0) const | PIString | inline |
| toLDouble() const | PIString | inline |
| toLLong(int base=-1, bool *ok=0) const | PIString | inline |
| toLong(int base=-1, bool *ok=0) const | PIString | inline |
| toLowerCase() const | PIString | |
| toShort(int base=-1, bool *ok=0) const | PIString | inline |
| toUInt(int base=-1, bool *ok=0) const | PIString | inline |
| toULLong(int base=-1, bool *ok=0) const | PIString | inline |
| toULong(int base=-1, bool *ok=0) const | PIString | inline |
| toUpperCase() const | PIString | |
| toUShort(int base=-1, bool *ok=0) const | PIString | inline |
| trim() | PIString | |
| trimmed() const | PIString |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
String class. + More...
+ +Inherits PIDeque< T >.
++Public Member Functions | |
| + | PIString () |
| Contructs an empty string. | |
| + | PIString (const PIChar &c) |
| Contructs string with single symbol "c". | |
| PIString (const char *str) | |
| Contructs string from c-string "str". More... | |
| PIString (const wchar_t *str) | |
Contructs string from wchar_t c-string "str". More... | |
| + | PIString (const string &str) |
| Contructs string from std::string "str". | |
| + | PIString (const PIByteArray &ba) |
| Contructs string from byte array "ba". | |
| + | PIString (const PIChar *str, const int len) |
| Contructs string from "len" characters of buffer "str". | |
| PIString (const char *str, const int len) | |
| Contructs string from "len" characters of buffer "str". More... | |
| PIString (const int len, const char c) | |
| Contructs string as sequence of characters "c" of buffer with length "len". More... | |
| PIString (const int len, const PIChar &c) | |
| Contructs string as sequence of symbols "c" of buffer with length "len". More... | |
| operator const char * () | |
| Return c-string representation of string. More... | |
| + | operator const string () |
| Return std::string representation of string. | |
| +PIChar | operator[] (const int pos) const |
| Return symbol at index "pos". | |
| +PIChar & | operator[] (const int pos) |
| Return reference to symbol at index "pos". | |
| +bool | operator== (const PIString &str) const |
| Compare operator. | |
| +bool | operator== (const PIChar c) const |
| Compare operator. | |
| +bool | operator== (const char *str) const |
| Compare operator. | |
| +bool | operator== (const string &str) const |
| Compare operator. | |
| +bool | operator!= (const PIString &str) const |
| Compare operator. | |
| +bool | operator!= (const PIChar c) const |
| Compare operator. | |
| +bool | operator!= (const char *str) const |
| Compare operator. | |
| +bool | operator!= (const string &str) const |
| Compare operator. | |
| +bool | operator< (const PIString &str) const |
| Compare operator. | |
| +bool | operator< (const PIChar c) const |
| Compare operator. | |
| +bool | operator< (const char *str) const |
| Compare operator. | |
| +bool | operator< (const string &str) const |
| Compare operator. | |
| +bool | operator> (const PIString &str) const |
| Compare operator. | |
| +bool | operator> (const PIChar c) const |
| Compare operator. | |
| +bool | operator> (const char *str) const |
| Compare operator. | |
| +bool | operator> (const string &str) const |
| Compare operator. | |
| +bool | operator<= (const PIString &str) const |
| Compare operator. | |
| +bool | operator<= (const PIChar c) const |
| Compare operator. | |
| +bool | operator<= (const char *str) const |
| Compare operator. | |
| +bool | operator<= (const string &str) const |
| Compare operator. | |
| +bool | operator>= (const PIString &str) const |
| Compare operator. | |
| +bool | operator>= (const PIChar c) const |
| Compare operator. | |
| +bool | operator>= (const char *str) const |
| Compare operator. | |
| +bool | operator>= (const string &str) const |
| Compare operator. | |
| PIString & | operator<< (const PIString &str) |
| Append string "str" at the end of string. More... | |
| PIString & | operator<< (const PIChar &c) |
| Append symbol "c" at the end of string. More... | |
| PIString & | operator<< (const char *str) |
| Append c-string "str" at the end of string. More... | |
| PIString & | operator<< (const wchar_t *str) |
Append wchar_t c-string "str" at the end of string. More... | |
| +PIString & | operator<< (const string &str) |
| Append std::string "str" at the end of string. | |
| PIString & | operator<< (const int &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const short &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const long &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const float &num) |
| Append string representation of "num" at the end of string. More... | |
| PIString & | operator<< (const double &num) |
| Append string representation of "num" at the end of string. More... | |
| +PIString & | prepend (const PIString &str) |
| Insert string "str" at the begin of string. | |
| +PIString & | append (const PIString &str) |
| Insert string "str" at the end of string. | |
| PIString | mid (const int start, const int len=-1) const |
| Return part of string from symbol at index "start" and maximum length "len". More... | |
| PIString | left (const int len) const |
| Return part of string from left and maximum length "len". More... | |
| PIString | right (const int len) const |
| Return part of string from right and maximum length "len". More... | |
| PIString & | cutMid (const int start, const int len) |
| Remove part of string from symbol as index "start" and maximum length "len" and return this string. More... | |
| PIString & | cutLeft (const int len) |
| Remove part of string from left and maximum length "len" and return this string. More... | |
| PIString & | cutRight (const int len) |
| Remove part of string from right and maximum length "len" and return this string. More... | |
| PIString & | trim () |
| Remove spaces at the start and at the end of string and return this string. More... | |
| PIString | trimmed () const |
| Return copy of this string without spaces at the start and at the end. More... | |
| PIString & | replace (const int from, const int count, const PIString &with) |
| Replace part of string from index "from" and maximum length "len" with string "with" and return this string. More... | |
| PIString | replaced (const int from, const int count, const PIString &with) const |
| Replace part copy of this string from index "from" and maximum length "len" with string "with" and return copied string. More... | |
| PIString & | replace (const PIString &what, const PIString &with, bool *ok=0) |
| Replace first founded substring "what" with string "with" and return this string. More... | |
| PIString | replaced (const PIString &what, const PIString &with, bool *ok=0) const |
| Replace first founded substring "what" with string "with" and return copied string. More... | |
| PIString & | replaceAll (const PIString &what, const PIString &with) |
| Replace all founded substrings "what" with strings "with" and return this string. More... | |
| PIString & | repeat (int times) |
| Repeat content of string "times" times and return this string. More... | |
| PIString | repeated (int times) const |
| Returns repeated "times" times string. More... | |
| PIString & | insert (const int index, const PIChar &c) |
| Insert symbol "c" after index "index" and return this string. More... | |
| PIString & | insert (const int index, const char &c) |
| Insert symbol "c" after index "index" and return this string. More... | |
| PIString & | insert (const int index, const PIString &str) |
| Insert string "str" after index "index" and return this string. More... | |
| PIString & | insert (const int index, const char *c) |
| Insert string "str" after index "index" and return this string. More... | |
| PIString & | expandRightTo (const int len, const PIChar &c) |
| Enlarge string to length "len" by addition sequence of symbols "c" at the end of string, and return this string. More... | |
| PIString & | expandLeftTo (const int len, const PIChar &c) |
| Enlarge string to length "len" by addition sequence of symbols "c" at the beginning of string, and return this string. More... | |
| PIString & | reverse () |
| Reverse string and return this string. More... | |
| PIString | reversed () const |
| Reverse copy of this string and return it. More... | |
| PIString | takeMid (const int start, const int len=-1) |
| Take a part of string from symbol at index "start" and maximum length "len" and return it. More... | |
| PIString | takeLeft (const int len) |
| Take a part from the begin of string with maximum length "len" and return it. More... | |
| PIString | takeRight (const int len) |
| Take a part from the end of string with maximum length "len" and return it. More... | |
| PIString | takeSymbol () |
| Take a symbol from the begin of this string and return it. More... | |
| PIString | takeWord () |
| Take a word from the begin of this string and return it. More... | |
| PIString | takeCWord () |
| Take a word with letters, numbers and '_' symbols from the begin of this string and return it. More... | |
| PIString | takeLine () |
| Take a line from the begin of this string and return it. More... | |
| PIString | takeNumber () |
| Take a number with C-format from the begin of this string and return it. More... | |
| PIString | takeRange (const PIChar &start, const PIChar &end, const PIChar &shield= '\\') |
| Take a range between "start" and "end" symbols from the begin of this string and return it. More... | |
| int | lengthAscii () const |
| Return real bytes count of this string. More... | |
| const char * | data () const |
Return char * representation of this string. More... | |
| +std::string | stdString () const |
Return std::string representation of this string. | |
| +PIByteArray | toByteArray () const |
| Return PIByteArray contains data() of this string. | |
| PIStringList | split (const PIString &delim) const |
| Split string with delimiter "delim" to PIStringList and return it. More... | |
| +PIString | toUpperCase () const |
| Convert each symbol in copyed string to upper case and return it. | |
| +PIString | toLowerCase () const |
| Convert each symbol in copyed string to lower case and return it. | |
| int | find (const char str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | find (const PIString str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | find (const char *str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | find (const string str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return first occur position. More... | |
| int | findLast (const char str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findLast (const PIString str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findLast (const char *str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findLast (const string str, const int start=0) const |
| Search substring "str" from symbol at index "start" and return last occur position. More... | |
| int | findWord (const PIString &word, const int start=0) const |
| Search word "word" from symbol at index "start" and return first occur position. More... | |
| int | findCWord (const PIString &word, const int start=0) const |
| Search C-style word "word" from symbol at index "start" and return first occur position. More... | |
| +bool | startsWith (const PIString &str) const |
| Return if string starts with "str". | |
| +bool | endsWith (const PIString &str) const |
| Return if string ends with "str". | |
| +int | length () const |
| Return symbols length of string. | |
| +bool | isEmpty () const |
Return true if string is empty, i.e. length = 0. | |
| +bool | toBool () const |
Return true if string equal "true", "yes", "on" or positive not null numeric value. | |
| +char | toChar () const |
Return char numeric value of string. | |
| short | toShort (int base=-1, bool *ok=0) const |
Return short numeric value of string in base "base". More... | |
| ushort | toUShort (int base=-1, bool *ok=0) const |
Return ushort numeric value of string in base "base". More... | |
| int | toInt (int base=-1, bool *ok=0) const |
Return int numeric value of string in base "base". More... | |
| uint | toUInt (int base=-1, bool *ok=0) const |
Return uint numeric value of string in base "base". More... | |
| long | toLong (int base=-1, bool *ok=0) const |
Return long numeric value of string in base "base". More... | |
| ulong | toULong (int base=-1, bool *ok=0) const |
Return ulong numeric value of string in base "base". More... | |
| llong | toLLong (int base=-1, bool *ok=0) const |
Return llong numeric value of string in base "base". More... | |
| ullong | toULLong (int base=-1, bool *ok=0) const |
Return ullong numeric value of string in base "base". More... | |
| float | toFloat () const |
Return float numeric value of string. More... | |
| double | toDouble () const |
Return double numeric value of string. More... | |
| ldouble | toLDouble () const |
Return ldouble numeric value of string. More... | |
| PIString & | setNumber (const short value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const ushort value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const int value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const uint value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const long value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const ulong value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const llong &value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const ullong &value, int base=10, bool *ok=0) |
| Set string content to numeric representation of "value" in base "base". More... | |
| PIString & | setNumber (const float value) |
| Set string content to numeric representation of "value". More... | |
| PIString & | setNumber (const double &value) |
| Set string content to numeric representation of "value". More... | |
| PIString & | setNumber (const ldouble &value) |
| Set string content to numeric representation of "value". More... | |
| PIString & | setReadableSize (llong bytes) |
| Set string content to human readable size in B/kB/MB/GB/TB. More... | |
+Static Public Member Functions | |
| static PIString | fromNumber (const short value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const ushort value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const int value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const uint value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const long value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const ulong value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const llong &value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const ullong &value, int base=10, bool *ok=0) |
| Return string contains numeric representation of "value" in base "base". More... | |
| static PIString | fromNumber (const float value) |
| Return string contains numeric representation of "value". More... | |
| static PIString | fromNumber (const double &value) |
| Return string contains numeric representation of "value". More... | |
| static PIString | fromNumber (const ldouble &value) |
| Return string contains numeric representation of "value". More... | |
| +static PIString | fromBool (const bool value) |
| Return "true" or "false". | |
| static PIString | readableSize (llong bytes) |
| Return string contains human readable size in B/kB/MB/GB/TB. More... | |
+Related Functions | |
(Note that these are not member functions.) + | |
| +std::ostream & | operator<< (std::ostream &s, const PIString &v) |
| Output operator to std::ostream (cout) | |
| +std::istream & | operator>> (std::istream &s, PIString &v) |
| Input operator from std::istream (cin) | |
| +PIString | operator+ (const PIString &str, const PIString &f) |
| Return concatenated string. | |
| +PIString | operator+ (const PIString &f, const char *str) |
| Return concatenated string. | |
| +PIString | operator+ (const PIString &f, const string &str) |
| Return concatenated string. | |
| +PIString | operator+ (const char *str, const PIString &f) |
| Return concatenated string. | |
| +PIString | operator+ (const string &str, const PIString &f) |
| Return concatenated string. | |
String class.
+PIP use this class for use string information.
+This class based on PIVector to store information. String is a sequence of PIChar and can contain multibyte symbols. Therefore real memory size of string is symbols count * 4. String can be constucted from many types of data and can be converted to many types. There are man operators and handly functions to use string as you wish.
+Most common constructor is PIString(const char * str), where "str" is null-terminated string, e.g. "string". This is 7 chars with last char = 0. Also you can constructs PIString from single PIChar, PIByteArray, other PIString or sequency of the same characters with custom length.
+
+This class has implicit conversions to const char * and std::string. Also there are functions to make same convertions:
const char * ,std::string,You can get symbolic representation of any numeric value with function setNumber(any integer value, int base = 10, bool * ok = 0). Default arguments are set for decimal base system, but you can choose any system from 2 to 40. There are the same static functions fromNumber(), that returns PIString.
+Also there is function setReadableSize() which is set human-readable size in bytes, Kb, Mb, Gb or Pb. Static analog is readableSize().
+
|
+ +inline | +
Contructs string from c-string "str".
+"str" should be null-terminated
+Example:
+
|
+ +inline | +
Contructs string from wchar_t c-string "str".
"str" should be null-terminated
+Example:
+
|
+ +inline | +
Contructs string from "len" characters of buffer "str".
+Example:
+
|
+ +inline | +
Contructs string as sequence of characters "c" of buffer with length "len".
+Example:
+
|
+ +inline | +
Contructs string as sequence of symbols "c" of buffer with length "len".
+Example:
+
|
+ +inline | +
Return c-string representation of string.
+Converts content of string to c-string and return pointer to first char. This buffer is valid until new convertion or execution data() or toByteArray().
+Example:
Append string "str" at the end of string.
+Example:
+
|
+ +inline | +
Append c-string "str" at the end of string.
+Example:
+
|
+ +inline | +
Append wchar_t c-string "str" at the end of string.
Example:
+
|
+ +inline | +
Append string representation of "num" at the end of string.
+Example:
+
|
+ +inline | +
Append string representation of "num" at the end of string.
+Example:
+
|
+ +inline | +
Append string representation of "num" at the end of string.
+Example:
+
|
+ +inline | +
Append string representation of "num" at the end of string.
+Example:
+
|
+ +inline | +
Append string representation of "num" at the end of string.
+Example:
| PIString PIString::mid | +( | +const int | +start, | +
| + | + | const int | +len = -1 |
+
| + | ) | +const | +
Return part of string from symbol at index "start" and maximum length "len".
+All variants demonstrated in example:
+
|
+ +inline | +
+
|
+ +inline | +
| PIString & PIString::cutMid | +( | +const int | +start, | +
| + | + | const int | +len | +
| + | ) | ++ |
Remove part of string from symbol as index "start" and maximum length "len" and return this string.
+All variants demonstrated in example:
+
|
+ +inline | +
+
|
+ +inline | +
| PIString & PIString::trim | +( | +) | ++ |
| PIString PIString::trimmed | +( | +) | +const | +
| PIString & PIString::replace | +( | +const int | +from, | +
| + | + | const int | +count, | +
| + | + | const PIString & | +with | +
| + | ) | ++ |
Replace part of string from index "from" and maximum length "len" with string "with" and return this string.
+Example:
+
|
+ +inline | +
Replace part copy of this string from index "from" and maximum length "len" with string "with" and return copied string.
+Example:
| PIString & PIString::replace | +( | +const PIString & | +what, | +
| + | + | const PIString & | +with, | +
| + | + | bool * | +ok = 0 |
+
| + | ) | ++ |
Replace first founded substring "what" with string "with" and return this string.
+If "ok" is not null, it set to "true" if something was replaced
+Example:
+
|
+ +inline | +
Replace first founded substring "what" with string "with" and return copied string.
+If "ok" is not null, it set to "true" if something was replaced
+Example:
| PIString & PIString::replaceAll | +( | +const PIString & | +what, | +
| + | + | const PIString & | +with | +
| + | ) | ++ |
Replace all founded substrings "what" with strings "with" and return this string.
+Example:
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Enlarge string to length "len" by addition sequence of symbols "c" at the end of string, and return this string.
+Example:
+
|
+ +inline | +
Enlarge string to length "len" by addition sequence of symbols "c" at the beginning of string, and return this string.
+Example:
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Take a part of string from symbol at index "start" and maximum length "len" and return it.
+Example:
+
|
+ +inline | +
Take a part from the begin of string with maximum length "len" and return it.
+Example:
+
|
+ +inline | +
Take a part from the end of string with maximum length "len" and return it.
+Example:
| PIString PIString::takeSymbol | +( | +) | ++ |
Take a symbol from the begin of this string and return it.
+Example:
| PIString PIString::takeWord | +( | +) | ++ |
Take a word from the begin of this string and return it.
+Example:
| PIString PIString::takeCWord | +( | +) | ++ |
Take a word with letters, numbers and '_' symbols from the begin of this string and return it.
+Example:
| PIString PIString::takeLine | +( | +) | ++ |
Take a line from the begin of this string and return it.
+Example:
| PIString PIString::takeNumber | +( | +) | ++ |
Take a number with C-format from the begin of this string and return it.
+Example:
| PIString PIString::takeRange | +( | +const PIChar & | +start, | +
| + | + | const PIChar & | +end, | +
| + | + | const PIChar & | +shield = '\\' |
+
| + | ) | ++ |
Take a range between "start" and "end" symbols from the begin of this string and return it.
+"Shield" symbol prevent analysis of the next symbol. Example:
| int PIString::lengthAscii | +( | +) | +const | +
| const char * PIString::data | +( | +) | +const | +
Return char * representation of this string.
This function fill buffer by sequence of chars. Minimum length of this buffer is count of symbols. Returned char * is valid until next execution of this function.
+Example:
| PIStringList PIString::split | +( | +const PIString & | +delim | ) | +const | +
Split string with delimiter "delim" to PIStringList and return it.
+Example:
+| int PIString::find | +( | +const char | +str, | +
| + | + | const int | +start = 0 |
+
| + | ) | +const | +
| int PIString::find | +( | +const PIString | +str, | +
| + | + | const int | +start = 0 |
+
| + | ) | +const | +
+
|
+ +inline | +
+
|
+ +inline | +
| int PIString::findLast | +( | +const char | +str, | +
| + | + | const int | +start = 0 |
+
| + | ) | +const | +
| int PIString::findLast | +( | +const PIString | +str, | +
| + | + | const int | +start = 0 |
+
| + | ) | +const | +
+
|
+ +inline | +
+
|
+ +inline | +
| int PIString::findWord | +( | +const PIString & | +word, | +
| + | + | const int | +start = 0 |
+
| + | ) | +const | +
| int PIString::findCWord | +( | +const PIString & | +word, | +
| + | + | const int | +start = 0 |
+
| + | ) | +const | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
| PIString & PIString::setReadableSize | +( | +llong | +bytes | ) | ++ |
Set string content to human readable size in B/kB/MB/GB/TB.
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value" in base "base".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value".
+Example:
+
|
+ +inlinestatic | +
Return string contains numeric representation of "value".
+Example:
+
|
+ +inlinestatic | +
Return string contains human readable size in B/kB/MB/GB/TB.
+Example:
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIStringList, including all inherited members.
+| contentSize() | PIStringList | inline |
| join(const PIString &delim) const | PIStringList | inline |
| operator!=(const PIStringList &o) const | PIStringList | inline |
| operator<<(std::ostream &s, const PIStringList &v) | PIStringList | related |
| operator==(const PIStringList &o) const | PIStringList | inline |
| PIStringList() | PIStringList | inline |
| PIStringList(const PIString &str) | PIStringList | inline |
| PIStringList(const PIString &s0, const PIString &s1) | PIStringList | inline |
| PIStringList(const PIString &s0, const PIString &s1, const PIString &s2) | PIStringList | inline |
| PIStringList(const PIString &s0, const PIString &s1, const PIString &s2, const PIString &s3) | PIStringList | inline |
| removeDuplicates() | PIStringList | |
| removeStrings(const PIString &value) | PIStringList | inline |
| trim() | PIStringList | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Strings array class. + More...
+ +Inherits PIDeque< T >.
++Public Member Functions | |
| + | PIStringList () |
| Contructs empty strings list. | |
| + | PIStringList (const PIString &str) |
| Contructs strings list with one string "str". | |
| + | PIStringList (const PIString &s0, const PIString &s1) |
| Contructs empty strings list with strings "s0" and "s1". | |
| + | PIStringList (const PIString &s0, const PIString &s1, const PIString &s2) |
| Contructs empty strings list with strings "s0", "s1" and "s2". | |
| + | PIStringList (const PIString &s0, const PIString &s1, const PIString &s2, const PIString &s3) |
| Contructs empty strings list with strings "s0", "s1", "s2" and "s3". | |
| PIString | join (const PIString &delim) const |
| Join all strings in one with delimiter "delim" and return it. More... | |
| PIStringList & | removeStrings (const PIString &value) |
| Remove all strings equal "value" and return this. More... | |
| PIStringList & | removeDuplicates () |
| Remove duplicated strings and return this. More... | |
| PIStringList & | trim () |
| Trim all strings. More... | |
| +uint | contentSize () |
| Return sum of lengths of all strings. | |
| +bool | operator== (const PIStringList &o) const |
| Compare operator. | |
| +bool | operator!= (const PIStringList &o) const |
| Compare operator. | |
+Related Functions | |
(Note that these are not member functions.) + | |
| +std::ostream & | operator<< (std::ostream &s, const PIStringList &v) |
| Output operator to std::ostream (cout) | |
Strings array class.
+This class is based on PIDeque<PIString> and expand it functionality.
+
+
|
+ +inline | +
Join all strings in one with delimiter "delim" and return it.
+Example:
+
+
|
+ +inline | +
Remove all strings equal "value" and return this.
+Example:
| PIStringList & PIStringList::removeDuplicates | +( | +) | ++ |
+
|
+ +inline | +
Trim all strings.
+Example:
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PISystemTime, including all inherited members.
+| abs() const | PISystemTime | |
| addMicroseconds(double v) | PISystemTime | inline |
| addMilliseconds(double v) | PISystemTime | inline |
| addNanoseconds(double v) | PISystemTime | inline |
| addSeconds(double v) | PISystemTime | inline |
| current(bool precise_but_not_system=false) | PISystemTime | static |
| fromMicroseconds(double v) | PISystemTime | inlinestatic |
| fromMilliseconds(double v) | PISystemTime | inlinestatic |
| fromNanoseconds(double v) | PISystemTime | inlinestatic |
| fromSeconds(double v) | PISystemTime | inlinestatic |
| nanoseconds | PISystemTime | |
| operator!=(const PISystemTime &t) const | PISystemTime | inline |
| operator*(const double &v) const | PISystemTime | inline |
| operator*=(const double &v) | PISystemTime | inline |
| operator+(const PISystemTime &t) const | PISystemTime | inline |
| operator+=(const PISystemTime &t) | PISystemTime | inline |
| operator-(const PISystemTime &t) const | PISystemTime | inline |
| operator-=(const PISystemTime &t) | PISystemTime | inline |
| operator/(const double &v) const | PISystemTime | inline |
| operator/=(const double &v) | PISystemTime | inline |
| operator<(const PISystemTime &t) const | PISystemTime | inline |
| operator<=(const PISystemTime &t) const | PISystemTime | inline |
| operator==(const PISystemTime &t) const | PISystemTime | inline |
| operator>(const PISystemTime &t) const | PISystemTime | inline |
| operator>=(const PISystemTime &t) const | PISystemTime | inline |
| PISystemTime() | PISystemTime | inline |
| PISystemTime(long s, long ns) | PISystemTime | inline |
| PISystemTime(const PISystemTime &t) | PISystemTime | inline |
| seconds | PISystemTime | |
| sleep() | PISystemTime | inline |
| toMicroseconds() const | PISystemTime | inline |
| toMilliseconds() const | PISystemTime | inline |
| toNanoseconds() const | PISystemTime | inline |
| toSeconds() const | PISystemTime | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
System time. + More...
++Public Member Functions | |
| + | PISystemTime () |
| Contructs system time with s = ns = 0. | |
| + | PISystemTime (long s, long ns) |
| Contructs system time with s = "s" and ns = "ns". | |
| + | PISystemTime (const PISystemTime &t) |
| Contructs system time from another. | |
| +double | toSeconds () const |
| Returns stored system time value in seconds. | |
| +double | toMilliseconds () const |
| Returns stored system time value in milliseconds. | |
| +double | toMicroseconds () const |
| Returns stored system time value in microseconds. | |
| +double | toNanoseconds () const |
| Returns stored system time value in nanoseconds. | |
| +PISystemTime & | addSeconds (double v) |
| Add to stored system time "v" seconds. | |
| +PISystemTime & | addMilliseconds (double v) |
| Add to stored system time "v" milliseconds. | |
| +PISystemTime & | addMicroseconds (double v) |
| Add to stored system time "v" microseconds. | |
| +PISystemTime & | addNanoseconds (double v) |
| Add to stored system time "v" nanoseconds. | |
| void | sleep () |
| +PISystemTime | abs () const |
| Returns copy of this system time with absolutely values of s and ns. | |
| +PISystemTime | operator+ (const PISystemTime &t) const |
| Returns sum of this system time with "t". | |
| +PISystemTime | operator- (const PISystemTime &t) const |
| Returns difference between this system time and "t". | |
| +PISystemTime | operator* (const double &v) const |
| Returns multiplication between this system time and "t". | |
| +PISystemTime | operator/ (const double &v) const |
| Returns division between this system time and "t". | |
| +PISystemTime & | operator+= (const PISystemTime &t) |
| Add to stored value system time "t". | |
| +PISystemTime & | operator-= (const PISystemTime &t) |
| Subtract from stored value system time "t". | |
| +PISystemTime & | operator*= (const double &v) |
| Multiply stored value system time by "v". | |
| +PISystemTime & | operator/= (const double &v) |
| Divide stored value system time by "v". | |
| +bool | operator== (const PISystemTime &t) const |
| Compare system times. | |
| +bool | operator!= (const PISystemTime &t) const |
| Compare system times. | |
| +bool | operator> (const PISystemTime &t) const |
| Compare system times. | |
| +bool | operator< (const PISystemTime &t) const |
| Compare system times. | |
| +bool | operator>= (const PISystemTime &t) const |
| Compare system times. | |
| +bool | operator<= (const PISystemTime &t) const |
| Compare system times. | |
+Static Public Member Functions | |
| +static PISystemTime | fromSeconds (double v) |
| Contructs system time from seconds "v". | |
| +static PISystemTime | fromMilliseconds (double v) |
| Contructs system time from milliseconds "v". | |
| +static PISystemTime | fromMicroseconds (double v) |
| Contructs system time from microseconds "v". | |
| +static PISystemTime | fromNanoseconds (double v) |
| Contructs system time from nanoseconds "v". | |
| +static PISystemTime | current (bool precise_but_not_system=false) |
| Returns current system time. | |
+Public Attributes | |
| +long | seconds |
| Seconds of stored system time. | |
| +long | nanoseconds |
| Nanoseconds of stored system time. | |
System time.
+This class provide arithmetic functions for POSIX system time. This time represents as seconds and nanosecons in integer formats. You can take current system time with function PISystemTime::current(), compare times, sum or subtract two times, convert time to/from seconds, milliseconds, microseconds or nanoseconds.
+
+
|
+ +inline | +
Sleep for stored value.
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIThread, including all inherited members.
+| begin() | PIThread | inlineprotectedvirtual |
| className() const | PIObject | inlinevirtual |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PIThread | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| end() | PIThread | inlineprotectedvirtual |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PIThread | inline |
| lock() | PIThread | inline |
| mutex() | PIThread | inline |
| name() const | PIObject | inline |
| needLockRun(bool need) | PIThread | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| piHigh enum value | PIThread | |
| piHighest enum value | PIThread | |
| piLow enum value | PIThread | |
| piLowerst enum value | PIThread | |
| piNormal enum value | PIThread | |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| PIThread(void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) | PIThread | |
| PIThread(bool startNow=false, int loop_delay=-1) | PIThread | |
| Priority enum name | PIThread | |
| priority() const | PIThread | inline |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| run() | PIThread | inlineprotectedvirtual |
| setData(void *d) | PIThread | inline |
| setDebug(bool debug) | PIObject | inline |
| setName(const PIString &name) | PIObject | inline |
| setPriority(PIThread::Priority prior) | PIThread | |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(ThreadFunc func) | PIThread | inline |
| start(int timer_delay) | PIThread | |
| start(ThreadFunc func, int timer_delay) | PIThread | inline |
| started() | PIThread | |
| startOnce() | PIThread | |
| startOnce(ThreadFunc func) | PIThread | inline |
| stop(bool wait) | PIThread | inline |
| stopped() | PIThread | |
| superClassName() const | PIObject | inlinevirtual |
| terminate() | PIThread | |
| unlock() | PIThread | inline |
| waitForFinish(int timeout_msecs) | PIThread | |
| waitForStart(int timeout_msecs) | PIThread | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Thread class. + More...
+
Inheritance diagram for PIThread:+Public Types | |
| enum | Priority { + piLowerst, +piLow, +piNormal, +piHigh, + + piHighest + + } |
| Priority of thread. More... | |
+Public Member Functions | |
| + | PIThread (void *data, ThreadFunc func, bool startNow=false, int loop_delay=-1) |
| Contructs thread with custom data "data", external function "func" and main loop delay "loop_delay". | |
| + | PIThread (bool startNow=false, int loop_delay=-1) |
| Contructs thread with main loop delay "loop_delay". | |
| +void | setData (void *d) |
| Set common data passed to external function. | |
| +void | setSlot (ThreadFunc func) |
| Set external function that will be executed after every run() | |
| +void | setPriority (PIThread::Priority prior) |
| Set priority of thread. | |
| +void * | data () const |
| Returns common data passed to external function. | |
| +PIThread::Priority | priority () const |
| Return priority of thread. | |
| +bool | isRunning () const |
Return true if thread is running. | |
| +void | needLockRun (bool need) |
| Set necessity of lock every run with internal mutex. | |
| +PIMutex & | mutex () |
| Return internal mutex. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Protected Member Functions | |
| +virtual void | begin () |
| Function executed once at the start of thread. | |
| +virtual void | run () |
| Function executed at every "timer_delay" msecs until thread was stopped. | |
| +virtual void | end () |
| Function executed once at the end of thread. | |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Handlers | |
| bool | start (int timer_delay) |
| Start thread. More... | |
| bool | start (ThreadFunc func, int timer_delay) |
| Start thread. More... | |
| bool | startOnce () |
| Start thread without internal loop. More... | |
| bool | startOnce (ThreadFunc func) |
| Start thread without internal loop. More... | |
| void | stop (bool wait) |
| Stop thread. More... | |
| void | terminate () |
| Strongly stop thread. More... | |
| bool | waitForStart (int timeout_msecs) |
| Wait for thread start. More... | |
| bool | waitForFinish (int timeout_msecs) |
| Wait for thread finish. More... | |
| +void | lock () |
| Lock internal mutex. | |
| +void | unlock () |
| Unlock internal mutex. | |
+Events | |
| +void | started () |
| Raise on thread start. | |
| +void | stopped () |
| Raise on thread stop. | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Thread class.
+This class allow you exec your code in separate thread.
+Multithreading allow you to write program which will be executed in several threads simultaneously. This trend allow you to use all cores of modern processors, but there are many dangers.
+This class provide virtual functions begin(), run() and end(), which describes start, execution and finish work of some process. These functions executes in separate thread. When you execute start(), PIThread create separate system thread and sequentially executes function begin(), run() and end(). You can reimplement each function and write your own code to execute. Scheme of functions executing:
Unlike from directly using "pthread" or some similar you doesn`t need to write your own main thread cycle and sleep at every cycle end. PIThread make it for you, and your job is to set sleep value from contructor or when starting thread, and reimplement begin(), run() and end() functions.
+You can use PIThread without subclassing by using "ThreadFunc" pointer that can be set from constructor or by overloaded function start(ThreadFunc func, int timer_delay). If "func" if not null this function will be executed as run(). ThreadFunc is any static function with format void func(void * data). "Data" is custom data set from constructor or with function setData().
+ Also you can connect to event started(), but in this case you should to white your thread main cycle, because this event raised only one time.
PIThread has inrternal mutex that can be locked and unlocked every run() if you set this flag with function needLockRun(bool). Also you can access to this mutex by functions lock(), unlock() and mutex(). Using this functions together with needLockRun(true) can guarantee one-thread access to some data.
+| enum PIThread::Priority | +
| bool PIThread::start | +( | +int | +timer_delay = -1 | ) | ++ |
+
|
+ +inline | +
Start thread.
+Overloaded function. Set external function "func" before start
+false if thread already started or can`t start thread | bool PIThread::startOnce | +( | +) | ++ |
+
|
+ +inline | +
Start thread without internal loop.
+Overloaded function. Set external function "func" before start
+false if thread already started or can`t start thread
+
|
+ +inline | +
Stop thread.
+Stop execution of thread and wait for it finish if "wait" is true. This function can block for infinite time if "wait" is true and any of thread function is busy forever
| void PIThread::terminate | +( | +) | ++ |
Strongly stop thread.
+Stop execution of thread immediately
+ +| bool PIThread::waitForStart | +( | +int | +timeout_msecs = -1 | ) | ++ |
Wait for thread start.
+This function block until thread finish for "timeout_msecs" or forever if "timeout_msecs" < 0
+false if timeout is exceeded | bool PIThread::waitForFinish | +( | +int | +timeout_msecs = -1 | ) | ++ |
Wait for thread finish.
+This function block until thread start for "timeout_msecs" or forever if "timeout_msecs" < 0
+false if timeout is exceeded |
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PITimeMeasurer, including all inherited members.
+| elapsed() | PITimeMeasurer | |
| elapsed_m() | PITimeMeasurer | |
| elapsed_n() | PITimeMeasurer | |
| elapsed_s() | PITimeMeasurer | |
| elapsed_system() | PITimeMeasurer | inlinestatic |
| elapsed_system_m() | PITimeMeasurer | inlinestatic |
| elapsed_system_n() | PITimeMeasurer | inlinestatic |
| elapsed_system_s() | PITimeMeasurer | inlinestatic |
| elapsed_system_u() | PITimeMeasurer | inlinestatic |
| elapsed_u() | PITimeMeasurer | |
| reset() | PITimeMeasurer | inline |
| reset_time() | PITimeMeasurer | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Time measurements. + More...
++Public Member Functions | |
| void | reset () |
| Set internal time mark to current system time. More... | |
| +double | elapsed_n () |
| Returns nanoseconds elapsed from last reset() execution or from timer measurer creation. | |
| +double | elapsed_u () |
| Returns microseconds elapsed from last reset() execution or from timer measurer creation. | |
| +double | elapsed_m () |
| Returns milliseconds elapsed from last reset() execution or from timer measurer creation. | |
| +double | elapsed_s () |
| Returns seconds elapsed from last reset() execution or from timer measurer creation. | |
| +PISystemTime | elapsed () |
| Returns PISystemTime elapsed from last reset() execution or from timer measurer creation. | |
| +PISystemTime | reset_time () |
| Returns time mark of last reset() execution or timer measurer creation. | |
+Static Public Member Functions | |
| +static double | elapsed_system_n () |
| Returns nanoseconds representation of current system time. | |
| +static double | elapsed_system_u () |
| Returns microseconds representation of current system time. | |
| +static double | elapsed_system_m () |
| Returns milliseconds representation of current system time. | |
| +static double | elapsed_system_s () |
| Returns seconds representation of current system time. | |
| +static PISystemTime | elapsed_system () |
| Returns time mark of current system time. | |
Time measurements.
+Function reset() set time mark to current system time, then functions double elapsed_*() returns time elapsed from this mark. These functions can returns nano-, micro-, milli- and seconds with suffixes "n", "u", "m" and "s"
+
+
|
+ +inline | +
Set internal time mark to current system time.
+This function used for set start time mark. Later you can find out elapsed time from this time mark to any moment of time with elapsed_s(), elapsed_m(), elapsed_u() or elapsed_n() functions.
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PITimer, including all inherited members.
+| addDelimiter(int delim, TimerEvent slot=0) | PITimer | inline |
| className() const | PIObject | inlinevirtual |
| clearDelimiters() | PITimer | inline |
| CONNECT | PIObject | related |
| CONNECT0 | PIObject | related |
| CONNECT1 | PIObject | related |
| CONNECT2 | PIObject | related |
| CONNECT3 | PIObject | related |
| CONNECT4 | PIObject | related |
| CONNECTU | PIObject | related |
| data() const | PITimer | inline |
| debug() const | PIObject | inline |
| DISCONNECT | PIObject | related |
| DISCONNECT0 | PIObject | related |
| DISCONNECT1 | PIObject | related |
| DISCONNECT2 | PIObject | related |
| DISCONNECT3 | PIObject | related |
| DISCONNECT4 | PIObject | related |
| emitter() const | PIObject | inlineprotected |
| EVENT | PIObject | related |
| EVENT0 | PIObject | related |
| EVENT1 | PIObject | related |
| EVENT2 | PIObject | related |
| EVENT3 | PIObject | related |
| EVENT4 | PIObject | related |
| EVENT_HANDLER | PIObject | related |
| EVENT_HANDLER0 | PIObject | related |
| EVENT_HANDLER1 | PIObject | related |
| EVENT_HANDLER2 | PIObject | related |
| EVENT_HANDLER3 | PIObject | related |
| EVENT_HANDLER4 | PIObject | related |
| EVENT_VHANDLER | PIObject | related |
| EVENT_VHANDLER0 | PIObject | related |
| EVENT_VHANDLER1 | PIObject | related |
| EVENT_VHANDLER2 | PIObject | related |
| EVENT_VHANDLER3 | PIObject | related |
| EVENT_VHANDLER4 | PIObject | related |
| findByName(const PIString &name) | PIObject | inlinestatic |
| HANDLER | PIObject | related |
| implementation() const | PITimer | inline |
| interval() const | PITimer | inline |
| isPropertyExists(const PIString &name) const | PIObject | inline |
| isRunning() const | PITimer | inline |
| isStopped() const | PITimer | inline |
| name() const | PIObject | inline |
| piCoutObj | PIObject | related |
| piDisconnect(PIObject *src, const PIString &sig) | PIObject | static |
| piDisconnect(PIObject *src) | PIObject | static |
| PIOBJECT | PIObject | related |
| PIObject(const PIString &name=PIString()) | PIObject | |
| PIOBJECT_PARENT | PIObject | related |
| PITimer() | PITimer | explicit |
| PITimer(TimerImplementation ti) | PITimer | explicit |
| PITimer(TimerEvent slot, void *data=0, TimerImplementation ti=Thread) | PITimer | explicit |
| Pool enum value | PITimer | |
| properties() const | PIObject | inline |
| propertiesCount() const | PIObject | inline |
| property(const PIString &name) const | PIObject | inline |
| propertyChanged(const PIString &name) | PIObject | inlineprotectedvirtual |
| removeDelimiter(int delim) | PITimer | inline |
| removeDelimiter(TimerEvent slot) | PITimer | inline |
| removeDelimiter(int delim, TimerEvent slot) | PITimer | inline |
| restart() | PITimer | inline |
| setData(void *data_) | PITimer | inline |
| setDebug(bool debug) | PIObject | inline |
| setInterval(double ms) | PITimer | inline |
| setName(const PIString &name) | PIObject | inline |
| setProperty(const PIString &name, const PIVariant &value) | PIObject | inline |
| setSlot(TimerEvent slot) | PITimer | inline |
| start() | PITimer | inline |
| start(int interval_ms_i) | PITimer | inline |
| start(double interval_ms_d) | PITimer | inline |
| stop() | PITimer | inline |
| superClassName() const | PIObject | inlinevirtual |
| Thread enum value | PITimer | |
| ThreadRT enum value | PITimer | |
| tick(void *data_, int delimiter) | PITimer | inlineprotectedvirtual |
| tickEvent(void *data_, int delimiter) | PITimer | |
| TimerImplementation enum name | PITimer | |
| WEAK_CONNECT | PIObject | related |
| WEAK_CONNECT0 | PIObject | related |
| WEAK_CONNECT1 | PIObject | related |
| WEAK_CONNECT2 | PIObject | related |
| WEAK_CONNECT3 | PIObject | related |
| WEAK_CONNECT4 | PIObject | related |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Timer. + More...
+
Inheritance diagram for PITimer:+Public Types | |
| enum | TimerImplementation { Thread = 0x01, +ThreadRT = 0x02, +Pool = 0x04 + } |
| Timer implementations. More... | |
+Public Member Functions | |
| + | PITimer () |
| Constructs timer with PITimer::Thread implementation. | |
| + | PITimer (TimerImplementation ti) |
| Constructs timer with "ti" implementation. | |
| + | PITimer (TimerEvent slot, void *data=0, TimerImplementation ti=Thread) |
| Constructs timer with "slot" slot, "data" data and "ti" implementation. | |
| +PITimer::TimerImplementation | implementation () const |
| Returns timer implementation. | |
| +double | interval () const |
| Returns timer loop delay in milliseconds. | |
| +void | setInterval (double ms) |
| Set timer loop delay in milliseconds. | |
| +bool | isRunning () const |
| Returns if timer is started. | |
| +bool | isStopped () const |
| Returns if timer is not started. | |
| +void | setData (void *data_) |
| Set custom data. | |
| +void | setSlot (TimerEvent slot) |
| Set timer tick function. | |
| +void * | data () const |
| Returns common data passed to tick functions. | |
| +void | addDelimiter (int delim, TimerEvent slot=0) |
| Add frequency delimiter delim with optional delimiter slot slot. | |
| +void | removeDelimiter (int delim) |
| Remove all frequency delimiters delim. | |
| +void | removeDelimiter (TimerEvent slot) |
| Remove all frequency delimiters with slot slot. | |
| +void | removeDelimiter (int delim, TimerEvent slot) |
| Remove all frequency delimiters delim with slot slot. | |
Public Member Functions inherited from PIObject | |
| + | PIObject (const PIString &name=PIString()) |
| Contructs PIObject with name "name". | |
| +PIString | name () const |
| Returns object name. | |
| +virtual const char * | className () const |
| Returns object class name. | |
| +virtual const char * | superClassName () const |
| Returns object superclass name. | |
| +bool | debug () const |
| Return if debug of this object is active. | |
| +void | setName (const PIString &name) |
| Set object name. | |
| +void | setDebug (bool debug) |
| Set object debug active. | |
|
+const PIMap< PIString, +PIVariant > & | properties () const |
| Returns properties of the object. | |
| +int | propertiesCount () const |
| Returns properties count of the object. | |
| +PIVariant | property (const PIString &name) const |
| Returns property with name "name". | |
| +void | setProperty (const PIString &name, const PIVariant &value) |
| Set property with name "name" to "value". If there is no such property in object it will be added. | |
| +bool | isPropertyExists (const PIString &name) const |
| Returns if property with name "name" exists. | |
+Protected Member Functions | |
| virtual void | tick (void *data_, int delimiter) |
Protected Member Functions inherited from PIObject | |
| +PIObject * | emitter () const |
| Returns PIObject* which has raised an event. This value is correct only in definition of some event handler. | |
| +virtual void | propertyChanged (const PIString &name) |
| Virtual function executes after property with name "name" has been changed. | |
+Handlers | |
| bool | start () |
| Start timer with interval() loop delay. More... | |
| bool | start (int interval_ms_i) |
| Start timer with msecs loop delay. More... | |
| bool | start (double interval_ms_d) |
| Start timer with msecs loop delay. More... | |
| +bool | restart () |
| Stop and start timer with interval() loop delay. | |
| +bool | stop () |
| Stop timer. | |
| +void | clearDelimiters () |
| Remove all frequency delimiters. | |
+Events | |
| void | tickEvent (void *data_, int delimiter) |
| Raise on timer tick. More... | |
+Additional Inherited Members | |
Static Public Member Functions inherited from PIObject | |
| +static void | piDisconnect (PIObject *src, const PIString &sig) |
| Disconnect object "src" from all connections with event name "sig". | |
| +static void | piDisconnect (PIObject *src) |
| Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter. | |
| +static PIObject * | findByName (const PIString &name) |
| Returns PIObject* with name "name" or 0, if there is no object found. | |
Related Functions inherited from PIObject | |
| +#define | piCoutObj |
| Macro used for conditional (piDebug and PIObject::debug()) output to PICout for subclasses of PIObject. | |
| +#define | PIOBJECT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER and correct piCoutObj output | |
| +#define | PIOBJECT_PARENT(name) |
| you should use this macro after class declaration to use EVENT and EVENT_HANDLER of parent class | |
| +#define | EVENT_HANDLER0(ret, name) ret name() |
| declare event handler "event" with name "name" and return type "ret", ret name() | |
| +#define | EVENT_HANDLER1(ret, name, type0, var0) ret name(type0 var0) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0) | |
| +#define | EVENT_HANDLER2(ret, name, type0, var0, type1, var1) ret name(type0 var0, type1 var1) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1) | |
| +#define | EVENT_HANDLER3(ret, name, type0, var0, type1, var1, type2, var2) ret name(type0 var0, type1 var1, type2 var2) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_HANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare event handler "event" with name "name" and return type "ret", ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_HANDLER EVENT_HANDLER0 |
| EVENT_HANDLER is synonym of EVENT_HANDLER0. | |
| +#define | EVENT_VHANDLER0(ret, name) virtual ret name() |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name() | |
| +#define | EVENT_VHANDLER1(ret, name, type0, var0) virtual ret name(type0 var0) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0) | |
| +#define | EVENT_VHANDLER2(ret, name, type0, var0, type1, var1) virtual ret name(type0 var0, type1 var1) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1) | |
| +#define | EVENT_VHANDLER3(ret, name, type0, var0, type1, var1, type2, var2) virtual ret name(type0 var0, type1 var1, type2 var2) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2) | |
| +#define | EVENT_VHANDLER4(ret, name, type0, var0, type1, var1, type2, var2, type3, var3) virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) |
| declare virtual event handler "event" with name "name" and return type "ret", virtual ret name(type0 var0, type1 var1, type2 var2, type3 var3) | |
| +#define | EVENT_VHANDLER EVENT_VHANDLER0 |
| EVENT_VHANDLER is synonym of EVENT_VHANDLER0. | |
| +#define | EVENT0(name) void name(); |
| declare event "event" with name "name", void name(); | |
| +#define | EVENT1(name, type0, var0) void name(type0 var0); |
| declare event "event" with name "name", void name(type0 var0); | |
| +#define | EVENT2(name, type0, var0, type1, var1) void name(type0 var0, type1 var1); |
| declare event "event" with name "name", void name(type0 var0, type1 var1); | |
| +#define | EVENT3(name, type0, var0, type1, var1, type2, var2) void name(type0 var0, type1 var1, type2 var2); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2); | |
| +#define | EVENT4(name, type0, var0, type1, var1, type2, var2, type3, var3) void name(type0 var0, type1 var1, type2 var2, type3 var3); |
| declare event "event" with name "name", void name(type0 var0, type1 var1, type2 var2, type3 var3); | |
| +#define | EVENT EVENT0 |
| EVENT is synonym of EVENT0. | |
| +#define | CONNECTU(src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler". "Event" and "handler" must has equal argument lists. | |
| +#define | CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" with check of event and handler exists | |
| +#define | CONNECT CONNECT0 |
| CONNECT is synonym of CONNECT0. | |
| +#define | WEAK_CONNECT0(ret, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT1(ret, type0, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT2(ret, type0, type1, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| connect event "event" from object "src" to event handler "handler" with return type "ret" from object "dest" without check of event exists | |
| +#define | WEAK_CONNECT WEAK_CONNECT0 |
| WEAK_CONNECT is synonym of WEAK_CONNECT0. | |
| +#define | DISCONNECT0(ret, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT1(ret, type0, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT2(ret, type0, type1, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT3(ret, type0, type1, type2, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT4(ret, type0, type1, type2, type3, src, event, dest, handler) |
| piDisconnect event "event" from object "src" from event handler "handler" with return type "ret" from object "dest" | |
| +#define | DISCONNECT DISCONNECT0 |
| DISCONNECT is synonym of DISCONNECT0. | |
| +#define | HANDLER(handler) |
| Returns pointer to events handler "handler". | |
Timer.
+This class implements timer function. PIP timers supports 3 way to tick notify, frequency delimiters and time measurements.
+Notify variants:
All these variants are equivalent, use most applicable.
+Frequency delimiter is an integer number and "slot" function. If "slot" function is null timer main "slot" will be used. Each delimiter numbers tick timer will be execute delimiters or timer main "slot" function with delimiter value = delimiter number. Example:
PITimer can be used as time measurer. Function reset() set time mark to current system time, then functions double elapsed_*() returns time elapsed from this mark. These functions can returns nano-, micro-, milli- and seconds with suffixes "n", "u", "m" and "s" Example:
| enum PITimer::TimerImplementation | +
Timer implementations.
+
+
|
+ +inline | +
Start timer with interval() loop delay.
+Start execution of timer functions with frequency = 1 / msecs Hz.
+ +
+
|
+ +inline | +
Start timer with msecs loop delay.
+Start execution of timer functions with frequency = 1 / msecs Hz.
+ +
+
|
+ +inline | +
Start timer with msecs loop delay.
+Start execution of timer functions with frequency = 1. / msecs Hz. Instead of start(int msecs) function this variant allow start timer with frequencies more than 1 kHz
+ +| void PITimer::tickEvent | +( | +void * | +data, | +
| + | + | int | +delimiter | +
| + | ) | ++ |
Raise on timer tick.
+Data can be set with function setData(void * data) or from constructor. Delimiter if frequency delimiter, 1 for main loop.
+ +
+
|
+ +inlineprotectedvirtual | +
Virtual timer execution function, similar to "slot" or event void timeout(void * data, int delimiter). By default is empty.
+ +|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIVariant, including all inherited members.
+| BitArray enum value | PIVariant | |
| Bool enum value | PIVariant | |
| ByteArray enum value | PIVariant | |
| Char enum value | PIVariant | |
| Complexd enum value | PIVariant | |
| Complexld enum value | PIVariant | |
| Custom enum value | PIVariant | |
| Date enum value | PIVariant | |
| DateTime enum value | PIVariant | |
| Double enum value | PIVariant | |
| Float enum value | PIVariant | |
| fromValue(const T &v) | PIVariant | inlinestatic |
| Int enum value | PIVariant | |
| Invalid enum value | PIVariant | |
| isValid() const | PIVariant | inline |
| LDouble enum value | PIVariant | |
| LLong enum value | PIVariant | |
| Long enum value | PIVariant | |
| operator!=(const PIVariant &v) const | PIVariant | inline |
| operator=(const PIVariant &v) | PIVariant | |
| operator=(const char *v) | PIVariant | inline |
| operator=(const bool v) | PIVariant | inline |
| operator=(const char v) | PIVariant | inline |
| operator=(const uchar v) | PIVariant | inline |
| operator=(const short v) | PIVariant | inline |
| operator=(const ushort v) | PIVariant | inline |
| operator=(const int &v) | PIVariant | inline |
| operator=(const uint &v) | PIVariant | inline |
| operator=(const long &v) | PIVariant | inline |
| operator=(const ulong &v) | PIVariant | inline |
| operator=(const llong &v) | PIVariant | inline |
| operator=(const ullong &v) | PIVariant | inline |
| operator=(const float &v) | PIVariant | inline |
| operator=(const double &v) | PIVariant | inline |
| operator=(const ldouble &v) | PIVariant | inline |
| operator=(const complexd &v) | PIVariant | inline |
| operator=(const complexld &v) | PIVariant | inline |
| operator=(const PIBitArray &v) | PIVariant | inline |
| operator=(const PIByteArray &v) | PIVariant | inline |
| operator=(const PIString &v) | PIVariant | inline |
| operator=(const PIStringList &v) | PIVariant | inline |
| operator=(const PITime &v) | PIVariant | inline |
| operator=(const PIDate &v) | PIVariant | inline |
| operator=(const PIDateTime &v) | PIVariant | inline |
| operator=(const PISystemTime &v) | PIVariant | inline |
| operator==(const PIVariant &v) const | PIVariant | |
| PIVariant() | PIVariant | |
| PIVariant(const char *v) | PIVariant | inline |
| PIVariant(const bool v) | PIVariant | inline |
| PIVariant(const char v) | PIVariant | inline |
| PIVariant(const uchar v) | PIVariant | inline |
| PIVariant(const short v) | PIVariant | inline |
| PIVariant(const ushort v) | PIVariant | inline |
| PIVariant(const int &v) | PIVariant | inline |
| PIVariant(const uint &v) | PIVariant | inline |
| PIVariant(const long &v) | PIVariant | inline |
| PIVariant(const ulong &v) | PIVariant | inline |
| PIVariant(const llong &v) | PIVariant | inline |
| PIVariant(const ullong &v) | PIVariant | inline |
| PIVariant(const float &v) | PIVariant | inline |
| PIVariant(const double &v) | PIVariant | inline |
| PIVariant(const ldouble &v) | PIVariant | inline |
| PIVariant(const complexd &v) | PIVariant | inline |
| PIVariant(const complexld &v) | PIVariant | inline |
| PIVariant(const PIBitArray &v) | PIVariant | inline |
| PIVariant(const PIByteArray &v) | PIVariant | inline |
| PIVariant(const PIString &v) | PIVariant | inline |
| PIVariant(const PIStringList &v) | PIVariant | inline |
| PIVariant(const PITime &v) | PIVariant | inline |
| PIVariant(const PIDate &v) | PIVariant | inline |
| PIVariant(const PIDateTime &v) | PIVariant | inline |
| PIVariant(const PISystemTime &v) | PIVariant | inline |
| setValue(const char *v) | PIVariant | inline |
| setValue(const bool v) | PIVariant | inline |
| setValue(const char v) | PIVariant | inline |
| setValue(const uchar v) | PIVariant | inline |
| setValue(const short v) | PIVariant | inline |
| setValue(const ushort v) | PIVariant | inline |
| setValue(const int &v) | PIVariant | inline |
| setValue(const uint &v) | PIVariant | inline |
| setValue(const long &v) | PIVariant | inline |
| setValue(const ulong &v) | PIVariant | inline |
| setValue(const llong &v) | PIVariant | inline |
| setValue(const ullong &v) | PIVariant | inline |
| setValue(const float &v) | PIVariant | inline |
| setValue(const double &v) | PIVariant | inline |
| setValue(const ldouble &v) | PIVariant | inline |
| setValue(const complexd &v) | PIVariant | inline |
| setValue(const complexld &v) | PIVariant | inline |
| setValue(const PIBitArray &v) | PIVariant | inline |
| setValue(const PIByteArray &v) | PIVariant | inline |
| setValue(const PIString &v) | PIVariant | inline |
| setValue(const PIStringList &v) | PIVariant | inline |
| setValue(const PITime &v) | PIVariant | inline |
| setValue(const PIDate &v) | PIVariant | inline |
| setValue(const PIDateTime &v) | PIVariant | inline |
| setValue(const PISystemTime &v) | PIVariant | inline |
| Short enum value | PIVariant | |
| String enum value | PIVariant | |
| StringList enum value | PIVariant | |
| SystemTime enum value | PIVariant | |
| Time enum value | PIVariant | |
| toBitArray() const | PIVariant | |
| toBool() const | PIVariant | |
| toByteArray() const | PIVariant | |
| toComplexd() const | PIVariant | |
| toComplexld() const | PIVariant | |
| toDate() const | PIVariant | |
| toDateTime() const | PIVariant | |
| toDouble() const | PIVariant | |
| toFloat() const | PIVariant | |
| toInt() const | PIVariant | |
| toLDouble() const | PIVariant | |
| toLLong() const | PIVariant | |
| toString() const | PIVariant | |
| toStringList() const | PIVariant | |
| toSystemTime() const | PIVariant | |
| toTime() const | PIVariant | |
| toValue() const | PIVariant | inline |
| Type enum name | PIVariant | |
| type() const | PIVariant | inline |
| typeFromName(const PIString &tname) | PIVariant | static |
| typeName() const | PIVariant | inline |
| typeName(PIVariant::Type type) | PIVariant | static |
| UChar enum value | PIVariant | |
| UInt enum value | PIVariant | |
| ULLong enum value | PIVariant | |
| ULong enum value | PIVariant | |
| UShort enum value | PIVariant |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Variant type. + More...
++Public Types | |
| enum | Type { + Invalid = 0, +Bool, +Char, +UChar, + + Short, +UShort, +Int, +UInt, + + Long, +ULong, +LLong, +ULLong, + + Float, +Double, +LDouble, +Complexd, + + Complexld, +BitArray, +ByteArray, +String, + + StringList, +Time, +Date, +DateTime, + + SystemTime, +Custom = 0xFF + + } |
| Type of PIVariant content. More... | |
+Public Member Functions | |
| + | PIVariant () |
| Empty constructor, type() will be set to Invalid. | |
| + | PIVariant (const char *v) |
| Constructs variant from string. | |
| + | PIVariant (const bool v) |
| Constructs variant from boolean. | |
| + | PIVariant (const char v) |
| Constructs variant from char. | |
| + | PIVariant (const uchar v) |
| Constructs variant from integer. | |
| + | PIVariant (const short v) |
| Constructs variant from integer. | |
| + | PIVariant (const ushort v) |
| Constructs variant from integer. | |
| + | PIVariant (const int &v) |
| Constructs variant from integer. | |
| + | PIVariant (const uint &v) |
| Constructs variant from integer. | |
| + | PIVariant (const long &v) |
| Constructs variant from integer. | |
| + | PIVariant (const ulong &v) |
| Constructs variant from integer. | |
| + | PIVariant (const llong &v) |
| Constructs variant from integer. | |
| + | PIVariant (const ullong &v) |
| Constructs variant from integer. | |
| + | PIVariant (const float &v) |
| Constructs variant from float. | |
| + | PIVariant (const double &v) |
| Constructs variant from double. | |
| + | PIVariant (const ldouble &v) |
| Constructs variant from long double. | |
| + | PIVariant (const complexd &v) |
| Constructs variant from complex. | |
| + | PIVariant (const complexld &v) |
| Constructs variant from complex. | |
| + | PIVariant (const PIBitArray &v) |
| Constructs variant from bit array. | |
| + | PIVariant (const PIByteArray &v) |
| Constructs variant from byte array. | |
| + | PIVariant (const PIString &v) |
| Constructs variant from string. | |
| + | PIVariant (const PIStringList &v) |
| Constructs variant from strings list. | |
| + | PIVariant (const PITime &v) |
| Constructs variant from time. | |
| + | PIVariant (const PIDate &v) |
| Constructs variant from date. | |
| + | PIVariant (const PIDateTime &v) |
| Constructs variant from date and time. | |
| + | PIVariant (const PISystemTime &v) |
| Constructs variant from system time. | |
| +void | setValue (const char *v) |
| Set variant content and type to string. | |
| +void | setValue (const bool v) |
| Set variant content and type to boolean. | |
| +void | setValue (const char v) |
| Set variant content and type to char. | |
| +void | setValue (const uchar v) |
| Set variant content and type to integer. | |
| +void | setValue (const short v) |
| Set variant content and type to integer. | |
| +void | setValue (const ushort v) |
| Set variant content and type to integer. | |
| +void | setValue (const int &v) |
| Set variant content and type to integer. | |
| +void | setValue (const uint &v) |
| Set variant content and type to integer. | |
| +void | setValue (const long &v) |
| Set variant content and type to integer. | |
| +void | setValue (const ulong &v) |
| Set variant content and type to integer. | |
| +void | setValue (const llong &v) |
| Set variant content and type to integer. | |
| +void | setValue (const ullong &v) |
| Set variant content and type to integer. | |
| +void | setValue (const float &v) |
| Set variant content and type to float. | |
| +void | setValue (const double &v) |
| Set variant content and type to double. | |
| +void | setValue (const ldouble &v) |
| Set variant content and type to long double. | |
| +void | setValue (const complexd &v) |
| Set variant content and type to complex. | |
| +void | setValue (const complexld &v) |
| Set variant content and type to complex. | |
| +void | setValue (const PIBitArray &v) |
| Set variant content and type to bit array. | |
| +void | setValue (const PIByteArray &v) |
| Set variant content and type to byte array. | |
| +void | setValue (const PIString &v) |
| Set variant content and type to string. | |
| +void | setValue (const PIStringList &v) |
| Set variant content and type to strings list. | |
| +void | setValue (const PITime &v) |
| Set variant content and type to time. | |
| +void | setValue (const PIDate &v) |
| Set variant content and type to date. | |
| +void | setValue (const PIDateTime &v) |
| Set variant content and type to date and time. | |
| +void | setValue (const PISystemTime &v) |
| Set variant content and type to system time. | |
| bool | toBool () const |
| Returns variant content as boolean. More... | |
| int | toInt () const |
| Returns variant content as int. More... | |
| llong | toLLong () const |
| Returns variant content as long long. More... | |
| float | toFloat () const |
| Returns variant content as float. More... | |
| double | toDouble () const |
| Returns variant content as double. More... | |
| ldouble | toLDouble () const |
| Returns variant content as long double. More... | |
| complexd | toComplexd () const |
| Returns variant content as complex. More... | |
| complexld | toComplexld () const |
| Returns variant content as long complex. More... | |
| PITime | toTime () const |
| Returns variant content as time. More... | |
| PIDate | toDate () const |
| Returns variant content as date. More... | |
| PIDateTime | toDateTime () const |
| Returns variant content as date and time. More... | |
| PISystemTime | toSystemTime () const |
| Returns variant content as system time. More... | |
| PIString | toString () const |
| Returns variant content as string. More... | |
| PIStringList | toStringList () const |
| Returns variant content as strings list. More... | |
| PIBitArray | toBitArray () const |
| Returns variant content as bit array. More... | |
| PIByteArray | toByteArray () const |
| Returns variant content as byte array. More... | |
| template<typename T > | |
| T | toValue () const |
| Returns variant content as custom type. More... | |
| +PIVariant & | operator= (const PIVariant &v) |
| Assign operator. | |
| +PIVariant & | operator= (const char *v) |
| Assign operator. | |
| +PIVariant & | operator= (const bool v) |
| Assign operator. | |
| +PIVariant & | operator= (const char v) |
| Assign operator. | |
| +PIVariant & | operator= (const uchar v) |
| Assign operator. | |
| +PIVariant & | operator= (const short v) |
| Assign operator. | |
| +PIVariant & | operator= (const ushort v) |
| Assign operator. | |
| +PIVariant & | operator= (const int &v) |
| Assign operator. | |
| +PIVariant & | operator= (const uint &v) |
| Assign operator. | |
| +PIVariant & | operator= (const long &v) |
| Assign operator. | |
| +PIVariant & | operator= (const ulong &v) |
| Assign operator. | |
| +PIVariant & | operator= (const llong &v) |
| Assign operator. | |
| +PIVariant & | operator= (const ullong &v) |
| Assign operator. | |
| +PIVariant & | operator= (const float &v) |
| Assign operator. | |
| +PIVariant & | operator= (const double &v) |
| Assign operator. | |
| +PIVariant & | operator= (const ldouble &v) |
| Assign operator. | |
| +PIVariant & | operator= (const complexd &v) |
| Assign operator. | |
| +PIVariant & | operator= (const complexld &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PIBitArray &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PIByteArray &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PIString &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PIStringList &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PITime &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PIDate &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PIDateTime &v) |
| Assign operator. | |
| +PIVariant & | operator= (const PISystemTime &v) |
| Assign operator. | |
| +bool | operator== (const PIVariant &v) const |
| Compare operator. | |
| +bool | operator!= (const PIVariant &v) const |
| Compare operator. | |
| +PIVariant::Type | type () const |
| Returns type of variant content. | |
| +PIString | typeName () const |
| Returns type name of variant content. | |
| +bool | isValid () const |
| Returns true if type is not Invalid. | |
+Static Public Member Functions | |
| template<typename T > | |
| static PIVariant | fromValue (const T &v) |
| Returns new variant from custom type. More... | |
| +static PIVariant::Type | typeFromName (const PIString &tname) |
| Returns type from name. | |
| +static PIString | typeName (PIVariant::Type type) |
| Returns type name. | |
Variant type.
+This class provides general type that can contains all standard types, some PIP types or custom type. In case of standard types this class also provides convertions between them.
+PIVariant useful if you want pass many variables with different types in single array, e.g.:
Result:
| enum PIVariant::Type | +
Type of PIVariant content.
+| bool PIVariant::toBool | +( | +) | +const | +
Returns variant content as boolean.
+In case of numeric types returns true if value != 0.
+In case of String type returns PIString::toBool().
+In case of StringList type returns false if string list is empty, otherwise returns PIString::toBool() of first string.
+In case of other types returns false.
| int PIVariant::toInt | +( | +) | +const | +
Returns variant content as int.
+In case of numeric types returns integer value.
+In case of String type returns PIString::toInt().
+In case of StringList type returns 0 if string list is empty, otherwise returns PIString::toInt() of first string.
+In case of other types returns 0.
| llong PIVariant::toLLong | +( | +) | +const | +
Returns variant content as long long.
+In case of numeric types returns integer value.
+In case of String type returns PIString::toLLong().
+In case of StringList type returns 0L if string list is empty, otherwise returns PIString::toLLong() of first string.
+In case of other types returns 0L.
| float PIVariant::toFloat | +( | +) | +const | +
Returns variant content as float.
+In case of numeric types returns float value.
+In case of String type returns PIString::toFloat().
+In case of StringList type returns 0.f if string list is empty, otherwise returns PIString::toFloat() of first string.
+In case of other types returns 0.f.
| double PIVariant::toDouble | +( | +) | +const | +
Returns variant content as double.
+In case of numeric types returns double value.
+In case of String type returns PIString::toDouble().
+In case of StringList type returns 0. if string list is empty, otherwise returns PIString::toDouble() of first string.
+In case of other types returns 0..
| ldouble PIVariant::toLDouble | +( | +) | +const | +
Returns variant content as long double.
+In case of numeric types returns long double value.
+In case of String type returns PIString::toLDouble().
+In case of StringList type returns 0. if string list is empty, otherwise returns PIString::toLDouble() of first string.
+In case of other types returns 0..
| complexd PIVariant::toComplexd | +( | +) | +const | +
Returns variant content as complex.
+In case of numeric types returns complex value.
+In case of String type returns PIString::toDouble().
+In case of StringList type returns 0. if string list is empty, otherwise returns PIString::toDouble() of first string.
+In case of other types returns 0..
| complexld PIVariant::toComplexld | +( | +) | +const | +
Returns variant content as long complex.
+In case of numeric types returns long complex value.
+In case of String type returns PIString::toLDouble().
+In case of StringList type returns 0. if string list is empty, otherwise returns PIString::toLDouble() of first string.
+In case of other types returns 0..
| PITime PIVariant::toTime | +( | +) | +const | +
Returns variant content as time.
+In case of Time type returns time value.
+In case of DateTime type returns time part of value.
+In case of other types returns PITime().
| PIDate PIVariant::toDate | +( | +) | +const | +
Returns variant content as date.
+In case of Date type returns date value.
+In case of DateTime type returns date part of value.
+In case of other types returns PIDate().
| PIDateTime PIVariant::toDateTime | +( | +) | +const | +
Returns variant content as date and time.
+In case of Time type returns time value with null date.
+In case of Date type returns date value with null time.
+In case of DateTime type returns date and time.
+In case of other types returns PIDateTime().
| PISystemTime PIVariant::toSystemTime | +( | +) | +const | +
Returns variant content as system time.
+In case of SystemTime type returns system time.
+In case of other types returns PISystemTime::fromSeconds() from double value of variant content.
| PIString PIVariant::toString | +( | +) | +const | +
Returns variant content as string.
+In case of numeric types returns PIString::fromNumber().
+In case of String type returns string value.
+In case of StringList type returns joined string ("(" + PIStringList::join("; ") + ")").
+In case of BitArray or ByteArray types returns number of bits/bytes.
+In case of Time, Date or DateTime types returns toString() of this values.
+In case of SystemTime types returns second and nanoseconds of time ("(PISystemTime::seconds s, PISystemTime::nanoseconds ns)").
+In case of other types returns "".
| PIStringList PIVariant::toStringList | +( | +) | +const | +
Returns variant content as strings list.
+In case of StringList type returns strings list value.
+In case of other types returns PIStringList with one string value of variant content.
| PIBitArray PIVariant::toBitArray | +( | +) | +const | +
Returns variant content as bit array.
+In case of BitArray type returns bit array value.
+In case of other types returns PIBitArray from toLLong() value.
| PIByteArray PIVariant::toByteArray | +( | +) | +const | +
Returns variant content as byte array.
+In case of ByteArray type returns byte array value.
+In case of other types returns empty PIByteArray.
+
|
+ +inline | +
Returns variant content as custom type.
+In case of known types this function equivalent to<Type> function.
+Otherwise returns content as type T.
+
|
+ +inlinestatic | +
Returns new variant from custom type.
+In case of known types this function equivalent PIVariant(T) constructors.
+Otherwise returns variant with content v and type Custom.
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This is the complete list of members for PIVector< T >, including all inherited members.
+| back() | PIVector< T > | inline |
| back() const | PIVector< T > | inline |
| clear() | PIVector< T > | inline |
| compare_func(const T *t0, const T *t1) | PIVector< T > | inlinestatic |
| contains(const T &v) const | PIVector< T > | inline |
| enlarge(llong piv_size) | PIVector< T > | inline |
| etries(const T &v) const | PIVector< T > | inline |
| fill(const T &f=T()) | PIVector< T > | inline |
| front() | PIVector< T > | inline |
| front() const | PIVector< T > | inline |
| isEmpty() const | PIVector< T > | inline |
| operator!=(const PIVector< T > &t) const | PIVector< T > | inline |
| operator<<(const PIVector< T > &other) | PIVector< T > | inline |
| operator==(const PIVector< T > &t) const | PIVector< T > | inline |
| PIVector() | PIVector< T > | inline |
| pop_back() | PIVector< T > | inline |
| pop_front() | PIVector< T > | inline |
| push_back(const T &v) | PIVector< T > | inline |
| push_front(const T &v) | PIVector< T > | inline |
| remove(size_t index, size_t count=1) | PIVector< T > | inline |
| removeAll(const T &v) | PIVector< T > | inline |
| removeOne(const T &v) | PIVector< T > | inline |
| resize(size_t new_size, const T &f=T()) | PIVector< T > | inline |
| size() const | PIVector< T > | inline |
| size_s() const | PIVector< T > | inline |
| sort(CompareFunc compare=compare_func) | PIVector< T > | inline |
| take_back() | PIVector< T > | inline |
| take_front() | PIVector< T > | inline |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Dynamic array of any type. + More...
+ +Inherited by PIQueue< T >, and PIStack< T >.
++Public Member Functions | |
| PIVector () | |
| +size_t | size () const |
| Elements count. | |
| +ssize_t | size_s () const |
| Elements count. | |
| +bool | isEmpty () const |
Return "true" if vector is empty, i.e. size = 0. | |
| +T & | back () |
| Last element of the vector. | |
| +const T & | back () const |
| Last element of the vector. | |
| +T & | front () |
| First element of the vector. | |
| +const T & | front () const |
| First element of the vector. | |
| +bool | operator== (const PIVector< T > &t) const |
| Compare with vector "t". | |
| +bool | operator!= (const PIVector< T > &t) const |
| Compare with vector "t". | |
| +bool | contains (const T &v) const |
Return "true" if vector has at least one element equal "t". | |
| +int | etries (const T &v) const |
| Return how many times element "t" appears in vector. | |
| +PIVector< T > & | clear () |
Clear vector. Equivalent to call "resize(0)" | |
| PIVector< T > & | fill (const T &f=T()) |
| Fill vector with elements "t" leave size is unchanged and return reference to vector. More... | |
| PIVector< T > & | resize (size_t new_size, const T &f=T()) |
| Resize vector to size "size". More... | |
| PIVector< T > & | remove (size_t index, size_t count=1) |
| Remove one element by index "index" and return reference to vector. More... | |
| PIVector< T > & | sort (CompareFunc compare=compare_func) |
| Sort vector using quick sort algorithm and standard compare function. More... | |
| +PIVector< T > & | enlarge (llong piv_size) |
| Increase vector size with "size" elements. | |
| PIVector< T > & | removeOne (const T &v) |
| Remove no more than one element equal "v" and return reference to vector. More... | |
| PIVector< T > & | removeAll (const T &v) |
| Remove all elements equal "v" and return reference to vector. More... | |
| +PIVector< T > & | push_back (const T &v) |
| Add new element "t" at the end of vector and return reference to vector. | |
| +PIVector< T > & | operator<< (const PIVector< T > &other) |
| Add vector "t" at the end of vector and return reference to vector. | |
| +PIVector< T > & | push_front (const T &v) |
| Add new element "t" at the beginning of vector and return reference to vector. | |
| +PIVector< T > & | pop_back () |
| Remove one element from the end of vector and return reference to vector. | |
| +PIVector< T > & | pop_front () |
| Remove one element from the beginning of vector and return reference to vector. | |
| +T | take_back () |
| Remove one element from the end of vector and return it. | |
| +T | take_front () |
| Remove one element from the beginning of vector and return it. | |
+Static Public Member Functions | |
| +static int | compare_func (const T *t0, const T *t1) |
| Standard compare function for type "Type". Return 0 if t0 = t1, -1 if t0 < t1 and 1 if t0 > t1. | |
Dynamic array of any type.
+This class used to store dynamic array of any type of data. In memory data stored linear. You can insert item in any place of remove some items from any place. For quick add elements this is stream operator <<.
+Contructs an empty vector
+ +
+
|
+ +inline | +
Fill vector with elements "t" leave size is unchanged and return reference to vector.
+Example:
+
|
+ +inline | +
Resize vector to size "size".
+Elements removed from end of vector if new size < old size, or added new elements = "new_type" if new size > old size.
+Example:
+
|
+ +inline | +
Remove one element by index "index" and return reference to vector.
+Remove "count" elements by first index "index" and return reference to vector.
+Example:
Example:
+
|
+ +inline | +
Sort vector using quick sort algorithm and standard compare function.
+Example:
With custom compare function:
+
|
+ +inline | +
Remove no more than one element equal "v" and return reference to vector.
+Example:
+
|
+ +inline | +
Remove all elements equal "v" and return reference to vector.
+Example:
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/_unsused | Includes file in src/math |
|---|---|
| pigeometry.h | pimath.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/code | Includes file in src/core |
|---|---|
| picodeinfo.h | pistring.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/code | Includes file in src/io |
|---|---|
| picodeparser.h | pifile.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/code | Includes file in src/math |
|---|---|
| picodeparser.h | pievaluator.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/containers | Includes file in src/core |
|---|---|
| picontainers.h | piincludes.h |
| pideque.h | piincludes.h |
| pivector.h | piincludes.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/core | Includes file in src/containers |
|---|---|
| pibitarray.h | picontainers.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/core | Includes file in src/io |
|---|---|
| piobject.cpp | pifile.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/core | Includes file in src/math |
|---|---|
| pivariant.h | pimath.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/core | Includes file in src/system |
|---|---|
| piincludes.cpp | piconsole.h |
| piinit.cpp | piprocess.h |
| piinit.cpp | pisignals.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/core | Includes file in src/thread |
|---|---|
| piobject.h | pimutex.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/io | Includes file in src/core |
|---|---|
| piiodevice.h | picollection.h |
| piiodevice.h | piinit.h |
| piiodevice.h | pivariant.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/io | Includes file in src/system |
|---|---|
| piethernet.h | piprocess.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/io | Includes file in src/thread |
|---|---|
| pidiagnostics.h | pitimer.h |
| piethernet.h | pitimer.h |
| piiodevice.h | pitimer.h |
| piprotocol.h | pitimer.h |
| piserial.h | pitimer.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/math | Includes file in src/core |
|---|---|
| picrc.h | pistring.h |
| pievaluator.h | pistring.h |
| pimath.h | piinit.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/system | Includes file in src/containers |
|---|---|
| pisignals.h | picontainers.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/system | Includes file in src/io |
|---|---|
| piconsole.cpp | pipeer.h |
| piconsole.h | pidiagnostics.h |
| piconsole.h | piprotocol.h |
| piprocess.h | pifile.h |
| pisystemtests.h | piconfig.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/system | Includes file in src/thread |
|---|---|
| pikbdlistener.h | pithread.h |
| piprocess.h | pithread.h |
| pisystemmonitor.h | pithread.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| File in src/thread | Includes file in src/core |
|---|---|
| pimutex.h | piinit.h |
| pithread.h | piinit.h |
| pithread.h | piobject.h |
| pitimer.h | pitime.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for containers:+Files | |
| file | picontainers.cpp |
| file | picontainers.h |
| Generic containers. | |
| file | pideque.h |
| Dynamic array of any type. | |
| file | pimap.h |
| Associative array with custom types of key and value. | |
| file | piqueue.h |
| file | piset.h |
| Set container. | |
| file | pistack.h |
| Stack container. | |
| file | pivector.h |
| Dynamic array of any type. | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for code:+Files | |
| file | picodeinfo.cpp |
| file | picodeinfo.h |
| C++ code info structs. | |
| file | picodeparser.cpp |
| file | picodeparser.h |
| C++ code parser. | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for src:+Directories | |
| directory | _unsused |
| directory | code |
| directory | containers |
| directory | core |
| directory | io |
| directory | math |
| directory | system |
| directory | thread |
+Files | |
| file | pip.h |
| file | pip_export.h |
| file | pip_version_str.h |
| file | piversion.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for math:+Files | |
| file | picrc.h |
| CRC checksum calculator. | |
| file | pievaluator.cpp |
| file | pievaluator.h |
| Mathematic expressions calculator. | |
| file | pimath.cpp |
| file | pimath.h |
| Many mathematical functions and classes. | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for core:+Files | |
| file | pibitarray.h |
| file | pibytearray.cpp |
| file | pibytearray.h |
| Byte array. | |
| file | pichar.h |
| Unicode char. | |
| file | picli.cpp |
| file | picli.h |
| Command-Line parser. | |
| file | picollection.cpp |
| file | picollection.h |
| Custom elements collection. | |
| file | piincludes.cpp |
| file | piincludes.h |
| Global includes of PIP. | |
| file | piinit.cpp |
| file | piinit.h |
| Initialization. | |
| file | piobject.cpp |
| file | piobject.h |
| Base object. | |
| file | pistatemachine.h |
| Base class for custom state machine. | |
| file | pistring.cpp |
| file | pistring.h |
| String. | |
| file | pitime.cpp |
| file | pitime.h |
| Time structs. | |
| file | pivariant.cpp |
| file | pivariant.h |
| Variant type. | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for thread:+Files | |
| file | pimutex.cpp |
| file | pimutex.h |
| Mutex. | |
| file | pithread.cpp |
| file | pithread.h |
| Thread. | |
| file | pitimer.cpp |
| file | pitimer.h |
| Timer. | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for io:+Files | |
| file | pibinarylog.cpp |
| file | pibinarylog.h |
| Binary log. | |
| file | piconfig.cpp |
| file | piconfig.h |
| Configuration file. | |
| file | piconnection.cpp |
| file | piconnection.h |
| Complex I/O point. | |
| file | pidiagnostics.cpp |
| file | pidiagnostics.h |
| Connection quality diagnostics. | |
| file | pidir.cpp |
| file | pidir.h |
| file | piethernet.cpp |
| file | piethernet.h |
| Ethernet device. | |
| file | pifile.cpp |
| file | pifile.h |
| Local file. | |
| file | piiodevice.cpp |
| file | piiodevice.h |
| Abstract input/output device. | |
| file | pimultiprotocol.cpp |
| file | pimultiprotocol.h |
| file | pipacketextractor.cpp |
| file | pipacketextractor.h |
| Packets extractor. | |
| file | pipeer.cpp |
| file | pipeer.h |
| Peering net node. | |
| file | piprotocol.cpp |
| file | piprotocol.h |
| Highly configurable from file I/O channel. | |
| file | piserial.cpp |
| file | piserial.h |
| Serial device. | |
| file | piusb.cpp |
| file | piusb.h |
| USB device. | |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
Directory dependency graph for system:+Files | |
| file | picodec.cpp |
| file | picodec.h |
| file | piconsole.cpp |
| file | piconsole.h |
| Console output class. | |
| file | pikbdlistener.cpp |
| file | pikbdlistener.h |
| Keyboard console input listener. | |
| file | pimonitor.cpp |
| file | pimonitor.h |
| file | piprocess.cpp |
| file | piprocess.h |
| Process. | |
| file | pisignals.cpp |
| file | pisignals.h |
| System signals. | |
| file | pisystemmonitor.cpp |
| file | pisystemmonitor.h |
| file | pisystemtests.cpp |
| file | pisystemtests.h |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| ▼ src | |
| ▼ code | |
| picodeinfo.h | C++ code info structs |
| picodeparser.h | C++ code parser |
| ▼ containers | |
| picontainers.h | Generic containers |
| pideque.h | Dynamic array of any type |
| pimap.h | Associative array with custom types of key and value |
| piset.h | Set container |
| pistack.h | Stack container |
| pivector.h | Dynamic array of any type |
| ▼ core | |
| pibytearray.h | Byte array |
| pichar.h | Unicode char |
| picli.h | Command-Line parser |
| picollection.h | Custom elements collection |
| piincludes.h | Global includes of PIP |
| piinit.h | Initialization |
| piobject.h | Base object |
| pistatemachine.h | Base class for custom state machine |
| pistring.h | String |
| pitime.h | Time structs |
| pivariant.h | Variant type |
| ▼ io | |
| pibinarylog.h | Binary log |
| piconfig.h | Configuration file |
| piconnection.h | Complex I/O point |
| pidiagnostics.h | Connection quality diagnostics |
| piethernet.h | Ethernet device |
| pifile.h | Local file |
| piiodevice.h | Abstract input/output device |
| pipacketextractor.h | Packets extractor |
| pipeer.h | Peering net node |
| piprotocol.h | Highly configurable from file I/O channel |
| piserial.h | Serial device |
| piusb.h | USB device |
| ▼ math | |
| picrc.h | CRC checksum calculator |
| pievaluator.h | Mathematic expressions calculator |
| pimath.h | Many mathematical functions and classes |
| ▼ system | |
| piconsole.h | Console output class |
| pikbdlistener.h | Keyboard console input listener |
| piprocess.h | Process |
| pisignals.h | System signals |
| ▼ thread | |
| pimutex.h | Mutex |
| pithread.h | Thread |
| pitimer.h | Timer |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
This page explains how to interpret the graphs that are generated by doxygen.
+Consider the following example:
This will result in the following graph:
+The boxes in the above graph have the following meaning:
+The arrows have the following meaning:
+|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| CPIConfig::Entry | Entry of configuration file |
| CPIEthernet::Interface | Network interface descriptor |
| CPIByteArray | Byte array |
| CPIChar | Unicode char |
| CPICollection | Interface to discover element groups |
| CPICout | Class for formatted output similar std::cout |
| CPIEvaluator | This class provide mathematical evaluations of custom expression |
| CPIFlags< Enum > | This class used as container for bit flags |
| CPIFlags< Attribute > | |
| CPIFlags< InterfaceFlag > | |
| CPIFlags< PICodeInfo::TypeFlag > | |
| CPIFlags< PIConsole::Format > | |
| CPIFlags< PICoutControl > | |
| CPIMutex | Mutex |
| ▼CPIObject | This is base class for any classes which use events -> handlers mechanism |
| CPICLI | Command-line arguments parser |
| CPIConnection | Complex Input/Output point |
| CPIProtocol | |
| CPIStateMachine< Type > | Base class for custom state machine |
| ►CPIThread | Thread class |
| ►CPITimer | Timer |
| CPISet< T > | Set of any type |
| CPISet< const void * > | |
| CPISet< PIObject * > | |
| CPISet< PIString > | |
| CPIString | String class |
| CPIStringList | Strings array class |
| CPISystemTime | System time |
| CPITimeMeasurer | Time measurements |
| CPIVariant | Variant type |
| CPIVector< T > | Dynamic array of any type |
| CPIVector< __EHData > | |
| CPIVector< __EHFunc > | |
| CPIVector< _PITimerImp_Pool * > | |
| CPIVector< Argument > | |
| CPIVector< Column > | |
| CPIVector< complexd > | |
| CPIVector< Condition > | |
| CPIVector< Connection > | |
| CPIVector< const PIObject * > | |
| CPIVector< Define > | |
| CPIVector< Delimiter > | |
| CPIVector< DeviceData * > | |
| CPIVector< double > | |
| CPIVector< Entity * > | |
| ▼CPIVector< Entry * > | |
| CPIConfig::Branch | Branch is a list of entries of configuration file |
| CPIVector< Entry > | |
| CPIVector< Enum > | |
| CPIVector< Enumerator > | |
| CPIVector< Extractor * > | |
| CPIVector< Group > | |
| CPIVector< int > | |
| CPIVector< Macro > | |
| CPIVector< Member > | |
| CPIVector< node > | |
| CPIVector< PeerInfo > | |
| CPIVector< PICodeInfo::EnumeratorInfo > | |
| CPIVector< PICodeInfo::FunctionInfo > | |
| CPIVector< PICodeInfo::TypeInfo > | |
| CPIVector< PIConnection * > | |
| CPIVector< PIDiagnostics * > | |
| CPIVector< PIEthernet * > | |
| ▼CPIVector< PIEthernet::Interface > | |
| CPIEthernet::InterfaceList | Array of Interface with some features |
| CPIVector< PIEvaluatorTypes::Element > | |
| CPIVector< PIEvaluatorTypes::Function > | |
| CPIVector< PIEvaluatorTypes::Instruction > | |
| CPIVector< PIEvaluatorTypes::Variable > | |
| CPIVector< PIIODevice * > | |
| CPIVector< PIIODevice::DeviceMode > | |
| CPIVector< PIMathVectord > | |
| CPIVector< PIObject * > | |
| CPIVector< PIPair< PIByteArray, ullong > > | |
| CPIVector< PIProtocol * > | |
| CPIVector< PIStateMachine::Rule > | |
| CPIVector< PIStateMachine::State > | |
| CPIVector< PIString > | |
| CPIVector< PIUSB::Configuration > | |
| CPIVector< PIUSB::Endpoint > | |
| CPIVector< PIUSB::Interface > | |
| CPIVector< PIVariant > | |
| CPIVector< PIVector< double > > | |
| CPIVector< PIVector< PeerInfo * > > | |
| CPIVector< PIVector< PIIODevice * > > | |
| CPIVector< PIVector< PIPacketExtractor * > > | |
| CPIVector< PIVector< Type > > | |
| CPIVector< RemoteClient > | |
| CPIVector< Sender * > | |
| CPIVector< SOCKET > | |
| CPIVector< Tab > | |
| CPIVector< Type > | |
| CPIVector< Typedef > | |
| CPIVector< uchar > | |
| CPIVector< Variable > | |
| CPIByteArray::RawData | Help struct to store/restore custom blocks of data to/from PIByteArray |
| CPIStateMachine< Type >::Rule | Rule of transition between states of machine |
| CPIStateMachine< Type >::State | State of machine |
| CTransferFunction | Differential evaluations |
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
PIP - Platform-Independent Primitives - is crossplatform library for C++ developers. It is wrap around STL and pure C++. This library can help developers write non-GUI projects much more quickly, efficiently and customizable than on pure C++. Library contains many classes, some of them are pure abstract, some classes can be used as they are, some classes should be inherited to new classes. PIP provide classes:
|
+ PIP
+ 0.4.1_alpha3
+
+ Platform-Independent Primitives
+ |
+
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| + |
| t |