fw4spl
|
This class is used to convert a fwAtoms to a fwData. More...
#include <AtomVisitor.hpp>
Classes | |
struct | ChangePolicy |
This policy changes data's uuid if it already exists. More... | |
struct | IReadPolicy |
Visitor UUID Management policies. More... | |
struct | ReusePolicy |
This policy reuses the data associated with an existing uuid. More... | |
struct | StrictPolicy |
This policy throws an exception if the loaded uuid is not available. More... | |
Public Types | |
typedef std::map< ::fwTools::UUID::UUIDType, std::shared_ptr< ::fwData::Object > > | DataCacheType |
Public Member Functions | |
FWATOMCONVERSION_API | AtomVisitor (const ::fwAtoms::Object::sptr &atomObj, DataCacheType &cache, const IReadPolicy &uuidPolicy) |
Constructors. Initializes parameters. | |
virtual FWATOMCONVERSION_API | ~AtomVisitor () |
Destructor. Does nothing. | |
FWATOMCONVERSION_API void | visit () |
Visits the atom information to create the data object and store it in the cache. More... | |
FWATOMCONVERSION_API std::shared_ptr< ::fwData::Object > | getDataObject () const |
Returns the data object. Calls this method after visit(). | |
This class is used to convert a fwAtoms to a fwData.
Definition at line 31 of file AtomVisitor.hpp.
void fwAtomConversion::AtomVisitor::visit | ( | ) |
Visits the atom information to create the data object and store it in the cache.
Creates a new fwData::Object from classname store in meta info CLASSNAME_METAINFO. Creates this new object with UUID store in fwAtoms::Object ID.
fwAtomConversion::exception::DataFactoryNotFound | if the data class is not found in fwData::factory |
fwAtomConversion::exception::DuplicatedDataUUID | if the data uuid already exists in the system. |
Definition at line 100 of file AtomVisitor.cpp.
References fwAtomConversion::DataVisitor::CLASSNAME_METAINFO, and fwAtomConversion::DataVisitor::ID_METAINFO.