Public Member Functions | Static Public Member Functions

objtree::List Class Reference
[Object Tree API]

How you interact with this object is the key to the objtree library. More...

#include <objtree.h>

Inheritance diagram for objtree::List:
Inheritance graph

List of all members.

Public Member Functions

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 Public Member Functions

static smart_ptr< Listcreate (void)

Detailed Description

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.

Constructor & Destructor Documentation

objtree::List::~List ( void   )  throw () [virtual]

Definition at line 39 of file objtree.cpp.

The documentation for this class was generated from the following files: