Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
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. More...
 
const mapped_typeoperator[] (const key_type &key) const
 Get value for given key. More...
 
template<class T >
void operator() (const JType< T > &type)
 Insert data type. More...
 

Detailed Description

Auxiliary map for color facets.

Definition at line 278 of file JColorFacet.hh.

Member Typedef Documentation

Definition at line 281 of file JColorFacet.hh.

typedef map_type::key_type JLANG::JColorFacetMap_t::key_type

Definition at line 282 of file JColorFacet.hh.

typedef map_type::mapped_type JLANG::JColorFacetMap_t::mapped_type

Definition at line 283 of file JColorFacet.hh.

typedef map_type::value_type JLANG::JColorFacetMap_t::value_type

Definition at line 284 of file JColorFacet.hh.

Constructor & Destructor Documentation

JLANG::JColorFacetMap_t::JColorFacetMap_t ( )
inline

Default constructor.

Definition at line 290 of file JColorFacet.hh.

291  {
293  }
Auxiliary class for a type holder.
Definition: JType.hh:19
JObject_t & for_each(JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist)
For each data type method.
Definition: JTypeList.hh:415

Member Function Documentation

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.
Definition: JException.hh:670
Exception for null pointer operation.
Definition: JException.hh:216
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
Definition: JColorFacet.hh:284
do set_variable OUTPUT_DIRECTORY $WORKDIR T
const char * getName()
Get ROOT name of given data type.
Definition: JRootToolkit.hh:54

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