Scopira
20080306
|
#include <objecttype.h>
Public Types | |
typedef scopira::tool::iterator_g< objecttype * > | objecttype_iterator |
Public Member Functions | |
objecttype (const std::string &name, copyfunc_t cp) | |
ctor | |
const std::string & | get_name (void) const |
bool | has_copyfunc (void) const |
void | add_child (objecttype *d) |
objecttype_iterator | get_parent_iterator (void) |
objecttype_iterator | get_child_iterator (void) |
objecttype * | find (const std::string &_name) |
bool | is_base (const objecttype *d) const |
int | base_depth (const objecttype *d) const |
void | print_tree (int indent=0) |
template<class CT > | |
CT * | load_copy (const scopira::tool::object *src) const |
internal | |
![]() | |
virtual | ~object () |
int | add_ref (void) const |
bool | sub_ref (void) const |
void | auto_ref (void) const |
int | current_ref (void) const |
virtual scopira::tool::oflow_i & | print (scopira::tool::oflow_i &o) const |
virtual bool | load (scopira::tool::iobjflow_i &in) |
virtual void | save (scopira::tool::oobjflow_i &out) const |
bool | is_alive_object (void) const |
bool | is_dead_object (void) const |
Protected Member Functions | |
virtual void | print_tree_this (int indent) |
internal | |
![]() | |
object (void) | |
object (bool neverusecounter) | |
A representative of an object type.
void scopira::core::objecttype::add_child | ( | objecttype * | d | ) |
Adds a child data type to this
Referenced by has_copyfunc().
int scopira::core::objecttype::base_depth | ( | const objecttype * | d | ) | const |
Calculates the distance (depth) that this type is to the given type. If this class is NOT a base, -1 is returned.
Referenced by has_copyfunc().
objecttype* scopira::core::objecttype::find | ( | const std::string & | _name | ) |
Searches all the decendants for a type of the given name
_name | the name of the type |
Referenced by has_copyfunc().
objecttype_iterator scopira::core::objecttype::get_child_iterator | ( | void | ) |
For iteration over the children
Referenced by has_copyfunc().
|
inline |
Gets the name of this type.
objecttype_iterator scopira::core::objecttype::get_parent_iterator | ( | void | ) |
For iteration over the parents
Referenced by has_copyfunc().
|
inline |
Does this object have a registered copy constructor?
References add_child(), base_depth(), find(), get_child_iterator(), get_parent_iterator(), is_base(), and print_tree().
bool scopira::core::objecttype::is_base | ( | const objecttype * | d | ) | const |
Is this type a basetype (ancestor) for the given type?
d | the type to test against |
Referenced by has_copyfunc().
void scopira::core::objecttype::print_tree | ( | int | indent = 0 | ) |
Used for debugging
Referenced by has_copyfunc().