fw4spl
|
Structural creator database. All structural creators are stored in this database. More...
#include <StructuralCreatorDB.hpp>
Public Types | |
typedef std::shared_ptr< StructuralCreatorDB > | sptr |
typedef std::pair< std::string, std::string > | VersionIDType |
Typedef used to store the pair classname/version of a data structure. | |
typedef std::map< VersionIDType, std::shared_ptr< ::fwAtomsPatch::IStructuralCreator > > | CreatorsType |
Typedef used to store all the structural creators. | |
Public Member Functions | |
FWATOMSPATCH_API void | registerCreator (std::shared_ptr< ::fwAtomsPatch::IStructuralCreator > creator) |
Registers a new creator. More... | |
FWATOMSPATCH_API std::shared_ptr< ::fwAtomsPatch::IStructuralCreator > | getCreator (const std::string &classname, const std::string &version) |
Retrieves creator to create data revision. More... | |
FWATOMSPATCH_API std::shared_ptr< ::fwAtoms::Object > | create (const std::string &classname, const std::string &version) |
Creates a new object instance with given classname and version. More... | |
FWATOMSPATCH_API size_t | size () const |
Returns the number of creators. | |
StructuralCreatorDB () | |
Constructor. | |
~StructuralCreatorDB () | |
Destructor. | |
Static Public Member Functions | |
static StructuralCreatorDB::sptr | getDefault () |
Returns the default instance of StructuralCreatorDB. | |
Structural creator database. All structural creators are stored in this database.
Definition at line 33 of file StructuralCreatorDB.hpp.
fwAtoms::Object::sptr fwAtomsPatch::StructuralCreatorDB::create | ( | const std::string & | classname, |
const std::string & | version | ||
) |
Creates a new object instance with given classname and version.
Definition at line 45 of file StructuralCreatorDB.cpp.
References getCreator(), and OSLM_ASSERT.
fwAtomsPatch::IStructuralCreator::sptr fwAtomsPatch::StructuralCreatorDB::getCreator | ( | const std::string & | classname, |
const std::string & | version | ||
) |
Retrieves creator to create data revision.
classname | the structure classname. |
version | the structure version. |
Definition at line 26 of file StructuralCreatorDB.cpp.
Referenced by create().
void fwAtomsPatch::StructuralCreatorDB::registerCreator | ( | std::shared_ptr< ::fwAtomsPatch::IStructuralCreator > | creator | ) |
Registers a new creator.
creator | the new creator. |
Definition at line 17 of file StructuralCreatorDB.cpp.