Classes | Functions | Variables

objtree Namespace Reference
[Object Tree API]

Classes

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

Functions

static void verifyLowerCase (const char *p)
static bool idMatchesQuery (const char *id, const char *query)
bool isValidPropertyName (const char *candidate_name) throw ()
 returns true if the given name is an acceptable property name
bool isTrue (const char *text) throw ()
void persist (const property_t &p, std::string &val)
void depersist (const char *text, property_t &prop)
void save (std::ostream &stream, const property_set_t &pset)
void load (std::istream &stream, property_set_t &pset)
smart_ptr< DatahashgetDatahash (const property_set_t &pset)
 given a property set, serialize into a datahash object
void getPropertySet (const Datahash *hash,property_set_t &pset)
 given a datahash, deserialize into a property set
static bool getBoolean (const dictionary_t &data, const char *key)
static void addBooleanIfTrue (std::ostream &out, const char *key, bool val)
static void addPrettyIfTrue (std::ostream &out, const char *key, bool val)
static std::string escape (const char *p)
static std::string unescape (const char *p)
static void validateColorComponent (int x)
static void addColorComponent (std::string &s, const char *tag, int x, int default_value)
color_t getColorFromString (const char *text)
void getStringFromColor (const color_t &c, std::string &s)
void getFontFromString (const char *info, font_t &font)
void getStringFromFont (const font_t &font, std::string &out)
void getDisplayStringFromFont (const font_t &font, std::string &out)

Variables

static const char s_escape = (char) 205

Function Documentation

static void objtree::verifyLowerCase ( const char *  p  )  [static]

Definition at line 52 of file objtree.cpp.

static bool objtree::idMatchesQuery ( const char *  id,
const char *  query 
) [static]

Definition at line 66 of file objtree.cpp.

bool objtree::isValidPropertyName ( const char *  candidate_name  )  throw ()

returns true if the given name is an acceptable property name

property names are very restricted! alphanumerics and hyphens only goal is names that do not need to be URL encoded etc

void objtree::persist ( const property_t &  p,
std::string &  val 
)

Definition at line 499 of file objtree.cpp.

void objtree::depersist ( const char *  text,
property_t &  prop 
)

Definition at line 516 of file objtree.cpp.

void objtree::save ( std::ostream &  stream,
const property_set_t &  pset 
)

Definition at line 544 of file objtree.cpp.

void objtree::load ( std::istream &  stream,
property_set_t &  pset 
)

Definition at line 567 of file objtree.cpp.

static bool objtree::getBoolean ( const dictionary_t data,
const char *  key 
) [static]

Definition at line 50 of file prop_types.cpp.

static void objtree::addBooleanIfTrue ( std::ostream &  out,
const char *  key,
bool  val 
) [static]

Definition at line 65 of file prop_types.cpp.

static void objtree::addPrettyIfTrue ( std::ostream &  out,
const char *  key,
bool  val 
) [static]

Definition at line 83 of file prop_types.cpp.

static std::string objtree::escape ( const char *  p  )  [static]

Definition at line 97 of file prop_types.cpp.

static std::string objtree::unescape ( const char *  p  )  [static]

Definition at line 118 of file prop_types.cpp.

static void objtree::validateColorComponent ( int  x  )  [static]

Definition at line 139 of file prop_types.cpp.

static void objtree::addColorComponent ( std::string &  s,
const char *  tag,
int  x,
int  default_value 
) [static]

Definition at line 153 of file prop_types.cpp.

color_t objtree::getColorFromString ( const char *  text  ) 
void objtree::getStringFromColor ( const color_t c,
std::string &  s 
)
void objtree::getFontFromString ( const char *  info,
font_t &  font 
)
void objtree::getStringFromFont ( const font_t &  font,
std::string &  out 
)
void objtree::getDisplayStringFromFont ( const font_t &  font,
std::string &  out 
)

Variable Documentation

const char objtree::s_escape = (char) 205 [static]

Definition at line 39 of file prop_types.cpp.