Rocket::Core::ElementInstancer Class Reference

#include <ElementInstancer.h>

Inheritance diagram for Rocket::Core::ElementInstancer:
Collaboration diagram for Rocket::Core::ElementInstancer:

Public Member Functions

virtual ElementInstanceElement (Element *parent, const String &tag, const XMLAttributes &attributes)=0
virtual void ReleaseElement (Element *element)=0
virtual void Release ()=0
 Release the instancer.

Protected Member Functions

virtual void OnReferenceDeactivate ()
 A hook method called when the reference count drops to 0.

Detailed Description

An element instancer provides a method for allocating an deallocating elements.

Node handlers are reference counted, so that the same handler can be used for multiple tags.

It is important at the same instancer that allocated the element releases it. This ensures there are no issues with memory from different DLLs getting mixed up.

Author:
Lloyd Weehuizen

Member Function Documentation

virtual Element* Rocket::Core::ElementInstancer::InstanceElement ( Element parent,
const String tag,
const XMLAttributes attributes 
) [pure virtual]

Instances an element given the tag name and attributes.

Parameters:
[in] parent The element the new element is destined to be parented to.
[in] tag The tag of the element to instance.
[in] attributes Dictionary of attributes.

Implemented in Rocket::Core::ElementInstancerGeneric< T >.

virtual void Rocket::Core::ElementInstancer::ReleaseElement ( Element element  )  [pure virtual]

Releases an element instanced by this instancer.

Parameters:
[in] element The element to release.

Implemented in Rocket::Core::ElementInstancerGeneric< T >.


The documentation for this class was generated from the following files: