HGL::IType Interface Reference
[Types]

Base interface of types. More...

#include <itype.h>

Inheritance diagram for HGL::IType:
Inheritance graph
[legend]

List of all members.

Classes

class  iterator
 Iterator over an IType tree. More...
class  Ptr
 Smart pointer to IType instances. More...

Public Member Functions

virtual IType::Ptr clone () const =0 throw (Exception::CloneNotSupportedException)
 Creates a clone of the type.
virtual BOUNDINGBOX getBoundingBox () const =0
 Gets the bounding box of the type.
Iterator over this type's attached types



virtual iterator begin ()=0
 Gets the iterator to the begin over this type's attached types.
virtual iterator end ()=0
 Gets the iterator to the end over this type's attached types.
virtual void invalidateIterator (bool parent=false) const =0
virtual operator iterator ()=0
 Gets the iterator over this type's attached types.
Aritmetic operators



virtual ITypecosinus ()=0 throw (Exception::InvalidExpressionException)
virtual ITypeoperator* (const float *)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
virtual ITypeoperator* (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
virtual ITypeoperator+ (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
virtual ITypeoperator- ()=0 throw (Exception::InvalidExpressionException)
virtual ITypeoperator- (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
virtual ITypeoperator/ (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
virtual ITypeoperator= (const IType &)=0 throw (Exception::InvalidExpressionException)
virtual ITypepower (const IType &)=0 throw (Exception::InvalidExpressionException)
virtual ITypesinus ()=0 throw (Exception::InvalidExpressionException)
Managing control source parameters



virtual uint32_t getControlSourceParameter () const =0
virtual void setControlSourceParameter (const uint32_t &par)=0
Identification and description of types



virtual const std::string & getDescription () const =0
 Gets the description of the type.
virtual const std::string & getId () const =0
 Gets the identifier.
virtual void setDescription (const std::string &desc)=0
 Sets the description of the type.
virtual void setId (const std::string &id)=0
 Sets the identifier.
Type checks



virtual bool isNull () const =0
 Checks if the type is null type.
virtual bool isValid () const =0
 Checks if the type is valid.
Type conversion



virtual operator float () const =0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
 Converts the type into a float.
virtual operator Type::StringParam & () const =0 throw (Exception::InvalidExpressionException)
 Converts the type into a HGL::Type::StringParam.
virtual operator Type::Vector2D & () const =0 throw (Exception::InvalidExpressionException)
 Converts the type into a HGL::Type::Vector2D.

Serialization and type identification



typedef std::deque< uint8_t > BUFFER
 Buffer of the serialized data.
virtual const Type::SerialIDgetSerialID () const =0
 Gets the serialization ID of the object.

Accessing attached types



typedef std::deque< PtrTYPELIST
 List of attached IType instances.
virtual ITypeattachType (IType *type, bool check=true)=0 throw (Exception::AttachException)
 Attach child objects to the IType at end of list.
virtual void detachType (IType *type)=0
 Detaches a child from the IType.
virtual const TYPELISTgetAttachedTypes () const =0
 Returns all attached IType instances.
virtual ITypegetParent () const =0
 Returns the parent IType.
virtual const ITypegetRoot (const IType &type) const =0
 Get the root of a type.
virtual ITyperesolve (const std::string &id) const =0
 Resolves a type by its ID.
virtual void setParent (IType *parent)=0
 Set parent of the type.
virtual void setRoot (IType *)=0

Detailed Description

Base interface of types.

Author:
Heiko Schäfer <heiko@hgl.rangun.de>

Member Function Documentation

virtual IType* HGL::IType::attachType ( IType type,
bool  check = true 
) throw (Exception::AttachException) [pure virtual]

Attach child objects to the IType at end of list.

Parameters:
type the IType to attach as child
check true (default), if validity checks should be performed
Exceptions:
Exception::AttachException if a disallowed type gets attached. See Types for more.
Returns:
the attached type
virtual iterator HGL::IType::begin (  )  [pure virtual]

Gets the iterator to the begin over this type's attached types.

Returns:
the iterator to the begin over this type's attached types

Implemented in HGL::Type::TypeBase.

virtual IType::Ptr HGL::IType::clone (  )  const throw (Exception::CloneNotSupportedException) [pure virtual]

Creates a clone of the type.

Returns:
a smart pointer to the cloned type

Implemented in HGL::Type::FloatParam, and HGL::Type::TypeBase.

virtual void HGL::IType::detachType ( IType type  )  [pure virtual]

Detaches a child from the IType.

Parameters:
type the IType to detach
Since:
0.5.21
virtual iterator HGL::IType::end (  )  [pure virtual]

Gets the iterator to the end over this type's attached types.

Returns:
the iterator to the end over this type's attached types

Implemented in HGL::Type::TypeBase.

virtual const TYPELIST& HGL::IType::getAttachedTypes (  )  const [pure virtual]

Returns all attached IType instances.

Returns:
all attached IType instances

Implemented in HGL::Type::TypeBase, HGL::Type::RenderCallback, and HGL::Type::VirtualGroup.

virtual BOUNDINGBOX HGL::IType::getBoundingBox (  )  const [pure virtual]

Gets the bounding box of the type.

Returns:
the bounding box of the type

Implemented in HGL::Type::Fill, HGL::Type::Line, HGL::Type::ParamBase, HGL::Type::Point, HGL::Type::Text, HGL::Type::TypeBase, and HGL::Type::Vector2D.

virtual const std::string& HGL::IType::getDescription (  )  const [pure virtual]

Gets the description of the type.

Returns:
the description of the type

Implemented in HGL::Type::TypeBase.

virtual const std::string& HGL::IType::getId (  )  const [pure virtual]

Gets the identifier.

Returns:
the identifier

Implemented in HGL::Type::Procedure, HGL::Type::TypeBase, and HGL::Type::NamedParam.

virtual IType* HGL::IType::getParent (  )  const [pure virtual]

Returns the parent IType.

Returns:
the parent IType or NULL if there is no parent

Implemented in HGL::Type::TypeBase.

virtual const IType* HGL::IType::getRoot ( const IType type  )  const [pure virtual]

Get the root of a type.

Parameters:
type the type to get the root of
Returns:
the the root of a type
virtual const Type::SerialID& HGL::IType::getSerialID (  )  const [pure virtual]
virtual bool HGL::IType::isNull (  )  const [pure virtual]

Checks if the type is null type.

See also:
IReferenceHolder::findReference
Returns:
true if the type is null type, false otherwise

Implemented in HGL::Type::TypeBase.

virtual bool HGL::IType::isValid (  )  const [pure virtual]

Checks if the type is valid.

Returns:
true if the type is valid, false otherwise

Implemented in HGL::Type::Curve, HGL::Type::Ellipse, HGL::Type::NonEmptyType, HGL::Type::Point, HGL::Type::Project, HGL::Type::ReferenceHolderBase, HGL::Type::Text, HGL::Type::TypeBase, and HGL::Type::Poly.

virtual HGL::IType::operator float (  )  const throw (Exception::ReferenceException, Exception::InvalidExpressionException) [pure virtual]

Converts the type into a float.

Returns:
the type as float

Implemented in HGL::Type::FloatParam, HGL::Type::ReferenceParam, and HGL::Type::TypeBase.

virtual HGL::IType::operator iterator (  )  [pure virtual]

Gets the iterator over this type's attached types.

Returns:
the iterator over this type's attached types
virtual HGL::IType::operator Type::StringParam & (  )  const throw (Exception::InvalidExpressionException) [pure virtual]

Converts the type into a HGL::Type::StringParam.

Returns:
the type as HGL::Type::StringParam

Implemented in HGL::Type::FloatParam.

virtual HGL::IType::operator Type::Vector2D & (  )  const throw (Exception::InvalidExpressionException) [pure virtual]

Converts the type into a HGL::Type::Vector2D.

Returns:
the type as HGL::Type::Vector2D reference

Implemented in HGL::Type::FloatParam.

virtual IType* HGL::IType::resolve ( const std::string &  id  )  const [pure virtual]

Resolves a type by its ID.

Parameters:
id the id to resolve
Returns:
the resolved type or 0L if no type could get resolved by that id

Implemented in HGL::Type::AssignmentOperator, and HGL::Type::TypeBase.

virtual void HGL::IType::setDescription ( const std::string &  desc  )  [pure virtual]

Sets the description of the type.

Parameters:
desc the description of the type

Implemented in HGL::Type::TypeBase.

virtual void HGL::IType::setId ( const std::string &  id  )  [pure virtual]

Sets the identifier.

Parameters:
id the identifier

Implemented in HGL::Type::TypeBase, and HGL::Type::NamedParam.

virtual void HGL::IType::setParent ( IType parent  )  [pure virtual]

Set parent of the type.

Parameters:
parent the parent of the type

Generated on 9 Apr 2014 for hgl 0.5.26~svn by  doxygen 1.6.1