#include <PhxDescription.h>
Inheritance diagram for Phx::Description::Manager:

Public Member Functions | |
| virtual Ptr< Description > | newDescription (Description::Type type)=0 |
| Constructs a new instance of a Description with the specified type and returns a pointer to it. | |
| virtual Ptr< Description > | newDescription (const Ptr< const Description > &description)=0 |
| Constructs a new instance of a Description that matches the given Description. | |
| virtual Ptr< const Description > | fileDescription (const String &filename)=0 |
| Gets a description specified by a file name. | |
| virtual void | typeListener (Description::Type type, TypeListener *listener)=0 |
| Creates a new type by setting a listener that constructs instances of a description type. | |
| template<class T> | |
| Ptr< TypeListener > | newDescriptionType () |
| A convenience method that automatically creates a Description type by installing a standard TypeListener. | |
Classes | |
| class | DefaultTypeListener |
| class | TypeListener |
| A listener type that is invoked to construct new instances of Description subclasses. More... | |
You can install new Description types, as with the NamedInterface::Manager, by setting a Manager::TypeListener for your type constant via typeListener(). You may also use the newDescriptionType() convenience template method.
|
|
Gets a description specified by a file name. Note that this call will immediately load the description if it is not in memory. If the description is already loaded, it will return a pointer to the cached copy.
|
|
|
Constructs a new instance of a Description that matches the given Description.
|
|
|
Constructs a new instance of a Description with the specified type and returns a pointer to it. Unlike the NamedInterface::Manager, the Description is not stored within this manager after it is created. If it should be made publicly available
|
|
|||||||||
|
A convenience method that automatically creates a Description type by installing a standard TypeListener. Normally, to create a new description type you would create a TypeListener subclass which implements TypeListener::onNewDescription() to return a new instance of your Description subclass. This is tedious for some systems that want to create many different Description types and simply leave them in the system. To simplify, this (templatized) method automatically constructs a description of the template parameter type to create new instance using the constructor. You must explicitly supply the template parameter, which must be a type with an accessible constructor with signature: T::T(const Ptr<const Description>& description); and derives, ultimately, from Description.
The class T must also define T::DESCRIPTION_TYPE, a static, const Description::Type value that is the type constant for the description class. This is passed to typeListener() as the
|
|
||||||||||||
|
Creates a new type by setting a listener that constructs instances of a description type.
The listener is entered into the collection of description types and will be called whenever a new Description of type corresponding to the constant
|
1.4.2