1.00.2
C++ Standard Airline IT Object Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
DictionaryManager.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// StdAir
5
#include <
stdair/basic/DictionaryManager.hpp
>
6
#include <
stdair/basic/BasConst_General.hpp
>
7
8
namespace
stdair {
9
10
// ////////////////////////////////////////////////////////////////////
11
const
stdair::Probability_T
DictionaryManager::
12
keyToValue
(
const
DictionaryKey_T
iKey) {
13
const
float
lValue =
14
static_cast<
float
>
(iKey) /
DEFAULT_NUMBER_OF_SUBDIVISIONS
;
15
const
stdair::Probability_T
lProbability (lValue);
16
return
lProbability;
17
}
18
19
// ////////////////////////////////////////////////////////////////////
20
const
DictionaryKey_T
DictionaryManager::
21
valueToKey
(
const
stdair::Probability_T
iValue) {
22
const
unsigned
short
lValueMultipliedByThousand =
23
static_cast<
unsigned
short
>
(iValue) *
DEFAULT_NUMBER_OF_SUBDIVISIONS
;
24
const
DictionaryKey_T
lDictionaryKey (lValueMultipliedByThousand);
25
return
lDictionaryKey;
26
}
27
28
}
BasConst_General.hpp
DictionaryManager.hpp
stdair::DictionaryManager::keyToValue
static const stdair::Probability_T keyToValue(const DictionaryKey_T)
Definition:
DictionaryManager.cpp:12
stdair::Probability_T
float Probability_T
Definition:
stdair_maths_types.hpp:99
stdair::DEFAULT_NUMBER_OF_SUBDIVISIONS
const unsigned int DEFAULT_NUMBER_OF_SUBDIVISIONS
stdair::DictionaryManager::valueToKey
static const DictionaryKey_T valueToKey(const stdair::Probability_T)
Definition:
DictionaryManager.cpp:21
stdair::DictionaryKey_T
unsigned short DictionaryKey_T
Definition:
DictionaryManager.hpp:17
Generated on Wed Jan 20 2016 14:19:55 for StdAir by
1.8.5