HGL::Type::ReferenceHolderBase Class Reference
[Types]

#include <referenceholderbase.h>

Inheritance diagram for HGL::Type::ReferenceHolderBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const ITypefindReference (bool recache=false) const
 Searches the tree for the associated reference.
virtual const std::string * getReference () const
 Gets the reference.
virtual bool isValid () const
virtual void setReference (const std::string &ref, bool fromStdLib=false)
 Sets the reference.

Detailed Description

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

Member Function Documentation

const HGL::IType * ReferenceHolderBase::findReference ( bool  recache = false  )  const [virtual]

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

Implements HGL::Type::IReferenceHolder.

Reimplemented in HGL::Type::ExpressionParam, HGL::Type::Line, and HGL::Type::ReferenceParam.

const std::string * ReferenceHolderBase::getReference (  )  const [virtual]

Gets the reference.

Returns:
pointer to the reference, NULL if no reference is set

Implements HGL::Type::IReferenceHolder.

bool ReferenceHolderBase::isValid (  )  const [virtual]
Note:
This method returns true if a reference is set, but not checking if the reference itself is valid. A type is valid

  1. if all attached types are allowed for this type, if not the type is invalid
  2. if all attached types itself are valid, if not the type is invalid
Subclasses can add more checks if neccessary.Checks if the type is valid.

Reimplemented from HGL::Type::TypeBase.

Reimplemented in HGL::Type::Curve, HGL::Type::Point, and HGL::Type::Poly.

void ReferenceHolderBase::setReference ( const std::string &  ref,
bool  fromStdLib = false 
) [virtual]

Sets the reference.

Parameters:
ref the reference
fromStdLib true if the reference points into the stdlib

Implements HGL::Type::IReferenceHolder.


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