|
fw4spl
|
Class represented a fwData::Object. More...
#include <Object.hpp>
Inheritance diagram for fwAtoms::Object:
Collaboration diagram for fwAtoms::Object:Public Types | |
| typedef std::map< std::string, Base::sptr > | AttributesType |
| typedef std::map< std::string, std::string > | MetaInfosType |
Public Types inherited from fwAtoms::Base | |
| enum | AtomType { BOOLEAN = 1, NUMERIC, STRING, OBJECT, SEQUENCE, MAP, BLOB } |
| typedef ::fwAtoms::factory::Key | Key |
Public Member Functions | |
| virtual bool | isA (const std::string &type) const override |
| Object (::fwAtoms::Base::Key key) | |
| Constructor. More... | |
| virtual | ~Object () |
| Destructor. | |
| FWATOMS_API void | setAttributes (const AttributesType &attrs) |
| Sets the attributes map. | |
| const AttributesType & | getAttributes () const |
| Returns the internal map. | |
| FWATOMS_API Base::sptr | getAttribute (const std::string &key) const |
| Returns requested attribute if exists, empty sptr else. | |
| template<typename OBJECT_TYPE > | |
| std::shared_ptr< OBJECT_TYPE > | getAttribute (const std::string &key) const |
| Returns requested attribute casted in OBJECT_TYPE::sptr if exists, empty sptr else. | |
| FWATOMS_API void | setAttribute (const std::string &key, const Base::sptr &) |
| add a atrtribut, old value is erased | |
| FWATOMS_API AttributesType::size_type | eraseAttribute (const std::string &key) |
| Removes an attributes. More... | |
| FWATOMS_API void | clearAttribute () |
| clear attributes | |
| FWATOMS_API void | setMetaInfo (const std::string &key, const std::string &value) |
| Add a metainfo in the object MetaInfo coud be anything limited to string type. | |
| FWATOMS_API void | setMetaInfos (const MetaInfosType &metaInfos) |
| Replace metaInfos. | |
| FWATOMS_API std::string | getMetaInfo (const std::string &key) const |
| Returns one meta information. | |
| const MetaInfosType & | getMetaInfos () const |
| Get internal metaInfo mapping. | |
| FWATOMS_API MetaInfosType::size_type | eraseMetaInfo (const std::string &key) |
| Removes a MetaInfo. More... | |
| FWATOMS_API void | clearMetaInfo () |
| clear MetaInfos | |
| virtual FWATOMS_API Base::sptr | clone () const override |
| Returns a clone object. | |
| ::fwAtoms::Base::AtomType | type () const override |
| returns Atom type | |
Public Member Functions inherited from fwAtoms::Base | |
| bool | isValue () const |
| Test if the current base is a value or not (Value = {string;numeric;boolean}) More... | |
| bool | isBoolean () const |
| Test if the current base is a boolean. More... | |
| bool | isNumeric () const |
| Test if the current base is a Numeric (real or integer) More... | |
| bool | isString () const |
| Test if the current base is a string. More... | |
| bool | isSequence () const |
| Test if the current base is a sequence. More... | |
| bool | isMapping () const |
| Test if the current base is a mapping. More... | |
| bool | isBlob () const |
| Test if the current base is a blob (a object with a buffer) More... | |
| bool | isObject () const |
| Test if the current base is an object (representation of fwData) More... | |
| virtual FWATOMS_API std::string | getString () const |
| Return the string representation of a value. More... | |
Public Member Functions inherited from fwCore::BaseObject | |
Static Public Member Functions | |
| static bool | isTypeOf (const std::string &type) |
Static Public Member Functions inherited from fwAtoms::Base | |
| static bool | isTypeOf (const std::string &type) |
| static const std::string & | classname () |
| return full object's classname with its namespace, i.e. fwCore::BaseObject | |
Static Public Member Functions inherited from fwCore::BaseObject | |
| static bool | isTypeOf (const std::string &type) |
| static const std::string & | leafClassname () |
| return object's classname without its namespace, i.e. BaseObject | |
| static const std::string & | classname () |
| return object's classname without its namespace, i.e. BaseObject | |
Friends | |
| template<class , class , class > | |
| class | ::fwTools::ClassFactory |
| class | ::fwTools::Factory |
Demangling methods | |
| virtual const std::string & | getLeafClassname () const override |
| return object's classname without its namespace, i.e. BaseObject | |
| virtual const std::string & | getClassname () const override |
| return full object's classname with its namespace, i.e. fwCore::BaseObject | |
| static const std::string & | leafClassname () |
| return object's classname without its namespace, i.e. BaseObject | |
| static const std::string & | classname () |
| return object's classname without its namespace, i.e. BaseObject | |
Additional Inherited Members | |
Static Public Attributes inherited from fwAtoms::Base | |
| static FWATOMS_API const std::string | s_VERSION = "1" |
| Defines fwAtoms version. | |
Protected Member Functions inherited from fwAtoms::Base | |
| Base () | |
| Constructor. | |
Class represented a fwData::Object.
Definition at line 21 of file SrcLib/core/fwAtoms/include/fwAtoms/Object.hpp.
|
inline |
Constructor.
| key | Private construction key |
Definition at line 35 of file SrcLib/core/fwAtoms/include/fwAtoms/Object.hpp.
| Object::AttributesType::size_type fwAtoms::Object::eraseAttribute | ( | const std::string & | key | ) |
Removes an attributes.
| key | Key of the element to be removed |
Definition at line 95 of file SrcLib/core/fwAtoms/src/fwAtoms/Object.cpp.
| Object::MetaInfosType::size_type fwAtoms::Object::eraseMetaInfo | ( | const std::string & | key | ) |
Removes a MetaInfo.
| key | Key of the element to be removed |
Definition at line 109 of file SrcLib/core/fwAtoms/src/fwAtoms/Object.cpp.