76 bool nameExists =
false;
82 "Unsuccessful attempt at registering Field class. "
83 "(Creation function returned null pointer)");
87 string simpleClassName = instance->className();
88 string dataTypeName = instance->dataTypeString();
89 string className = simpleClassName +
"<" + dataTypeName +
">";
91 FieldFuncMap::const_iterator i =
m_fields.find(className);
102 char *debugEnvVar = getenv(
"FIELD3D_DEBUG");
104 Msg::print(
"Registered Field class " + className);
116 FieldFuncMap::const_iterator i =
m_fields.find(className);
129 bool nameExists =
false;
135 "Unsuccessful attempt at registering FieldIO class. "
136 "(Creation function returned null pointer)");
140 string className = instance->className();
142 FieldIOFuncMap::const_iterator i =
m_fieldIOs.find(className);
153 char *debugEnvVar = getenv(
"FIELD3D_DEBUG");
155 Msg::print(
"Registered FieldIO class " + className);
168 FieldIOFuncMap::const_iterator i =
m_fieldIOs.find(className);
181 bool nameExists =
false;
187 "Unsuccessful attempt at registering FieldMapping class. "
188 "(Creation function returned null pointer)");
192 string className = instance->className();
194 FieldMappingFuncMap::const_iterator i =
m_mappings.find(className);
205 char *debugEnvVar = getenv(
"FIELD3D_DEBUG");
207 Msg::print(
"Registered FieldMapping class " + className);
218 FieldMappingFuncMap::const_iterator i =
m_mappings.find(className);
231 bool nameExists =
false;
237 "Unsuccessful attempt at registering FieldMappingIO class. "
238 "(Creation function returned null pointer)");
242 string className = instance->className();
244 FieldMappingIOFuncMap::const_iterator i =
m_mappingIOs.find(className);
255 char *debugEnvVar = getenv(
"FIELD3D_DEBUG");
257 Msg::print(
"Registered FieldMappingIO class " + className);
268 FieldMappingIOFuncMap::const_iterator i =
m_mappingIOs.find(className);
Contains the ClassFactory class for registering Field3D classes.
Contains the PluginLoader class.
FieldRes::Ptr createField(const std::string &className) const
Instances an object by name.
FieldIO::Ptr createFieldIO(const std::string &className) const
Instances an IO object by name.
static ClassFactory & singleton()
}
ClassFactory()
Standard constructor.
FieldMappingIOFuncMap m_mappingIOs
Map of create functions for FieldMapping IO classes. The key is the class name.
FieldMapping::Ptr createFieldMapping(const std::string &className) const
Instances an object by name.
FieldMappingIO::Ptr createFieldMappingIO(const std::string &className) const
Instances an IO object by name.
static boost::scoped_ptr< ClassFactory > ms_instance
Pointer to static instance.
void registerField(CreateFieldFnPtr createFunc)
Registers a class with the class pool.
void registerFieldMapping(CreateFieldMappingFnPtr createFunc)
Registers a class with the class pool.
void registerFieldIO(CreateFieldIOFnPtr createFunc)
Registers an IO class with the class pool.
void registerFieldMappingIO(CreateFieldMappingIOFnPtr createFunc)
Registers an IO class with the class pool.
FieldMappingFuncMap m_mappings
Map of create functions for FieldMappings. The key is the class name.
FieldFuncMap m_fields
Map of create functions for Fields. The key is the class name.
FieldIOFuncMap m_fieldIOs
Map of create functions for FieldIO classes. The key is the class name.
NameVec m_fieldMappingNames
boost::intrusive_ptr< FieldIO > Ptr
boost::intrusive_ptr< FieldMappingIO > Ptr
boost::intrusive_ptr< FieldMapping > Ptr
boost::intrusive_ptr< FieldRes > Ptr
static void loadPlugins()
Checks all paths in $FIELD3D_DSO_PATH and loads the plugins it finds.
FIELD3D_API void print(Severity severity, const std::string &message)
Sends the string to the assigned output, prefixing the message with the severity.
#define FIELD3D_NAMESPACE_SOURCE_CLOSE