Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JColorFacetMap_t Struct Reference

Auxiliary map for color facets. More...

#include <JColorFacet.hh>

Inheritance diagram for JLANG::JColorFacetMap_t:
std::map< std::string, JSinglePointer< JColorFacet > >

Public Types

typedef std::map< std::string, JSinglePointer< JColorFacet > > map_type
 
typedef map_type::key_type key_type
 
typedef map_type::mapped_type mapped_type
 
typedef map_type::value_type value_type
 

Public Member Functions

 JColorFacetMap_t ()
 Default constructor.
 
const mapped_typeoperator[] (const key_type &key) const
 Get value for given key.
 
template<class T >
void operator() (const JType< T > &type)
 Insert data type.
 

Detailed Description

Auxiliary map for color facets.

Definition at line 278 of file JColorFacet.hh.

Member Typedef Documentation

◆ map_type

◆ key_type

Definition at line 282 of file JColorFacet.hh.

◆ mapped_type

map_type::mapped_type JLANG::JColorFacetMap_t::mapped_type

Definition at line 283 of file JColorFacet.hh.

◆ value_type

Definition at line 284 of file JColorFacet.hh.

Constructor & Destructor Documentation

◆ JColorFacetMap_t()

JLANG::JColorFacetMap_t::JColorFacetMap_t ( )
inline

Default constructor.

Definition at line 290 of file JColorFacet.hh.

291 {
292 for_each(*this, JType<JColorFacetTypes_t>());
293 }
void for_each(JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist)
For each data type method.
Definition JTypeList.hh:414

Member Function Documentation

◆ operator[]()

const mapped_type & JLANG::JColorFacetMap_t::operator[] ( const key_type & key) const
inline

Get value for given key.

Note that this method will throw an error if given key is absent.

Parameters
keykey
Returns
value

Definition at line 304 of file JColorFacet.hh.

305 {
306 const_iterator p = find(key);
307
308 if (p != this->end()) {
309 return p->second;
310 }
311
312 THROW(JNullPointerException, "Invalid key " << key);
313 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.

◆ operator()()

template<class T >
void JLANG::JColorFacetMap_t::operator() ( const JType< T > & type)
inline

Insert data type.

Parameters
typedata type

Definition at line 322 of file JColorFacet.hh.

323 {
324 insert(value_type(T::getName(), new T()));
325 }
map_type::value_type value_type

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