hgl 0.5.25
A compiler/interpreter suite for developing images
Public Types | Public Member Functions | List of all members
HGL::Type::IParam Interface Referenceabstract

This interface marks a type as parameter type. More...

#include "iparam.h"

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

Public Types

enum  OP {
  NOP,
  ADD,
  SUB,
  MUL,
  DIV,
  POW,
  SIN,
  COS,
  NEG,
  DAO
}
 The types of operations available for expressions. More...
 
- Public Types inherited from HGL::IType
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.
 
typedef std::list< PtrTYPELIST
 List of attached IType instances.
 

Public Member Functions

virtual bool operator== (const IParam &o) const =0
 Checks equality of parameter types. More...
 
virtual const std::string toString () const =0
 Gets the string representation of a parameter type. More...
 
- Public Member Functions inherited from HGL::IType
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...
 
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...
 
virtual void setControlSourceParameter (const uint32_t &par)=0
 
virtual uint32_t getControlSourceParameter () const =0
 
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...
 
virtual ITypeoperator= (const IType &)=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::ReferenceException, Exception::InvalidExpressionException)
 
virtual ITypeoperator* (const float *)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
 
virtual ITypeoperator/ (const IType &)=0 throw (Exception::ReferenceException, Exception::InvalidExpressionException)
 
virtual ITypeoperator- ()=0 throw (Exception::InvalidExpressionException)
 
virtual ITypepower (const IType &)=0 throw (Exception::InvalidExpressionException)
 
virtual ITypesinus ()=0 throw (Exception::InvalidExpressionException)
 
virtual ITypecosinus ()=0 throw (Exception::InvalidExpressionException)
 
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...
 
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...
 
virtual SERIALID getSerialID () const =0
 Gets the serialization ID of the object. More...
 
virtual const ITypegetRoot (const IType &type) const =0
 Get the root of a type. More...
 
virtual void setRoot (IType *)=0
 
virtual ITypegetParent () const =0
 Returns the parent IType. More...
 
virtual void setParent (IType *parent)=0
 Set parent of the type. More...
 
virtual ITyperesolve (const std::string &id) const =0
 Resolves a type by its ID. More...
 
virtual const TYPELISTgetAttachedTypes () const =0
 Returns all attached IType instances. More...
 
virtual ITypeattachType (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...
 

Detailed Description

This interface marks a type as parameter type.

Parameter types are used as parameters to procedures

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

Member Enumeration Documentation

The types of operations available for expressions.

Enumerator
NOP 

no operation

ADD 

addition

SUB 

subtraction

MUL 

multiplication

DIV 

division

POW 

power

SIN 

sinus

COS 

cosinus

NEG 

negation

DAO 

direct assignemnt operation

Member Function Documentation

virtual bool HGL::Type::IParam::operator== ( const IParam o) const
pure virtual

Checks equality of parameter types.

Parameters
othe other parameter type to check
Returns
true, if they are equal, false otherwise

Implemented in HGL::Type::ParamBase.

virtual const std::string HGL::Type::IParam::toString ( ) const
pure virtual

Gets the string representation of a parameter type.

Returns
the string representation of a parameter type

Implemented in HGL::Type::ExpressionParam, HGL::Type::StringParam, HGL::Type::Vector2D, HGL::Type::FloatParam, HGL::Type::ReferenceParam, and HGL::Type::ParamBase.

Referenced by HGL::Type::ParamBase::operator==().