hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
hpp::core::Container< Types, Key > Struct Template Reference

#include <hpp/core/container.hh>

Public Types

typedef std::map< Key, Types > Map_t
 
typedef Map_t::value_type value_type
 
typedef Map_t::key_type key_type
 
typedef Map_t::mapped_type mapped_type
 
typedef Map_t::const_iterator const_iterator
 
typedef Map_t::iterator iterator
 

Public Member Functions

void erase (const Key &name)
 Erase the element named name. More...
 
void clear ()
 Clear content of container. More...
 
void add (const key_type &name, const mapped_type &element)
 Add an element. More...
 
bool has (const key_type &name) const
 Return the element named name. More...
 
const mapped_typeget (const key_type &name) const
 Return the element named name. More...
 
const mapped_typeget (const key_type &name, const mapped_type &defaultValue) const
 Return the element named name. More...
 
template<typename ReturnType >
ReturnType getAllAs () const
 
template<typename ReturnType >
ReturnType getKeys () const
 
std::ostream & print (std::ostream &os) const
 Print object in a stream. More...
 

Public Attributes

Map_t map
 

Member Typedef Documentation

◆ const_iterator

template<typename Types, typename Key = std::string>
typedef Map_t::const_iterator hpp::core::Container< Types, Key >::const_iterator

◆ iterator

template<typename Types, typename Key = std::string>
typedef Map_t:: iterator hpp::core::Container< Types, Key >::iterator

◆ key_type

template<typename Types, typename Key = std::string>
typedef Map_t::key_type hpp::core::Container< Types, Key >::key_type

◆ Map_t

template<typename Types, typename Key = std::string>
typedef std::map<Key, Types> hpp::core::Container< Types, Key >::Map_t

◆ mapped_type

template<typename Types, typename Key = std::string>
typedef Map_t::mapped_type hpp::core::Container< Types, Key >::mapped_type

◆ value_type

template<typename Types, typename Key = std::string>
typedef Map_t::value_type hpp::core::Container< Types, Key >::value_type

Member Function Documentation

◆ add()

template<typename Types, typename Key = std::string>
void hpp::core::Container< Types, Key >::add ( const key_type name,
const mapped_type element 
)
inline

Add an element.

◆ clear()

template<typename Types, typename Key = std::string>
void hpp::core::Container< Types, Key >::clear ( void  )
inline

Clear content of container.

◆ erase()

template<typename Types, typename Key = std::string>
void hpp::core::Container< Types, Key >::erase ( const Key &  name)
inline

Erase the element named name.

◆ get() [1/2]

template<typename Types, typename Key = std::string>
const mapped_type& hpp::core::Container< Types, Key >::get ( const key_type name) const
inline

Return the element named name.

◆ get() [2/2]

template<typename Types, typename Key = std::string>
const mapped_type& hpp::core::Container< Types, Key >::get ( const key_type name,
const mapped_type defaultValue 
) const
inline

Return the element named name.

◆ getAllAs()

template<typename Types, typename Key = std::string>
template<typename ReturnType >
ReturnType hpp::core::Container< Types, Key >::getAllAs ( ) const
inline

Return a list of all elements

Template Parameters
ReturnTypemust have a push_back method.

◆ getKeys()

template<typename Types, typename Key = std::string>
template<typename ReturnType >
ReturnType hpp::core::Container< Types, Key >::getKeys ( ) const
inline

◆ has()

template<typename Types, typename Key = std::string>
bool hpp::core::Container< Types, Key >::has ( const key_type name) const
inline

Return the element named name.

◆ print()

template<typename Types, typename Key = std::string>
std::ostream& hpp::core::Container< Types, Key >::print ( std::ostream &  os) const
inline

Print object in a stream.

Member Data Documentation

◆ map

template<typename Types, typename Key = std::string>
Map_t hpp::core::Container< Types, Key >::map

The documentation for this struct was generated from the following file: