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

Definition at line 99 of file objtree.h.

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

Definition at line 107 of file objtree.h.

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

Definition at line 115 of file objtree.h.

void objtree::property_t::setValue ( 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 ( const char *  title  )  const throw () [inherited]

Definition at line 92 of file objtree.cpp.

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

Definition at line 149 of file objtree.h.

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

Definition at line 158 of file objtree.h.

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

Definition at line 167 of file objtree.h.

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

Definition at line 176 of file objtree.h.

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

Definition at line 120 of file objtree.cpp.

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

getProperties -- retrieves properties common to all objects

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

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

virtual void objtree::List::setProperties ( const char *  id_query,
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 ( const char *  name  )  [pure virtual, inherited]

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

virtual void objtree::Tree::getListNames ( 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 ( const char *  text  )  throw ()
smart_ptr< Datahash > objtree::getDatahash ( const property_set_t &  pset  ) 

given a property set, serialize into a datahash object

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

given a datahash, deserialize into a property set