Scopira 20080306

scopira::core::objecttype Class Reference

#include <objecttype.h>

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

List of all members.

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

Protected Member Functions

virtual void print_tree_this (int indent)
 internal

Detailed Description

A representative of an object type.

Author:
Aleksander Demko

Member Function Documentation

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

Adds a child data type to this

Author:
Aleksander Demko
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
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
objecttype_iterator scopira::core::objecttype::get_child_iterator ( void  )

For iteration over the children

Author:
Aleksander Demko
const std::string& scopira::core::objecttype::get_name ( void  ) const [inline]

Gets the name of this type.

Author:
Aleksander Demko
objecttype_iterator scopira::core::objecttype::get_parent_iterator ( void  )

For iteration over the parents

Author:
Aleksander Demko
bool scopira::core::objecttype::has_copyfunc ( void  ) const [inline]

Does this object have a *registered* copy constructor?

Author:
Aleksander Demko
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
void scopira::core::objecttype::print_tree ( int  indent = 0)

Used for debugging

Author:
Aleksander Demko

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