hgl 0.5.25
A compiler/interpreter suite for developing images
Public Member Functions | Protected Member Functions | List of all members
HGL::Type::Line Class Reference

#include "line.h"

Inheritance diagram for HGL::Type::Line:
[legend]

Public Member Functions

virtual BOUNDINGBOX getBoundingBox () const
 Gets the bounding box of the type. More...
 
- Public Member Functions inherited from HGL::Type::ReferenceHolderBase
virtual const std::string * getReference () const
 Gets the reference. More...
 
virtual bool isValid () const
 Checks if the type is valid. More...
 
virtual void setReference (const std::string &ref, bool fromStdLib=false)
 Sets the reference. More...
 
Reference access and manipulation
- Public Member Functions inherited from HGL::IType
virtual operator iterator ()=0
 Gets the iterator over this type's attached types. More...
 
- Public Member Functions inherited from HGL::Type::TypeBase
ITypeattachType (IType *type, bool check=true) throw (Exception::AttachException)
 Attach child objects to the IType at end of list. More...
 
virtual IType::iterator begin ()
 Gets the iterator to the begin over this type's attached types. More...
 
virtual void detachType (IType *type)
 Detaches a child from the IType. More...
 
virtual IType::iterator end ()
 Gets the iterator to the end over this type's attached types. More...
 
virtual const TYPELISTgetAttachedTypes () const
 Returns all attached IType instances. More...
 
virtual const std::string & getId () const
 Gets the identifier. More...
 
virtual ITypegetParent () const
 Returns the parent IType. More...
 
virtual bool isNull () const
 Checks if the type is null type. More...
 
virtual void setDescription (const std::string &desc)
 Sets the description of the type. More...
 
virtual void setId (const std::string &id)
 Sets the identifier. More...
 

Protected Member Functions

virtual ITypeattachType (IType *type, const TYPELIST::iterator &before, bool check) throw (Exception::AttachException)
 Attaches a child at the position before. More...
 
virtual const ITypefindReference (bool recache=false) const
 Searches the tree for the associated reference. More...
 
SERIALID getSerialID () const
 Gets the serialization ID of the object. More...
 
- Protected Member Functions inherited from HGL::Type::TypeBase
virtual IType::Ptr clone () const throw (Exception::CloneNotSupportedException)
 Creates a clone of the type. More...
 
virtual const std::string & getDescription () const
 Gets the description of the type. More...
 
virtual const ITypegetRoot (const IType &type) const
 Get the root of a type. More...
 
virtual std::string getTypeName () const
 Displayable name of the IType. More...
 
virtual operator float () const throw (Exception::ReferenceException, Exception::InvalidExpressionException)
 Converts the type into a float More...
 
virtual ITyperesolve (const std::string &id) const
 Resolves a type by its ID. More...
 
virtual void setParent (IType *parent)
 Set parent of the type. More...
 

Detailed Description

Author
Heiko Schäfer heiko.nosp@m.@hgl.nosp@m..rang.nosp@m.un.d.nosp@m.e

Member Function Documentation

HGL::IType * Line::attachType ( IType type,
const TYPELIST::iterator &  before,
bool  check 
)
throw (Exception::AttachException
)
protectedvirtual

Attaches a child at the position before.

It updates the parent of the attached type to this type as well.

Parameters
typethe IType to attach as child
beforethe type will be attached before the type referenced by before
checktrue (default), if validity checks should be performed
typethe IType to attach as child
checktrue (default), if validity checks should be performed
Exceptions
Exception::AttachExceptionif a disallowed type gets attached. See Types for more.
Returns
the attached type

Reimplemented from HGL::Type::TypeBase.

References HGL::Type::TypeBase::attachType(), and HGL::IType::getSerialID().

const HGL::IType * Line::findReference ( bool  recache = false) const
protectedvirtual

Searches the tree for the associated reference.

Note
To check if a reference was actually found use IType::isNull
See Also
IType::isNull
Returns
an IType to a reference or the special NullType if not found

Reimplemented from HGL::Type::ReferenceHolderBase.

References HGL::Type::ReferenceHolderBase::findReference(), HGL::Type::ReferenceHolderBase::getReference(), and HGL::IType::isNull().

HGL::IType::BOUNDINGBOX Line::getBoundingBox ( ) const
virtual

Gets the bounding box of the type.

Returns
the bounding box of the type

Reimplemented from HGL::Type::TypeBase.

References HGL::Type::TypeBase::getBoundingBox(), and HGL::IType::getBoundingBox().

HGL::IType::SERIALID Line::getSerialID ( ) const
protectedvirtual

Gets the serialization ID of the object.

Returns
the serialization ID of the object

Implements HGL::IType.

References HGL::IType::SLINE.