Field3D
|
#include <ClassFactory.h>
Public Types | |
typedef FieldRes::Ptr(* | CreateFieldFnPtr) () |
typedef FieldIO::Ptr(* | CreateFieldIOFnPtr) () |
typedef FieldMapping::Ptr(* | CreateFieldMappingFnPtr) () |
typedef FieldMappingIO::Ptr(* | CreateFieldMappingIOFnPtr) () |
Public Member Functions | |
ClassFactory () | |
Standard constructor. More... | |
Field class | |
void | registerField (CreateFieldFnPtr createFunc) |
Registers a class with the class pool. More... | |
FieldRes::Ptr | createField (const std::string &className) const |
Instances an object by name. More... | |
void | registerFieldIO (CreateFieldIOFnPtr createFunc) |
Registers an IO class with the class pool. More... | |
FieldIO::Ptr | createFieldIO (const std::string &className) const |
Instances an IO object by name. More... | |
FieldMapping class | |
typedef std::vector< std::string > | NameVec |
typedef std::map< std::string, CreateFieldFnPtr > | FieldFuncMap |
typedef std::map< std::string, CreateFieldIOFnPtr > | FieldIOFuncMap |
typedef std::map< std::string, CreateFieldMappingFnPtr > | FieldMappingFuncMap |
typedef std::map< std::string, CreateFieldMappingIOFnPtr > | FieldMappingIOFuncMap |
FieldFuncMap | m_fields |
Map of create functions for Fields. The key is the class name. More... | |
NameVec | m_fieldNames |
FieldIOFuncMap | m_fieldIOs |
Map of create functions for FieldIO classes. The key is the class name. More... | |
NameVec | m_fieldIONames |
FieldMappingFuncMap | m_mappings |
Map of create functions for FieldMappings. The key is the class name. More... | |
NameVec | m_fieldMappingNames |
FieldMappingIOFuncMap | m_mappingIOs |
Map of create functions for FieldMapping IO classes. The key is the class name. More... | |
NameVec | m_fieldMappingIONames |
static boost::scoped_ptr< ClassFactory > | ms_instance |
Pointer to static instance. More... | |
void | registerFieldMapping (CreateFieldMappingFnPtr createFunc) |
Registers a class with the class pool. More... | |
FieldMapping::Ptr | createFieldMapping (const std::string &className) const |
Instances an object by name. More... | |
void | registerFieldMappingIO (CreateFieldMappingIOFnPtr createFunc) |
Registers an IO class with the class pool. More... | |
FieldMappingIO::Ptr | createFieldMappingIO (const std::string &className) const |
Instances an IO object by name. More... | |
static ClassFactory & | singleton () |
} More... | |
Definition at line 71 of file ClassFactory.h.
typedef FieldRes::Ptr(* ClassFactory::CreateFieldFnPtr) () |
Definition at line 78 of file ClassFactory.h.
typedef FieldIO::Ptr(* ClassFactory::CreateFieldIOFnPtr) () |
Definition at line 79 of file ClassFactory.h.
typedef FieldMapping::Ptr(* ClassFactory::CreateFieldMappingFnPtr) () |
Definition at line 80 of file ClassFactory.h.
typedef FieldMappingIO::Ptr(* ClassFactory::CreateFieldMappingIOFnPtr) () |
Definition at line 81 of file ClassFactory.h.
|
private |
Definition at line 135 of file ClassFactory.h.
|
private |
Definition at line 136 of file ClassFactory.h.
|
private |
Definition at line 137 of file ClassFactory.h.
|
private |
Definition at line 138 of file ClassFactory.h.
|
private |
Definition at line 139 of file ClassFactory.h.
ClassFactory::ClassFactory | ( | ) |
Standard constructor.
Definition at line 65 of file ClassFactory.cpp.
References PluginLoader::loadPlugins().
void ClassFactory::registerField | ( | CreateFieldFnPtr | createFunc | ) |
Registers a class with the class pool.
createFunc | Pointer to creation function |
Definition at line 72 of file ClassFactory.cpp.
References Msg::print(), and Msg::SevWarning.
FieldRes::Ptr ClassFactory::createField | ( | const std::string & | className | ) | const |
void ClassFactory::registerFieldIO | ( | CreateFieldIOFnPtr | createFunc | ) |
Registers an IO class with the class pool.
createFunc | Pointer to creation function |
Definition at line 125 of file ClassFactory.cpp.
References Msg::print(), and Msg::SevWarning.
Referenced by initIO().
FieldIO::Ptr ClassFactory::createFieldIO | ( | const std::string & | className | ) | const |
Instances an IO object by name.
Definition at line 165 of file ClassFactory.cpp.
Referenced by readField(), and writeField().
void ClassFactory::registerFieldMapping | ( | CreateFieldMappingFnPtr | createFunc | ) |
Registers a class with the class pool.
createFunc | Pointer to creation function |
Definition at line 177 of file ClassFactory.cpp.
References Msg::print(), and Msg::SevWarning.
FieldMapping::Ptr ClassFactory::createFieldMapping | ( | const std::string & | className | ) | const |
void ClassFactory::registerFieldMappingIO | ( | CreateFieldMappingIOFnPtr | createFunc | ) |
Registers an IO class with the class pool.
createFunc | Pointer to creation function |
Definition at line 227 of file ClassFactory.cpp.
References Msg::print(), and Msg::SevWarning.
Referenced by initIO().
FieldMappingIO::Ptr ClassFactory::createFieldMappingIO | ( | const std::string & | className | ) | const |
Instances an IO object by name.
Definition at line 266 of file ClassFactory.cpp.
Referenced by readFieldMapping(), writeFieldMapping(), and Field3DOutputFile::writeMapping().
|
static |
}
Access point for the singleton instance.
Definition at line 278 of file ClassFactory.cpp.
Referenced by initIO(), PluginLoader::loadPlugins(), readField(), readFieldMapping(), writeField(), writeFieldMapping(), and Field3DOutputFile::writeMapping().
|
private |
Map of create functions for Fields. The key is the class name.
Definition at line 144 of file ClassFactory.h.
|
private |
Definition at line 146 of file ClassFactory.h.
|
private |
Map of create functions for FieldIO classes. The key is the class name.
Definition at line 149 of file ClassFactory.h.
|
private |
Definition at line 151 of file ClassFactory.h.
|
private |
Map of create functions for FieldMappings. The key is the class name.
Definition at line 154 of file ClassFactory.h.
|
private |
Definition at line 156 of file ClassFactory.h.
|
private |
Map of create functions for FieldMapping IO classes.
The key is the class name.
Definition at line 160 of file ClassFactory.h.
|
private |
Definition at line 162 of file ClassFactory.h.
|
staticprivate |
Pointer to static instance.
Definition at line 165 of file ClassFactory.h.