This class provides the default implementation for most types. More...
#include <typebase.h>

Public Member Functions | |
| virtual IType::iterator | begin () |
| Gets the iterator to the begin over this type's attached types. | |
| virtual IType::iterator | end () |
| Gets the iterator to the end over this type's attached types. | |
| virtual const TYPELIST & | getAttachedTypes () const |
Returns all attached IType instances. | |
| virtual BOUNDINGBOX | getBoundingBox () const |
| Gets the bounding box of the type. | |
| virtual const std::string & | getId () const |
| Gets the identifier. | |
| virtual IType * | getParent () const |
Returns the parent IType. | |
| virtual bool | isNull () const |
| Checks if the type is null type. | |
| virtual void | setDescription (const std::string &desc) |
| Sets the description of the type. | |
| virtual void | setId (const std::string &id) |
| Sets the identifier. | |
Protected Member Functions | |
| virtual IType * | attachType (IType *type, const TYPELIST::iterator &before, bool check=true) throw (Exception::AttachException) |
Attaches a child at the position before. | |
| virtual IType::Ptr | clone () const throw (Exception::CloneNotSupportedException) |
| Creates a clone of the type. | |
| virtual const std::string & | getDescription () const |
| Gets the description of the type. | |
| virtual std::string | getTypeName () const |
| Displayable name of the IType. | |
| virtual bool | isValid () const |
| virtual | operator float () const throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
Converts the type into a float. | |
| virtual IType * | resolve (const std::string &id) const |
| Resolves a type by its ID. | |
This class provides the default implementation for most types.
| HGL::IType * TypeBase::attachType | ( | HGL::IType * | type, | |
| const TYPELIST::iterator & | before, | |||
| bool | check = true | |||
| ) | throw (Exception::AttachException) [protected, virtual] |
Attaches a child at the position before.
It updates the parent of the attached type to this type as well.
| type | the IType to attach as child | |
| before | the type will be attached before the type referenced by before | |
| check | true (default), if validity checks should be performed |
Reimplemented in HGL::Type::AssignmentOperator, HGL::Type::Curve, HGL::Type::Line, HGL::Type::RenderCallback, and HGL::Type::VirtualGroup.
| HGL::IType::iterator TypeBase::begin | ( | ) | [virtual] |
Gets the iterator to the begin over this type's attached types.
Implements HGL::IType.
| HGL::IType::Ptr TypeBase::clone | ( | ) | const throw (Exception::CloneNotSupportedException) [protected, virtual] |
Creates a clone of the type.
Implements HGL::IType.
Reimplemented in HGL::Type::FloatParam.
| HGL::IType::iterator TypeBase::end | ( | ) | [virtual] |
Gets the iterator to the end over this type's attached types.
Implements HGL::IType.
| const HGL::IType::TYPELIST & TypeBase::getAttachedTypes | ( | ) | const [virtual] |
Returns all attached IType instances.
IType instances Implements HGL::IType.
Reimplemented in HGL::Type::RenderCallback, and HGL::Type::VirtualGroup.
| HGL::IType::BOUNDINGBOX TypeBase::getBoundingBox | ( | ) | const [virtual] |
Gets the bounding box of the type.
Implements HGL::IType.
Reimplemented in HGL::Type::Fill, HGL::Type::Line, HGL::Type::ParamBase, HGL::Type::Point, HGL::Type::Text, and HGL::Type::Vector2D.
| const std::string & TypeBase::getDescription | ( | ) | const [protected, virtual] |
| const std::string & TypeBase::getId | ( | ) | const [virtual] |
Gets the identifier.
Implements HGL::IType.
Reimplemented in HGL::Type::Procedure, and HGL::Type::NamedParam.
| HGL::IType * TypeBase::getParent | ( | ) | const [virtual] |
Returns the parent IType.
IType or NULL if there is no parent Implements HGL::IType.
| std::string TypeBase::getTypeName | ( | ) | const [protected, virtual] |
Displayable name of the IType.
Reimplemented in HGL::Type::ExpressionParam, and HGL::Type::NamedParam.
| bool TypeBase::isNull | ( | ) | const [virtual] |
Checks if the type is null type.
true if the type is null type, false otherwise Implements HGL::IType.
| bool TypeBase::isValid | ( | ) | const [protected, virtual] |
A type is valid
Subclasses can add more checks if neccessary.
Checks if the type is valid.
true if the type is valid, false otherwise Implements HGL::IType.
Reimplemented in HGL::Type::Curve, HGL::Type::Ellipse, HGL::Type::NonEmptyType, HGL::Type::Point, HGL::Type::Project, HGL::Type::ReferenceHolderBase, HGL::Type::Text, and HGL::Type::Poly.
| TypeBase::operator float | ( | ) | const throw (Exception::ReferenceException, Exception::InvalidExpressionException) [protected, virtual] |
Converts the type into a float.
float Implements HGL::IType.
Reimplemented in HGL::Type::FloatParam, and HGL::Type::ReferenceParam.
| HGL::IType * TypeBase::resolve | ( | const std::string & | id | ) | const [protected, virtual] |
Resolves a type by its ID.
| id | the id to resolve |
0L if no type could get resolved by that id Implements HGL::IType.
Reimplemented in HGL::Type::AssignmentOperator.
| void TypeBase::setDescription | ( | const std::string & | desc | ) | [virtual] |
Sets the description of the type.
| desc | the description of the type |
Implements HGL::IType.
| void TypeBase::setId | ( | const std::string & | id | ) | [virtual] |
Sets the identifier.
| id | the identifier |
Implements HGL::IType.
Reimplemented in HGL::Type::NamedParam.
1.6.1