![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Global collection of PIObject-based instances grouped by name. More...
#include <picollection.h>
Classes | |
| class | CollectionAdder |
| Helper that registers object in collection during static initialization. More... | |
Public Member Functions | |
| PICollection () | |
| Constructs collection helper. | |
Static Public Member Functions | |
| static PIStringList | groups () |
| Returns names of all existing groups. | |
| static PIVector< const PIObject * > | groupElements (const PIString &group) |
| Returns all elements stored in group "group". | |
| static bool | addToGroup (const PIString &group, const PIObject *element) |
| Adds object to group "group" if that group has no object of the same runtime class. | |
Related Functions | |
(Note that these are not member functions.) | |
| #define | ADD_TO_COLLECTION(group, object) |
| Adds existing object to group "group". More... | |
| #define | ADD_TO_COLLECTION_WITH_NAME(group, object, name) |
| Adds existing object to group "group" and assigns name "name". More... | |
| #define | ADD_NEW_TO_COLLECTION(group, class) |
| Creates and adds new object of class "class" to group "group". More... | |
| #define | ADD_NEW_TO_COLLECTION_WITH_NAME(group, class, name) |
| Creates and adds new object of class "class" to group "group" and assigns name "name". More... | |
Global collection of PIObject-based instances grouped by name.
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 |
Adds existing object to group "group".
If this is no group with name "group" it will be created. Only one element of the class "object" can be in group. If this is already exists nothing be happens.
"object" should to be pointer to object based on PIObject.
|
related |
Adds existing object to group "group" and assigns name "name".
Similar to ADD_TO_COLLECTION(group, object), but also sets object name.
|
related |
Creates and adds new object of class "class" to group "group".
If this is no group with name "group" it will be created. Only one element of the class "class" can be in group. If this is already exists nothing be happens.
"class" should to be name of the any class based on PIObject.
|
related |
Creates and adds new object of class "class" to group "group" and assigns name "name".
Similar to ADD_NEW_TO_COLLECTION(group, class), but also sets object name.