7 #ifndef __FWATOMS_OBJECT_HPP__ 8 #define __FWATOMS_OBJECT_HPP__ 10 #include "fwAtoms/Base.hpp" 11 #include "fwAtoms/config.hpp" 12 #include "fwAtoms/factory/new.hpp" 26 typedef std::map<std::string, Base::sptr> AttributesType;
27 typedef std::map<std::string, std::string> MetaInfosType;
47 FWATOMS_API
void setAttributes(
const AttributesType& attrs);
56 FWATOMS_API Base::sptr getAttribute(
const std::string& key)
const;
59 template <
typename OBJECT_TYPE >
60 SPTR(OBJECT_TYPE) getAttribute(
const std::string& key)
const;
63 FWATOMS_API
void setAttribute(
const std::string& key,
const Base::sptr&);
72 FWATOMS_API AttributesType::size_type eraseAttribute(
const std::string& key);
75 FWATOMS_API
void clearAttribute();
83 FWATOMS_API
void setMetaInfo(
const std::string& key,
const std::string& value);
86 FWATOMS_API
void setMetaInfos(
const MetaInfosType& metaInfos);
89 FWATOMS_API std::string getMetaInfo(
const std::string& key)
const;
104 FWATOMS_API MetaInfosType::size_type eraseMetaInfo(
const std::string& key);
107 FWATOMS_API
void clearMetaInfo();
112 FWATOMS_API
virtual Base::sptr clone()
const override;
117 ::fwAtoms::Base::AtomType
type()
const override 119 return ::fwAtoms::Base::OBJECT;
124 MetaInfosType m_metaInfos;
125 AttributesType m_attributes;
fwAtoms contains basic objects to represent any other kind of object
const MetaInfosType & getMetaInfos() const
Get internal metaInfo mapping.
::fwAtoms::Base::AtomType type() const override
returns Atom type
const AttributesType & getAttributes() const
Returns the internal map.
Class represented a fwData::Object.
Object(::fwAtoms::Base::Key key)
Constructor.
virtual ~Object()
Destructor.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Base class for all Atom classes.