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

A render callback type. More...

#include <rendercallback.h>

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

List of all members.

Public Member Functions

virtual const TYPELISTgetAttachedTypes () const
virtual const HGL::Type::SerialIDgetSerialID () const
 Gets the SerialID of HGL::Type::RENDERCALLBACK.

Protected Member Functions

 RenderCallback (const std::string &ref, IType *lib=0L)
 Constructur
virtual ITypeattachType (IType *type, const TYPELIST::iterator &before, bool check) throw (Exception::AttachException)

Detailed Description

A render callback type.

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

This type can get attached to a RenderProcedure to give feedback about the progess of rendering. It contains two virtually attached FloatParam indicating the current line and the maximum number of lines.

A callback can be defined as following in the ProceduresSegment:

 {.hgl}
 proc percentageProgress "Displays the current percentage of rendering, to use as callback" {
   [ rline rmax ] {}

   debug("" + ((#rline * 100) / #rmax));
 }

Constructor & Destructor Documentation

RenderCallback::RenderCallback ( const std::string &  ref,
IType lib = 0L 
) [explicit, protected]

Constructur

Parameters:
ref a reference to the render callback procedure
lib the scope to search the render callback procedure

Member Function Documentation

HGL::IType * RenderCallback::attachType ( IType type,
const TYPELIST::iterator &  before,
bool  check 
) throw (Exception::AttachException) [protected, virtual]

If the attached type is a FloatParam it gets interpreted as the the current line if attached first and as the total amount of lines if attached second. Attaches a child at the position before. It updates the parent of the attached type to this type as well.

Parameters:
type the IType to attach as child
before the type will be attached before the type referenced by before
check true (default), if validity checks should be performed

Reimplemented from HGL::Type::TypeBase.

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

Actually it returns two FloatParam. The first indicating the currently processed line and the second the maximum amount of lines. Returns all attached IType instances.

Returns:
all attached IType instances

Reimplemented from HGL::Type::TypeBase.

const HGL::Type::SerialID & RenderCallback::getSerialID (  )  const [virtual]

Gets the SerialID of HGL::Type::RENDERCALLBACK.

Returns:
const HGL::Type::SerialID &RENDERCALLBACK

Reimplemented from HGL::Type::ProcCall.


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