How you interact with this object is the key to the objtree library. More...
|virtual||~List (void) throw ()|
|virtual bool||addObject (const char *id)=0|
|virtual bool||removeObject (const char *id)=0|
|virtual void||getObjects (const char *id_query, VecString &ids)=0|
|virtual void||getProperties (const char *id_query, property_set_t &pset)=0|
|getProperties -- retrieves properties common to all objects |
|virtual void||addProperties (const char *id_query, const property_set_t &pset)=0|
|addProperties -- adds if necessary, sets all properties on all objs |
|virtual void||setProperties (const char *id_query, const property_set_t &pset)=0|
|setProperties -- sets properties only if exists + matches on object |
|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
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.