fw4spl
fwAtomConversion::AtomVisitor Class Reference

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::ObjectgetDataObject () const
 Returns the data object. Calls this method after visit().
 

Detailed Description

This class is used to convert a fwAtoms to a fwData.

Date
2013

Definition at line 31 of file AtomVisitor.hpp.

Member Function Documentation

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.

Exceptions
fwAtomConversion::exception::DataFactoryNotFoundif the data class is not found in fwData::factory
fwAtomConversion::exception::DuplicatedDataUUIDif 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.


The documentation for this class was generated from the following files: