Map is a container for mapping representation.
More...
#include <Map.hpp>
|
typedef std::map< std::string, Base::sptr > | MapType |
|
typedef MapType::key_type | KeyType |
|
typedef MapType::mapped_type | MappedType |
|
typedef MapType::value_type | ValueType |
|
typedef MapType::iterator | IteratorType |
|
typedef MapType::const_iterator | ConstIteratorType |
|
typedef MapType::reverse_iterator | ReverseIteratorType |
|
typedef MapType::const_reverse_iterator | ConstReverseIteratorType |
|
typedef MapType::size_type | SizeType |
|
|
typedef MapType::key_type | key_type |
|
typedef MapType::mapped_type | mapped_type |
|
typedef MapType::value_type | value_type |
|
typedef MapType::iterator | iterator |
|
typedef MapType::const_iterator | const_iterator |
|
typedef MapType::reverse_iterator | reverse_iterator |
|
typedef MapType::const_reverse_iterator | const_reverse_iterator |
|
typedef MapType::size_type | size_type |
|
enum | AtomType {
BOOLEAN = 1,
NUMERIC,
STRING,
OBJECT,
SEQUENCE,
MAP,
BLOB
} |
|
typedef ::fwAtoms::factory::Key | Key |
|
|
virtual bool | isA (const std::string &type) const override |
|
| Map (::fwAtoms::Base::Key key) |
| Constructor. More...
|
|
virtual | ~Map () |
| Destructor.
|
|
std::pair< IteratorType, bool > | insert (const std::string &key, const Base::sptr &value) |
| Insert a new value in the map. More...
|
|
size_t | size () const |
| retrieve size of map More...
|
|
IteratorType | begin () |
| Provide an iterator on the first element. More...
|
|
ConstIteratorType | begin () const |
| Provide a const iterator on the first element. More...
|
|
IteratorType | end () |
| Return an iterator after the last element in the map.
|
|
ConstIteratorType | end () const |
| Return a const iterator after the last element in the map.
|
|
void | clear () |
| clear the map
|
|
bool | empty () const |
| test if the map is empty More...
|
|
const MapType & | getValue () const |
| returns atom's map
|
|
MapType::const_iterator | find (const std::string &key) const |
| find an element in the map More...
|
|
Base::sptr | operator[] (const std::string &key) |
| Access to a member with []. More...
|
|
virtual FWATOMS_API Base::sptr | clone () const override |
| Returns a clone object.
|
|
::fwAtoms::Base::AtomType | type () const override |
| returns Atom type
|
|
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...
|
|
|
static bool | isTypeOf (const std::string &type) |
|
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 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
|
|
|
template<class , class , class > |
class | ::fwTools::ClassFactory |
|
class | ::fwTools::Factory |
|
|
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
|
|
Map is a container for mapping representation.
For exemple, this metadata is used to bind :
- std::map
- ::boost::unordered_map
- fwData::Graph (a part)
- boost graph
Definition at line 31 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 53 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 55 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 52 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 49 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 50 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 54 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 56 of file Map.hpp.
boost_foreach/stl compatibility
Definition at line 51 of file Map.hpp.
Constructor.
- Parameters
-
key | Private construction key |
Definition at line 63 of file Map.hpp.
IteratorType fwAtoms::Map::begin |
( |
| ) |
|
|
inline |
Provide an iterator on the first element.
- Returns
- An iterator on the first element, end() if map is empty.
Definition at line 97 of file Map.hpp.
ConstIteratorType fwAtoms::Map::begin |
( |
| ) |
const |
|
inline |
Provide a const iterator on the first element.
- Returns
- An iterator on the first element, end() if map is empty.
Definition at line 106 of file Map.hpp.
bool fwAtoms::Map::empty |
( |
| ) |
const |
|
inline |
test if the map is empty
- Returns
- true if empty
Definition at line 137 of file Map.hpp.
MapType::const_iterator fwAtoms::Map::find |
( |
const std::string & |
key | ) |
const |
|
inline |
find an element in the map
- Parameters
-
- Returns
- an iterator on value pointed by key if exist, else return Map.end()
Definition at line 156 of file Map.hpp.
std::pair<IteratorType, bool> fwAtoms::Map::insert |
( |
const std::string & |
key, |
|
|
const Base::sptr & |
value |
|
) |
| |
|
inline |
Insert a new value in the map.
- Parameters
-
key | the key, if exist the oldest value is erased. |
value | the new value |
Definition at line 79 of file Map.hpp.
Base::sptr fwAtoms::Map::operator[] |
( |
const std::string & |
key | ) |
|
|
inline |
Access to a member with [].
- Parameters
-
- Returns
- the value associated with the key or an empty base if the key is not in the map.
Definition at line 167 of file Map.hpp.
size_t fwAtoms::Map::size |
( |
| ) |
const |
|
inline |
retrieve size of map
- Returns
- the map size
Definition at line 88 of file Map.hpp.
The documentation for this class was generated from the following files: