Classes | Namespaces | Functions

Object Tree API
[General Utility Libraries]

API for manipulating hierarchical trees of objects + properties. More...

Collaboration diagram for Object Tree API:

Classes

struct  objtree::property_t
 abstraction of a general property of an object More...
struct  objtree::property_set_t
 a set of properties. More...
class  objtree::List
 How you interact with this object is the key to the objtree library. More...
class  objtree::Tree
 the root object for discovering objects More...

Namespaces

namespace  objtree

Functions

 objtree::property_t::property_t (void) throw ()
void objtree::property_t::clear (void) throw ()
void objtree::property_t::setFieldValue (IN const char *field, IN const char *value)
const char * objtree::property_t::getFieldValue (IN const char *field) const throw ()
const char * objtree::property_t::getOptionalFieldValue (IN const char *field, IN const char *default_value) const throw ()
void objtree::property_t::setValue (IN const char *value) throw ()
const char * objtree::property_t::getValue (void) const throw ()
void objtree::property_t::dump (IN const char *title) const throw ()
property_t * objtree::property_set_t::getProperty (IN const char *name) throw ()
const property_t * objtree::property_set_t::getProperty (IN const char *name) const throw ()
const char * objtree::property_set_t::getValue (IN const char *name) const throw ()
const char * objtree::property_set_t::getOptionalValue (IN const char *name, IN const char *default_value) const throw ()
void objtree::property_set_t::dump (IN const char *title) const throw ()
virtual bool objtree::List::addObject (IN const char *id)=0
virtual bool objtree::List::removeObject (IN const char *id)=0
virtual void objtree::List::getObjects (IN const char *id_query, OUT VecString &ids)=0
virtual void objtree::List::getProperties (IN const char *id_query, OUT property_set_t &pset)=0
 getProperties -- retrieves properties common to all objects
virtual void objtree::List::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 objtree::List::setProperties (IN const char *id_query, IN const property_set_t &pset)=0
 setProperties -- sets properties only if exists + matches on object
static smart_ptr< List > objtree::List::create (void)
virtual List * objtree::Tree::getList (IN const char *name)=0
 return the list (and create if no list exists yet by that name)
virtual void objtree::Tree::getListNames (OUT VecString &names)=0
 return names of all lists
static smart_ptr< Tree > objtree::Tree::create (void)
bool objtree::isTrue (IN const char *text) throw ()
smart_ptr< Datahashobjtree::getDatahash (IN const property_set_t &pset)
 given a property set, serialize into a datahash object
void objtree::getPropertySet (IN const Datahash *hash, OUT property_set_t &pset)
 given a datahash, deserialize into a property set

Detailed Description

API for manipulating hierarchical trees of objects + properties.

This is typically used by UI applications when the user has selected a number of different object, and then wants to see/edit properties. This low-level API abstracts the general (hierarchical) set of objects.


Function Documentation

objtree::property_t::property_t ( void   )  throw () [inline, inherited]

Definition at line 92 of file objtree.h.

void objtree::property_t::clear ( void   )  throw () [inline, inherited]

Definition at line 94 of file objtree.h.

void objtree::property_t::setFieldValue ( IN const char *  field,
IN const char *  value 
) [inline, inherited]

Definition at line 99 of file objtree.h.

const char* objtree::property_t::getFieldValue ( IN const char *  field  )  const throw () [inline, inherited]

Definition at line 107 of file objtree.h.

const char* objtree::property_t::getOptionalFieldValue ( IN const char *  field,
IN const char *  default_value 
) const throw () [inline, inherited]

Definition at line 115 of file objtree.h.

void objtree::property_t::setValue ( IN const char *  value  )  throw () [inline, inherited]

Definition at line 121 of file objtree.h.

const char* objtree::property_t::getValue ( void   )  const throw () [inline, inherited]

Definition at line 127 of file objtree.h.

void objtree::property_t::dump ( IN const char *  title  )  const throw () [inherited]

Definition at line 92 of file objtree.cpp.

property_t* objtree::property_set_t::getProperty ( IN const char *  name  )  throw () [inline, inherited]

Definition at line 149 of file objtree.h.

const property_t* objtree::property_set_t::getProperty ( IN const char *  name  )  const throw () [inline, inherited]

Definition at line 158 of file objtree.h.

const char* objtree::property_set_t::getValue ( IN const char *  name  )  const throw () [inline, inherited]

Definition at line 167 of file objtree.h.

const char* objtree::property_set_t::getOptionalValue ( IN const char *  name,
IN const char *  default_value 
) const throw () [inline, inherited]

Definition at line 176 of file objtree.h.

void objtree::property_set_t::dump ( IN const char *  title  )  const throw () [inherited]

Definition at line 120 of file objtree.cpp.

virtual bool objtree::List::addObject ( IN const char *  id  )  [pure virtual, inherited]
virtual bool objtree::List::removeObject ( IN const char *  id  )  [pure virtual, inherited]
virtual void objtree::List::getObjects ( IN const char *  id_query,
OUT VecString &  ids 
) [pure virtual, inherited]
virtual void objtree::List::getProperties ( IN const char *  id_query,
OUT property_set_t pset 
) [pure virtual, inherited]

getProperties -- retrieves properties common to all objects

virtual void objtree::List::addProperties ( IN const char *  id_query,
IN const property_set_t pset 
) [pure virtual, inherited]

addProperties -- adds if necessary, sets all properties on all objs

virtual void objtree::List::setProperties ( IN const char *  id_query,
IN const property_set_t pset 
) [pure virtual, inherited]

setProperties -- sets properties only if exists + matches on object

smart_ptr< List > objtree::List::create ( void   )  [static, inherited]

Definition at line 672 of file objtree.cpp.

virtual List* objtree::Tree::getList ( IN const char *  name  )  [pure virtual, inherited]

return the list (and create if no list exists yet by that name)

virtual void objtree::Tree::getListNames ( OUT VecString &  names  )  [pure virtual, inherited]

return names of all lists

smart_ptr< Tree > objtree::Tree::create ( void   )  [static, inherited]

Definition at line 688 of file objtree.cpp.

bool objtree::isTrue ( IN const char *  text  )  throw ()
smart_ptr< Datahash > objtree::getDatahash ( IN const property_set_t &  pset  ) 

given a property set, serialize into a datahash object

void objtree::getPropertySet ( IN const Datahash hash,
OUT property_set_t &  pset 
)

given a datahash, deserialize into a property set