#include <actorpluginregistry.h>

Public Member Functions | |
| ActorPluginRegistry (const std::string &name, const std::string &desc="") | |
| Constructs the registry. | |
| virtual | ~ActorPluginRegistry () |
| Empty destructor. | |
| virtual void | RegisterActorTypes ()=0 |
| Registers the actor types that this registry knows how to create. | |
| void | SetName (const std::string &name) |
| Sets the name of this registry. | |
| const std::string & | GetName () const |
| Gets the name currently assigned to this registry. | |
| void | SetDescription (const std::string &desc) |
| Sets the description for this registry. | |
| const std::string & | GetDescription () const |
| Gets the description of this registry. | |
| void | GetSupportedActorTypes (std::vector< dtCore::RefPtr< const ActorType > > &actors) |
| Gets a list of actor types that this registry supports. | |
| bool | IsActorTypeSupported (dtCore::RefPtr< const ActorType > type) |
| Checks to see if this registry supports the given actor type. | |
| dtCore::RefPtr< ActorProxy > | CreateActorProxy (const ActorType &type) |
| Creates a new actor proxy based on the ActorType given. | |
Protected Attributes | |
| std::string | mName |
| std::string | mDescription |
| dtCore::RefPtr < dtUtil::ObjectFactory < dtCore::RefPtr< const ActorType >, ActorProxy, ActorType::RefPtrComp > > | mActorFactory |
| Factory object which stores the actor types and knows how to create proxy objects for each type. | |
Its main purpose is to serve as an object factory which knows how to build ActorProxies using ActorTypes as the tool by which to do so.
| dtDAL::ActorPluginRegistry::ActorPluginRegistry | ( | const std::string & | name, | |
| const std::string & | desc = "" | |||
| ) | [inline] |
Constructs the registry.
Sets the name and description for this registry.
| virtual dtDAL::ActorPluginRegistry::~ActorPluginRegistry | ( | ) | [inline, virtual] |
Empty destructor.
This class is not reference counted since we need to manually free pointers to the registry objects from their corresponding dynamic library, therefore, we need access to the object's destructor.
| virtual void dtDAL::ActorPluginRegistry::RegisterActorTypes | ( | ) | [pure virtual] |
Registers the actor types that this registry knows how to create.
This method is the first method to get called by the LibraryManager after it loads a dynamic library and gets a pointer to the registry object it contains.
Implemented in dtActors::EngineActorRegistry.
| void dtDAL::ActorPluginRegistry::SetName | ( | const std::string & | name | ) | [inline] |
Sets the name of this registry.
| name | Name to assign to the registry. |
| const std::string& dtDAL::ActorPluginRegistry::GetName | ( | ) | const [inline] |
Gets the name currently assigned to this registry.
| void dtDAL::ActorPluginRegistry::SetDescription | ( | const std::string & | desc | ) | [inline] |
Sets the description for this registry.
| desc | Couple sentence description for this actor registry. |
| const std::string& dtDAL::ActorPluginRegistry::GetDescription | ( | ) | const [inline] |
Gets the description of this registry.
| void dtDAL::ActorPluginRegistry::GetSupportedActorTypes | ( | std::vector< dtCore::RefPtr< const ActorType > > & | actors | ) |
Gets a list of actor types that this registry supports.
| bool dtDAL::ActorPluginRegistry::IsActorTypeSupported | ( | dtCore::RefPtr< const ActorType > | type | ) |
Checks to see if this registry supports the given actor type.
| type | The type to check support for. |
| dtCore::RefPtr< ActorProxy > dtDAL::ActorPluginRegistry::CreateActorProxy | ( | const ActorType & | type | ) |
Creates a new actor proxy based on the ActorType given.
| type | Type of actor to create. |
| ExceptionEnum::ObjectFactoryUnknownType |
std::string dtDAL::ActorPluginRegistry::mName [protected] |
std::string dtDAL::ActorPluginRegistry::mDescription [protected] |
dtCore::RefPtr<dtUtil::ObjectFactory<dtCore::RefPtr<const ActorType>, ActorProxy,ActorType::RefPtrComp> > dtDAL::ActorPluginRegistry::mActorFactory [protected] |
Factory object which stores the actor types and knows how to create proxy objects for each type.