StdAir Logo  1.00.18
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
DictionaryManager.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// StdAir
7
8namespace stdair {
9
10 // ////////////////////////////////////////////////////////////////////
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 // ////////////////////////////////////////////////////////////////////
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}
Handle on the StdAir library context.
unsigned short DictionaryKey_T
const unsigned int DEFAULT_NUMBER_OF_SUBDIVISIONS
static const DictionaryKey_T valueToKey(const stdair::Probability_T)
static const stdair::Probability_T keyToValue(const DictionaryKey_T)