Scopira  20080306
scopira::core::objecttype Class Reference

#include <objecttype.h>

Inheritance diagram for scopira::core::objecttype:
scopira::tool::object scopira::core::viewtype

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)
 
objecttypefind (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
 
- 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
 
virtual scopira::tool::oflow_iprint (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
 
- Protected Member Functions inherited from scopira::tool::object
 object (void)
 
 object (bool neverusecounter)
 

Detailed Description

A representative of an object type.

Author
Aleksander Demko

Member Function Documentation

◆ add_child()

void scopira::core::objecttype::add_child ( objecttype d)

Adds a child data type to this

Author
Aleksander Demko

Referenced by has_copyfunc().

◆ base_depth()

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.

Author
Aleksander Demko

Referenced by has_copyfunc().

◆ find()

objecttype* scopira::core::objecttype::find ( const std::string &  _name)

Searches all the decendants for a type of the given name

Parameters
_namethe name of the type
Returns
the found objecttype, null if not found
Author
Aleksander Demko

Referenced by has_copyfunc().

◆ get_child_iterator()

objecttype_iterator scopira::core::objecttype::get_child_iterator ( void  )

For iteration over the children

Author
Aleksander Demko

Referenced by has_copyfunc().

◆ get_name()

const std::string& scopira::core::objecttype::get_name ( void  ) const
inline

Gets the name of this type.

Author
Aleksander Demko

◆ get_parent_iterator()

objecttype_iterator scopira::core::objecttype::get_parent_iterator ( void  )

For iteration over the parents

Author
Aleksander Demko

Referenced by has_copyfunc().

◆ has_copyfunc()

bool scopira::core::objecttype::has_copyfunc ( void  ) const
inline

Does this object have a registered copy constructor?

Author
Aleksander Demko

References add_child(), base_depth(), find(), get_child_iterator(), get_parent_iterator(), is_base(), and print_tree().

◆ is_base()

bool scopira::core::objecttype::is_base ( const objecttype d) const

Is this type a basetype (ancestor) for the given type?

Parameters
dthe type to test against
Author
Aleksander Demko

Referenced by has_copyfunc().

◆ print_tree()

void scopira::core::objecttype::print_tree ( int  indent = 0)

Used for debugging

Author
Aleksander Demko

Referenced by has_copyfunc().


The documentation for this class was generated from the following file: