|
hgl 0.5.25
A compiler/interpreter suite for developing images
|
Base interface of types. More...
#include "itype.h"
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. More... | |
| virtual BOUNDINGBOX | getBoundingBox () const =0 |
| Gets the bounding box of the type. More... | |
Identification and description of types | |
| virtual const std::string & | getId () const =0 |
| Gets the identifier. More... | |
| virtual void | setId (const std::string &id)=0 |
| Sets the identifier. More... | |
| virtual const std::string & | getDescription () const =0 |
| Gets the description of the type. More... | |
| virtual void | setDescription (const std::string &desc)=0 |
| Sets the description of the type. More... | |
Managing control source parameters | |
| virtual void | setControlSourceParameter (const uint32_t &par)=0 |
| virtual uint32_t | getControlSourceParameter () const =0 |
Type conversion | |
| virtual | operator float () const =0 throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
Converts the type into a float More... | |
| virtual | operator Type::Vector2D & () const =0 throw (Exception::InvalidExpressionException) |
Converts the type into a HGL::Type::Vector2D More... | |
| virtual | operator Type::StringParam & () const =0 throw (Exception::InvalidExpressionException) |
Converts the type into a HGL::Type::StringParam More... | |
Aritmetic operators | |
| virtual IType & | operator= (const IType &)=0 throw (Exception::InvalidExpressionException) |
| virtual IType * | operator+ (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
| virtual IType * | operator- (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
| virtual IType * | operator* (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
| virtual IType * | operator* (const float *)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
| virtual IType * | operator/ (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException) |
| virtual IType * | operator- ()=0 throw (Exception::InvalidExpressionException) |
| virtual IType * | power (const IType &)=0 throw (Exception::InvalidExpressionException) |
| virtual IType * | sinus ()=0 throw (Exception::InvalidExpressionException) |
| virtual IType * | cosinus ()=0 throw (Exception::InvalidExpressionException) |
Iterator over this type's attached types | |
| virtual | operator iterator ()=0 |
| Gets the iterator over this type's attached types. More... | |
| virtual void | invalidateIterator (bool parent=false) const =0 |
| virtual iterator | begin ()=0 |
| Gets the iterator to the begin over this type's attached types. More... | |
| virtual iterator | end ()=0 |
| Gets the iterator to the end over this type's attached types. More... | |
Type checks | |
| virtual bool | isNull () const =0 |
| Checks if the type is null type. More... | |
| virtual bool | isValid () const =0 |
| Checks if the type is valid. More... | |
Serialization and type identification | |
| enum | SERIALID { , NOTSERIALIZEABLE = -1, SASSIGNMENTOPERATOR, SDEBUGPROCEDURE, SELLIPSE, SEXPRESSIONPARAM, SFILL, SFLOATPARAM, SLINE, SMAINSEGMENT, SNAMEDPARAM, SOBJECTSSEGMENT, SPARAMSECTION, SPOINT, SPOLY, SPROCCALL, SPROCEDURE, SPROCEDURESSEGMENT, SPROCINITSTATEMENT, SPROJECT, SREFERENCEPARAM, SRENDERPROCEDURE, SSTDLIBCALL, SSTRINGPARAM, STEXT, SVECTOR2D, SRENDERCALLBACK, SSRENDERCALLBACK, SVIRTUALGROUP, SCOMMENT, SCURVE, SSIGNATURE, SINCLUDE } |
| Enum of the serializeable objects. More... | |
| typedef std::deque< uint8_t > | BUFFER |
| Buffer of the serialized data. | |
| virtual SERIALID | getSerialID () const =0 |
| Gets the serialization ID of the object. More... | |
Accessing attached types | |
| typedef std::list< Ptr > | TYPELIST |
List of attached IType instances. | |
| virtual const IType * | getRoot (const IType &type) const =0 |
| Get the root of a type. More... | |
| virtual void | setRoot (IType *)=0 |
| virtual IType * | getParent () const =0 |
Returns the parent IType. More... | |
| virtual void | setParent (IType *parent)=0 |
| Set parent of the type. More... | |
| virtual IType * | resolve (const std::string &id) const =0 |
| Resolves a type by its ID. More... | |
| virtual const TYPELIST & | getAttachedTypes () const =0 |
Returns all attached IType instances. More... | |
| virtual IType * | attachType (IType *type, bool check=true)=0 throw (Exception::AttachException) |
Attach child objects to the IType at end of list. More... | |
| virtual void | detachType (IType *type)=0 |
| Detaches a child from the IType. More... | |
Base interface of types.
| enum HGL::IType::SERIALID |
Enum of the serializeable objects.
This types are used for the compiler and interpreter to denote the type of the object
| Enumerator | |
|---|---|
| NOTSERIALIZEABLE |
Denotes a non-serializeable type. |
| SASSIGNMENTOPERATOR |
Serial type id of |
| SDEBUGPROCEDURE |
Serial type id of |
| SELLIPSE |
Serial type id of |
| SEXPRESSIONPARAM |
Serial type id of |
| SFILL |
Serial type id of |
| SFLOATPARAM |
Serial type id of |
| SLINE |
Serial type id of |
| SMAINSEGMENT |
Serial type id of |
| SNAMEDPARAM |
Serial type id of |
| SOBJECTSSEGMENT |
Serial type id of |
| SPARAMSECTION |
Serial type id of |
| SPOINT |
Serial type id of |
| SPOLY |
Serial type id of |
| SPROCCALL |
Serial type id of |
| SPROCEDURE |
Serial type id of |
| SPROCEDURESSEGMENT |
Serial type id of |
| SPROCINITSTATEMENT |
Serial type id of |
| SPROJECT |
Serial type id of |
| SREFERENCEPARAM |
Serial type id of |
| SRENDERPROCEDURE |
Serial type id of |
| SSTDLIBCALL |
Serial type id of |
| SSTRINGPARAM |
Serial type id of |
| STEXT |
Serial type id of |
| SVECTOR2D |
Serial type id of |
| SRENDERCALLBACK |
Serial type id of |
| SSRENDERCALLBACK |
Serial type id of |
| SVIRTUALGROUP |
Serial type id of |
| SCOMMENT |
Serial type id of |
| SCURVE |
Serial type id of |
| SSIGNATURE |
Serial type id of |
| SINCLUDE |
Serial type id of |
|
pure virtual | ||||||||||||||||||||
Attach child objects to the IType at end of list.
| type | the IType to attach as child |
| check | true (default), if validity checks should be performed |
| Exception::AttachException | if a disallowed type gets attached. See Types for more. |
Implemented in HGL::Type::TypeBase.
Referenced by HGL::Type::Project::addMainSegment(), HGL::Type::Project::addObjectsSegment(), and HGL::Type::Project::addProceduresSegment().
|
pure virtual |
Gets the iterator to the begin over this type's attached types.
Implemented in HGL::Type::TypeBase.
|
pure virtual | |||||||||||||
Creates a clone of the type.
Implemented in HGL::Type::TypeBase, and HGL::Type::FloatParam.
|
pure virtual |
Detaches a child from the IType.
| type | the IType to detach |
Implemented in HGL::Type::Poly, HGL::Type::TypeBase, and HGL::Type::RenderCallback.
|
pure virtual |
Gets the iterator to the end over this type's attached types.
Implemented in HGL::Type::TypeBase.
|
pure virtual |
Returns all attached IType instances.
IType instances Implemented in HGL::Type::TypeBase, HGL::Type::RenderCallback, and HGL::Type::VirtualGroup.
Referenced by HGL::Type::Project::isValid().
|
pure virtual |
Gets the bounding box of the type.
Implemented in HGL::Type::TypeBase, HGL::Type::Point, HGL::Type::Line, HGL::Type::Vector2D, HGL::Type::Fill, HGL::Type::ParamBase, and HGL::Type::Text.
Referenced by HGL::Type::Line::getBoundingBox().
|
pure virtual |
Gets the description of the type.
Implemented in HGL::Type::TypeBase.
|
pure virtual |
Gets the identifier.
Implemented in HGL::Type::TypeBase, HGL::Type::NamedParam, and HGL::Type::Procedure.
|
pure virtual |
Returns the parent IType.
IType or NULL if there is no parent Implemented in HGL::Type::TypeBase.
Get the root of a type.
| type | the type to get the root of |
Implemented in HGL::Type::TypeBase.
Referenced by HGL::Type::TypeBase::getRoot().
|
pure virtual |
Gets the serialization ID of the object.
Implemented in HGL::Type::Point, HGL::Type::Line, HGL::Type::FloatParam, HGL::Type::Fill, HGL::Type::Vector2D, HGL::Type::StringParam, HGL::Type::Poly, HGL::Type::Ellipse, HGL::Type::AssignmentOperator, HGL::Type::Curve, HGL::Type::RenderCallback, HGL::Type::Project, HGL::Type::NamedParam, HGL::Type::VirtualGroup, HGL::Type::MainSegment, HGL::Type::ProcCall, HGL::Type::Comment, HGL::Type::Include, HGL::Type::ParamSection, HGL::Type::ProcInitStatement, HGL::Type::Signature, HGL::Type::StdLibCall, HGL::Type::DebugProcedure, HGL::Type::ObjectsSegment, HGL::Type::ProceduresSegment, HGL::Type::RenderProcedure, HGL::Type::ExpressionParam, HGL::Type::ReferenceParam, HGL::Type::Text, and HGL::Type::Procedure.
Referenced by HGL::Exception::AttachException::AttachException(), HGL::Type::Line::attachType(), HGL::Type::Point::attachType(), HGL::Type::TypeBase::getTypeName(), and HGL::Type::Text::isValid().
|
pure virtual |
Checks if the type is null type.
true if the type is null type, false otherwise Implemented in HGL::Type::TypeBase.
Referenced by HGL::Type::Line::findReference(), HGL::Type::NamedParam::getTypeName(), and HGL::Type::ReferenceParam::operator float().
|
pure virtual |
Checks if the type is valid.
true if the type is valid, false otherwise Implemented in HGL::Type::TypeBase, HGL::Type::Point, HGL::Type::Curve, HGL::Type::Text, HGL::Type::Ellipse, HGL::Type::Project, HGL::Type::Poly, HGL::Type::NonEmptyType, and HGL::Type::ReferenceHolderBase.
Referenced by HGL::Type::TypeBase::isValid().
|
pure virtual | |||||||||||||||||
Converts the type into a float
float Implemented in HGL::Type::TypeBase, HGL::Type::FloatParam, and HGL::Type::ReferenceParam.
|
pure virtual |
Gets the iterator over this type's attached types.
|
pure virtual | |||||||||||||
Converts the type into a HGL::Type::StringParam
HGL::Type::StringParam Implemented in HGL::Type::FloatParam.
|
pure virtual | |||||||||||||
Converts the type into a HGL::Type::Vector2D
HGL::Type::Vector2D reference Implemented in HGL::Type::FloatParam.
|
pure virtual |
Resolves a type by its ID.
| id | the id to resolve |
0L if no type could get resolved by that id Implemented in HGL::Type::TypeBase, and HGL::Type::AssignmentOperator.
|
pure virtual |
Sets the description of the type.
| desc | the description of the type |
Implemented in HGL::Type::TypeBase.
|
pure virtual |
Sets the identifier.
| id | the identifier |
Implemented in HGL::Type::TypeBase, and HGL::Type::NamedParam.
|
pure virtual |
1.8.5