#include <pluginfactory.h>
Public Member Functions | |
_ParentType * | create (std::string type, xmlNode *node) |
_ParentType * | create (std::string type, std::map< std::string, std::string > attributes) |
bool | registerPlugin (std::string type, _SlotType createFunction) |
Static Public Member Functions | |
static PluginFactory< _ParentType, _SigType, _SlotType > * | get_instance () |
Protected Attributes | |
std::map< std::string, _SigType > | m_createFunctions |
Map of function pointers to methods for creating materials. |
Definition at line 52 of file pluginfactory.h.
_ParentType* PluginFactory< _ParentType, _SigType, _SlotType >::create | ( | std::string | type, | |
xmlNode * | node | |||
) | [inline] |
Definition at line 81 of file pluginfactory.h.
References log_warn, and PluginFactory< _ParentType, _SigType, _SlotType >::m_createFunctions.
_ParentType* PluginFactory< _ParentType, _SigType, _SlotType >::create | ( | std::string | type, | |
std::map< std::string, std::string > | attributes | |||
) | [inline] |
Creates a Material object based on the type and the passed in parameters
type | String that the material type registered under | |
attributes | Attributes used to build materials |
Definition at line 69 of file pluginfactory.h.
References log_warn, and PluginFactory< _ParentType, _SigType, _SlotType >::m_createFunctions.
static PluginFactory<_ParentType, _SigType, _SlotType>* PluginFactory< _ParentType, _SigType, _SlotType >::get_instance | ( | ) | [inline, static] |
Return an instance of PluginFactory.
Definition at line 116 of file pluginfactory.h.
References log_debug.
Referenced by SceneParser::parse_bumpmaps(), SceneParser::parse_light_sources(), SceneParser::parse_materials(), SceneParser::parse_objects(), SolidMaterial::SolidMaterialStaticInit::SolidMaterialStaticInit(), Sphere::StaticInit::StaticInit(), RippleBumpMap::StaticInit::StaticInit(), Polygon::StaticInit::StaticInit(), Plane::StaticInit::StaticInit(), NoiseMaterial::StaticInit::StaticInit(), MarbleMaterial::StaticInit::StaticInit(), ImageMap::StaticInit::StaticInit(), ConcentricBumpMap::StaticInit::StaticInit(), and CheckeredMaterial::StaticInit::StaticInit().
Here is the caller graph for this function:
bool PluginFactory< _ParentType, _SigType, _SlotType >::registerPlugin | ( | std::string | type, | |
_SlotType | createFunction | |||
) | [inline] |
Registers the function to create materials of the given type.
type | String that identifies the material type | |
createFunction | Signal handler to create materials of the given type. |
Definition at line 101 of file pluginfactory.h.
References log_debug, log_warn, and PluginFactory< _ParentType, _SigType, _SlotType >::m_createFunctions.
std::map<std::string, _SigType> PluginFactory< _ParentType, _SigType, _SlotType >::m_createFunctions [protected] |
Map of function pointers to methods for creating materials.
Definition at line 56 of file pluginfactory.h.
Referenced by PluginFactory< _ParentType, _SigType, _SlotType >::create(), and PluginFactory< _ParentType, _SigType, _SlotType >::registerPlugin().