Commit 4bd72d8b authored by Cyril Poupon's avatar Cyril Poupon
Browse files

bug fix in dictionary helpers

parent 0720ff2a
......@@ -8,10 +8,10 @@
// for scalar int32_t / float / double parameters
//
int32_t getIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
int32_t defaultValue )
int32_t gkg::getIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
int32_t defaultValue )
{
try
......@@ -43,7 +43,7 @@ int32_t getIntegerValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "int32_t getIntegerParameter( "
GKG_CATCH( "int32_t gkg::getIntegerParameter( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"bool isRequired, "
......@@ -52,10 +52,10 @@ int32_t getIntegerValue( const gkg::Dictionary& dictionary,
}
int32_t getFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
float defaultValue )
float gkg::getFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
float defaultValue )
{
try
......@@ -87,7 +87,7 @@ int32_t getFloatValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "float getFloatValue( "
GKG_CATCH( "float gkg::getFloatValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"bool isRequired, "
......@@ -96,10 +96,10 @@ int32_t getFloatValue( const gkg::Dictionary& dictionary,
}
int32_t getDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
double defaultValue )
double gkg::getDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
double defaultValue )
{
try
......@@ -131,7 +131,7 @@ int32_t getDoubleValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "double getDoubleValue( "
GKG_CATCH( "double gkg::getDoubleValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"bool isRequired, "
......@@ -145,10 +145,10 @@ int32_t getDoubleValue( const gkg::Dictionary& dictionary,
//
gkg::Vector3d< int32_t >
getVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
const gkg::Vector3d< int32_t >& defaultValue )
gkg::getVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
const gkg::Vector3d< int32_t >& defaultValue )
{
try
......@@ -193,7 +193,7 @@ getVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "gkg::Vector3d< int32_t > getVector3dOfIntegerValue( "
GKG_CATCH( "gkg::Vector3d< int32_t > gkg::getVector3dOfIntegerValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"bool isRequired, "
......@@ -203,10 +203,10 @@ getVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
gkg::Vector3d< float >
getVector3dOfFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
const gkg::Vector3d< float >& defaultValue )
gkg::getVector3dOfFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
const gkg::Vector3d< float >& defaultValue )
{
try
......@@ -251,7 +251,7 @@ getVector3dOfFloatValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "gkg::Vector3d< float > getVector3dOfFloatValue( "
GKG_CATCH( "gkg::Vector3d< float > gkg::getVector3dOfFloatValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"bool isRequired, "
......@@ -261,10 +261,10 @@ getVector3dOfFloatValue( const gkg::Dictionary& dictionary,
gkg::Vector3d< double >
getVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
const gkg::Vector3d< double >& defaultValue )
gkg::getVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired,
const gkg::Vector3d< double >& defaultValue )
{
try
......@@ -309,7 +309,7 @@ getVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "gkg::Vector3d< double > getVector3dOfDoubleValue( "
GKG_CATCH( "gkg::Vector3d< double > gkg::getVector3dOfDoubleValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"const gkg::Vector3d< double >& defaultValue, "
......@@ -323,9 +323,9 @@ getVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
//
std::vector< int32_t >
getVectorOfIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
gkg::getVectorOfIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
{
try
......@@ -380,7 +380,7 @@ getVectorOfIntegerValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "std::vector< int32_t > getVectorOfIntegerValue( "
GKG_CATCH( "std::vector< int32_t > gkg::getVectorOfIntegerValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"int32_t expectedItemCount )" );
......@@ -389,9 +389,9 @@ getVectorOfIntegerValue( const gkg::Dictionary& dictionary,
std::vector< float >
getVectorOfFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
gkg::getVectorOfFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
{
try
......@@ -446,7 +446,7 @@ getVectorOfFloatValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "std::vector< float > getVectorOfFloatValue( "
GKG_CATCH( "std::vector< float > gkg::getVectorOfFloatValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"int32_t expectedItemCount )" );
......@@ -455,9 +455,9 @@ getVectorOfFloatValue( const gkg::Dictionary& dictionary,
std::vector< double >
getVectorOfDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
gkg::getVectorOfDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
{
try
......@@ -512,7 +512,7 @@ getVectorOfDoubleValue( const gkg::Dictionary& dictionary,
return value;
}
GKG_CATCH( "std::vector< double > getVectorOfDoubleValue( "
GKG_CATCH( "std::vector< double > gkg::getVectorOfDoubleValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"int32_t expectedItemCount )" );
......@@ -525,9 +525,9 @@ getVectorOfDoubleValue( const gkg::Dictionary& dictionary,
//
std::vector< gkg::Vector3d< int32_t > >
getVectorOfVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
gkg::getVectorOfVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
{
try
......@@ -596,7 +596,7 @@ getVectorOfVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
}
GKG_CATCH( "std::vector< gkg::Vector3d< int32_t > > "
"getVectorOfVector3dOfIntegerValue( "
"gkg::getVectorOfVector3dOfIntegerValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"int32_t expectedItemCount )" );
......@@ -605,9 +605,9 @@ getVectorOfVector3dOfIntegerValue( const gkg::Dictionary& dictionary,
std::vector< gkg::Vector3d< float > >
getVectorOfVector3dOfFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
gkg::getVectorOfVector3dOfFloatValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
{
try
......@@ -676,7 +676,7 @@ getVectorOfVector3dOfFloatValue( const gkg::Dictionary& dictionary,
}
GKG_CATCH( "std::vector< gkg::Vector3d< float > > "
"getVectorOfVector3dOfFloatValue( "
"gkg::getVectorOfVector3dOfFloatValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"int32_t expectedItemCount )" );
......@@ -685,9 +685,9 @@ getVectorOfVector3dOfFloatValue( const gkg::Dictionary& dictionary,
std::vector< gkg::Vector3d< double > >
getVectorOfVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
gkg::getVectorOfVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
const std::string& key,
int32_t expectedItemCount )
{
try
......@@ -756,7 +756,7 @@ getVectorOfVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
}
GKG_CATCH( "std::vector< gkg::Vector3d< double > > "
"getVectorOfVector3dOfDoubleValue( "
"gkg::getVectorOfVector3dOfDoubleValue( "
"const gkg::Dictionary& dictonary, "
"const std::string& key, "
"int32_t expectedItemCount )" );
......@@ -768,9 +768,9 @@ getVectorOfVector3dOfDoubleValue( const gkg::Dictionary& dictionary,
// for Dictionary
//
gkg::Dictionary getDictionaryValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired )
gkg::Dictionary gkg::getDictionaryValue( const gkg::Dictionary& dictionary,
const std::string& key,
bool isRequired )
{
try
......
......@@ -16,16 +16,16 @@ namespace gkg
int32_t getIntegerValue( const Dictionary& dictionary,
const std::string& key,
bool isRequired = false,
bool isRequired = true,
int32_t defaultValue = 0 );
float getFloatValue( const Dictionary& dictionary,
const std::string& key,
bool isRequired = false,
bool isRequired = true,
float defaultValue = 0.0f );
double getDoubleValue( const Dictionary& dictionary,
const std::string& key,
bool isRequired = false,
int32_t defaultValue = 0.0 );
bool isRequired = true,
double defaultValue = 0.0 );
//
......@@ -35,21 +35,21 @@ double getDoubleValue( const Dictionary& dictionary,
Vector3d< int32_t > getVector3dOfIntegerValue(
const Dictionary& dictionary,
const std::string& key,
bool isRequired = false,
bool isRequired = true,
const Vector3d< int32_t >& defaultValue =
Vector3d< int32_t >( 0, 0, 0 ) );
Vector3d< float > getVector3dOfFloatValue(
const Dictionary& dictionary,
const std::string& key,
bool isRequired = false,
bool isRequired = true,
const Vector3d< float >& defaultValue =
Vector3d< float >( 0.0f, 0.0f, 0.0f ) );
Vector3d< double > getVector3dOfDoubleValue(
const Dictionary& dictionary,
const std::string& key,
bool isRequired = false,
const Vector3d< float >& defaultValue =
Vector3d< float >( 0.0f, 0.0f, 0.0f ) );
const Dictionary& dictionary,
const std::string& key,
bool isRequired = true,
const Vector3d< double >& defaultValue =
Vector3d< double >( 0.0f, 0.0f, 0.0f ) );
//
......@@ -92,7 +92,7 @@ std::vector< Vector3d< double > > getVectorOfVector3dOfDoubleValue(
Dictionary getDictionaryValue( const Dictionary& dictionary,
const std::string& key,
bool isRequired = false );
bool isRequired = true );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment