A render callback type. More...
#include <rendercallback.h>

Public Member Functions | |
| virtual const TYPELIST & | getAttachedTypes () const |
| virtual const HGL::Type::SerialID & | getSerialID () const |
Gets the SerialID of HGL::Type::RENDERCALLBACK. | |
Protected Member Functions | |
| RenderCallback (const std::string &ref, IType *lib=0L) | |
Constructur | |
| virtual IType * | attachType (IType *type, const TYPELIST::iterator &before, bool check) throw (Exception::AttachException) |
A render callback type.
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));
}
| RenderCallback::RenderCallback | ( | const std::string & | ref, | |
| IType * | lib = 0L | |||
| ) | [explicit, protected] |
Constructur
| ref | a reference to the render callback procedure | |
| lib | the scope to search the render callback procedure |
| 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.
| 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.
IType instances Reimplemented from HGL::Type::TypeBase.
| const HGL::Type::SerialID & RenderCallback::getSerialID | ( | ) | const [virtual] |
Gets the SerialID of HGL::Type::RENDERCALLBACK.
const HGL::Type::SerialID &RENDERCALLBACK Reimplemented from HGL::Type::ProcCall.
1.6.1