#include <hpp/manipulation/container.hh>
Public Types | |
typedef std::map< Key, Element > | ElementMap_t |
Public Member Functions | |
void | add (const Key &name, const Element &element) |
Add an element. | |
const Element & | get (const Key &name) const |
Return the element named name. | |
template<typename ReturnType > | |
ReturnType | getAllAs () const |
Return a list of all elements. | |
const ElementMap_t & | getAll () const |
Return the underlying map. | |
std::ostream & | print (std::ostream &os) const |
Print object in a stream. | |
Protected Member Functions | |
Container () | |
Constructor. |
typedef std::map<Key, Element> hpp::manipulation::Container< Element, Key >::ElementMap_t |
hpp::manipulation::Container< Element, Key >::Container | ( | ) | [inline, protected] |
Constructor.
void hpp::manipulation::Container< Element, Key >::add | ( | const Key & | name, |
const Element & | element | ||
) | [inline] |
Add an element.
const Element& hpp::manipulation::Container< Element, Key >::get | ( | const Key & | name | ) | const [inline] |
Return the element named name.
Reimplemented in hpp::manipulation::ProblemSolver, and hpp::manipulation::Device.
const ElementMap_t& hpp::manipulation::Container< Element, Key >::getAll | ( | ) | const [inline] |
Return the underlying map.
Reimplemented in hpp::manipulation::ProblemSolver, and hpp::manipulation::Device.
ReturnType hpp::manipulation::Container< Element, Key >::getAllAs | ( | ) | const [inline] |
Return a list of all elements.
ReturnType | must have a push_back method. |
std::ostream& hpp::manipulation::Container< Element, Key >::print | ( | std::ostream & | os | ) | const [inline] |
Print object in a stream.
Reimplemented in hpp::manipulation::Device.