Scopira
20080306
|
#include <prop.h>
Public Types | |
typedef std::list< scopira::tool::count_ptr< scopira::tool::property > > | sproplist_t |
typedef std::map< std::string, sproplist_t > | propmap_t |
Public Types inherited from scopira::tool::property | |
typedef scopira::tool::iterator_g< scopira::tool::property * > | iterator |
typedef scopira::tool::iterator_g< const std::string * > | key_iterator |
Public Member Functions | |
property_node (void) | |
default constructor | |
virtual | ~property_node () |
destructor | |
virtual oflow_i & | print (oflow_i &o) const |
pretty ascii printer | |
virtual bool | load (iobjflow_i &in) |
serialization loader | |
virtual void | save (oobjflow_i &out) const |
serialization saver | |
virtual bool | is_node (void) const |
is this a record prop? | |
virtual void | add_end (const std::string &name, property *prop) |
virtual iterator | get (const std::string &name) |
virtual property * | get_first (const std::string &name) |
virtual size_t | get_size (const std::string &name) const |
virtual bool | contains (const std::string &name) const |
virtual void | remove (const std::string &name) |
virtual key_iterator | get_key_iterator (void) |
virtual const std::string * | get_string_value (const std::string &name) const |
virtual object * | get_object_value (const std::string &name) const |
Public Member Functions inherited from scopira::tool::property | |
property (void) | |
default constructor | |
property (const std::string &_val) | |
initing ctor | |
property (object *o) | |
initing ctor | |
virtual | ~property () |
destructor | |
void | set_value (const std::string &val) |
sets the value string | |
const std::string & | get_value_as_string (void) const |
gets the value string | |
void | set_value (object *obj) |
sets the value, as an object*, will be ref counted | |
object * | get_value_as_object (void) const |
gets the value, as a object | |
Public Member Functions inherited from scopira::tool::object | |
virtual | ~object () |
int | add_ref (void) const |
bool | sub_ref (void) const |
void | auto_ref (void) const |
int | current_ref (void) const |
bool | is_alive_object (void) const |
bool | is_dead_object (void) const |
Protected Attributes | |
propmap_t | dm_propmap |
Protected Attributes inherited from scopira::tool::property | |
std::string | dm_val |
count_ptr< object > | dm_obj |
Additional Inherited Members | |
Protected Member Functions inherited from scopira::tool::object | |
object (void) | |
object (bool neverusecounter) | |
a string-prop_string list "record" of properties
|
virtual |
appends to a property. creates a new property if need be
Reimplemented from scopira::tool::property.
|
virtual |
does the given key exist, at all
Reimplemented from scopira::tool::property.
|
virtual |
gets a list of properties. if name doesnt exist, a valid, empty iterator will be returned
Reimplemented from scopira::tool::property.
|
virtual |
gets the first entry. returns null if doesnt exit
Reimplemented from scopira::tool::property.
|
virtual |
|
virtual |
convinience routine, will always work, might return null
Reimplemented from scopira::tool::property.
|
virtual |
gets the size of a list, same cost as list<>::size
Reimplemented from scopira::tool::property.
|
virtual |
convinience routine, will always work, might return null
Reimplemented from scopira::tool::property.
|
virtual |
removes all the entries in the given prop
Reimplemented from scopira::tool::property.