Jpp
pmt_effective_area_update_2
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JLang
JSTDToolkit.hh
Go to the documentation of this file.
1
#ifndef __JLANG__JSTDTOOLKIT__
2
#define __JLANG__JSTDTOOLKIT__
3
4
#include "
JLang/JSTDTypes.hh
"
5
6
7
/**
8
* \author mdejong
9
*/
10
11
namespace
JLANG {}
12
namespace
JPP {
using namespace
JLANG; }
13
14
namespace
JLANG {
15
16
/**
17
* Get value in map.
18
*
19
* \param map map
20
* \param key key
21
* \param value default value
22
* \return value
23
*/
24
template
<
class
JKey_t,
class
JValue_t,
class
JComparator_t,
class
JAllocator_t>
25
inline
const
JValue_t&
getValue
(
const
std::map<JKey_t, JValue_t, JComparator_t, JAllocator_t>
&
map
,
const
JKey_t& key,
const
JValue_t& value)
26
{
27
typename
std::map<JKey_t, JValue_t, JComparator_t, JAllocator_t>::const_iterator
i = map.find(key);
28
29
if
(i != map.end())
30
return
i->second;
31
else
32
return
value;
33
}
34
}
35
36
#endif
JEEP::getValue
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
Definition:
JScale.hh:47
std::map
Definition:
JSTDTypes.hh:16
JSTDTypes.hh
Forward declarations of STD containers.
map
const char * map
Definition:
elog.cc:87
Generated by
1.8.5