hpp::manipulation::Container< Element, Key > Class Template Reference

#include <hpp/manipulation/container.hh>

List of all members.

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_tgetAll () const
 Return the underlying map.
std::ostream & print (std::ostream &os) const
 Print object in a stream.

Protected Member Functions

 Container ()
 Constructor.

template<typename Element, typename Key = std::string>
class hpp::manipulation::Container< Element, Key >


Member Typedef Documentation

template<typename Element, typename Key = std::string>
typedef std::map<Key, Element> hpp::manipulation::Container< Element, Key >::ElementMap_t

Constructor & Destructor Documentation

template<typename Element, typename Key = std::string>
hpp::manipulation::Container< Element, Key >::Container ( ) [inline, protected]

Constructor.


Member Function Documentation

template<typename Element, typename Key = std::string>
void hpp::manipulation::Container< Element, Key >::add ( const Key &  name,
const Element &  element 
) [inline]

Add an element.

template<typename Element, typename Key = std::string>
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.

template<typename Element, typename Key = std::string>
const ElementMap_t& hpp::manipulation::Container< Element, Key >::getAll ( ) const [inline]

Return the underlying map.

Reimplemented in hpp::manipulation::ProblemSolver, and hpp::manipulation::Device.

template<typename Element, typename Key = std::string>
template<typename ReturnType >
ReturnType hpp::manipulation::Container< Element, Key >::getAllAs ( ) const [inline]

Return a list of all elements.

Template Parameters:
ReturnTypemust have a push_back method.
template<typename Element, typename Key = std::string>
std::ostream& hpp::manipulation::Container< Element, Key >::print ( std::ostream &  os) const [inline]

Print object in a stream.

Reimplemented in hpp::manipulation::Device.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends