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. | |
Field class | |
void | registerField (CreateFieldFnPtr createFunc) |
Registers a class with the class pool. | |
FieldRes::Ptr | createField (const std::string &className) const |
Instances an object by name. | |
void | registerFieldIO (CreateFieldIOFnPtr createFunc) |
Registers an IO class with the class pool. | |
FieldIO::Ptr | createFieldIO (const std::string &className) const |
Instances an IO object by name. | |
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. | |
NameVec | m_fieldNames |
FieldIOFuncMap | m_fieldIOs |
Map of create functions for FieldIO classes. The key is the class name. | |
NameVec | m_fieldIONames |
FieldMappingFuncMap | m_mappings |
Map of create functions for FieldMappings. The key is the class name. | |
NameVec | m_fieldMappingNames |
FieldMappingIOFuncMap | m_mappingIOs |
Map of create functions for FieldMapping IO classes. The key is the class name. | |
NameVec | m_fieldMappingIONames |
static boost::scoped_ptr< ClassFactory > | ms_instance |
Pointer to static instance. | |
void | registerFieldMapping (CreateFieldMappingFnPtr createFunc) |
Registers a class with the class pool. | |
FieldMapping::Ptr | createFieldMapping (const std::string &className) const |
Instances an object by name. | |
void | registerFieldMappingIO (CreateFieldMappingIOFnPtr createFunc) |
Registers an IO class with the class pool. | |
FieldMappingIO::Ptr | createFieldMappingIO (const std::string &className) const |
Instances an IO object by name. | |
static ClassFactory & | singleton () |
} | |
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 FIELD3D_MTX_T, m_fieldNames, m_fields, Msg::print(), and Msg::SevWarning.
FieldRes::Ptr ClassFactory::createField | ( | const std::string & | className | ) | const |
Instances an object by name.
Definition at line 114 of file ClassFactory.cpp.
References FIELD3D_MTX_T, and m_fields.
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 FIELD3D_MTX_T, m_fieldIONames, m_fieldIOs, Msg::print(), and Msg::SevWarning.
FieldIO::Ptr ClassFactory::createFieldIO | ( | const std::string & | className | ) | const |
Instances an IO object by name.
Definition at line 165 of file ClassFactory.cpp.
References FIELD3D_MTX_T, and m_fieldIOs.
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 FIELD3D_MTX_T, m_fieldMappingNames, m_mappings, Msg::print(), and Msg::SevWarning.
FieldMapping::Ptr ClassFactory::createFieldMapping | ( | const std::string & | className | ) | const |
Instances an object by name.
Definition at line 216 of file ClassFactory.cpp.
References FIELD3D_MTX_T, and m_mappings.
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 FIELD3D_MTX_T, m_fieldMappingNames, m_mappingIOs, Msg::print(), and Msg::SevWarning.
FieldMappingIO::Ptr ClassFactory::createFieldMappingIO | ( | const std::string & | className | ) | const |
Instances an IO object by name.
Definition at line 266 of file ClassFactory.cpp.
References FIELD3D_MTX_T, and m_mappingIOs.
|
static |
}
Access point for the singleton instance.
Definition at line 278 of file ClassFactory.cpp.
References FIELD3D_MTX_T, and ms_instance.
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.
Referenced by createField(), and registerField().
|
private |
Definition at line 146 of file ClassFactory.h.
Referenced by registerField().
|
private |
Map of create functions for FieldIO classes. The key is the class name.
Definition at line 149 of file ClassFactory.h.
Referenced by createFieldIO(), and registerFieldIO().
|
private |
Definition at line 151 of file ClassFactory.h.
Referenced by registerFieldIO().
|
private |
Map of create functions for FieldMappings. The key is the class name.
Definition at line 154 of file ClassFactory.h.
Referenced by createFieldMapping(), and registerFieldMapping().
|
private |
Definition at line 156 of file ClassFactory.h.
Referenced by registerFieldMapping(), and registerFieldMappingIO().
|
private |
Map of create functions for FieldMapping IO classes.
The key is the class name.
Definition at line 160 of file ClassFactory.h.
Referenced by createFieldMappingIO(), and registerFieldMappingIO().
|
private |
Definition at line 162 of file ClassFactory.h.
|
staticprivate |
Pointer to static instance.
Definition at line 165 of file ClassFactory.h.
Referenced by singleton().