How you interact with this object is the key to the objtree library. More...
#include <objtree.h>
Public Member Functions | |
virtual | ~List (void) throw () |
virtual bool | addObject (IN const char *id)=0 |
virtual bool | removeObject (IN const char *id)=0 |
virtual void | getObjects (IN const char *id_query, OUT VecString &ids)=0 |
virtual void | getProperties (IN const char *id_query, OUT property_set_t &pset)=0 |
getProperties -- retrieves properties common to all objects | |
virtual void | addProperties (IN const char *id_query, IN const property_set_t &pset)=0 |
addProperties -- adds if necessary, sets all properties on all objs | |
virtual void | setProperties (IN const char *id_query, IN const property_set_t &pset)=0 |
setProperties -- sets properties only if exists + matches on object | |
Static Public Member Functions | |
static smart_ptr< List > | create (void) |
How you interact with this object is the key to the objtree library.
You can add and remove objects by their (client-specified) ID.
You can then iteract with multiple objects at once by specifying the targets as an id_query rather than a single ID. For instance, you could call
list->setProperties("*", my_property_set);
which would update that property for all objects in the list, provided they already had a property of that name.
NOTE: query support is a bit limited. At the moment you can only use a specific ID, or the query "*" which specifies all IDs in the list. Better query support could obviously be added but I haven't needed it.
Definition at line 207 of file objtree.h.
objtree::List::~List | ( | void | ) | throw () [virtual] |
Definition at line 39 of file objtree.cpp.