DUNE: Uniform Navigational Environment  2016.09.0
DUNE Namespace Reference

Detailed Description

DUNE: Uniform Navigational Environment.

ISO C++ headers.

Namespaces

 Algorithms
 
 Compression
 
 Concurrency
 
 Control
 
 Coordinates
 
 Database
 
 Entities
 
 FileSystem
 
 Hardware
 
 IMC
 
 IO
 
 Maneuvers
 
 Math
 
 Media
 
 Monitors
 
 Navigation
 
 Network
 
 Parsers
 
 Plans
 
 Power
 
 Simulation
 
 Status
 
 Streams
 
 System
 
 Tasks
 
 Time
 
 Units
 
 Utils
 

Classes

class  Daemon
 
class  Exception
 
class  NotImplemented
 
class  I18N
 
class  Memory
 

Functions

template<typename T , long vmin, long vmax>
bool castLongSigned (const std::string &str, T &var)
 
template<typename T , unsigned long vmax>
bool castLongUnsigned (const std::string &str, T &var)
 
template<typename T >
bool castLexical (const std::string &str, T &var)
 
template<typename T >
castLexical (const std::string &str)
 
template<>
bool castLexical (const std::string &str, int8_t &var)
 
template<>
bool castLexical (const std::string &str, uint8_t &var)
 
template<>
bool castLexical (const std::string &str, int16_t &var)
 
template<>
bool castLexical (const std::string &str, uint16_t &var)
 
template<>
bool castLexical (const std::string &str, int32_t &var)
 
template<>
bool castLexical (const std::string &str, uint32_t &var)
 
template<>
bool castLexical (const std::string &str, std::string &var)
 
template<>
bool castLexical (const std::string &str, bool &var)
 
template<>
bool castLexical (const std::string &str, std::vector< std::string > &var)
 
template<typename T >
bool castLexical (const std::string &str, std::vector< T > &var)
 
template<typename T >
std::string uncastLexical (T &var)
 
std::string uncastLexical (int8_t var)
 
std::string uncastLexical (uint8_t var)
 
template<>
std::string uncastLexical (std::vector< std::string > &var)
 
const char * getFullVersion (void)
 
const char * getCompileDate (void)
 

Variables

class DUNE_DLL_SYM Daemon
 
class DUNE_DLL_SYM Exception
 
class DUNE_DLL_SYM NotImplemented
 

Function Documentation

template<typename T >
bool DUNE::castLexical ( const std::string &  str,
T &  var 
)
inline
template<typename T >
T DUNE::castLexical ( const std::string &  str)
inline

Convert a string to a value of a generic type without reporting conversion errors.

Parameters
strstring to convert.
Returns
converted value.

References castLexical().

template<>
bool DUNE::castLexical ( const std::string &  str,
int8_t &  var 
)
inline

Convert a string to a 8 bit signed integer.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.

References castLongSigned().

template<>
bool DUNE::castLexical ( const std::string &  str,
uint8_t &  var 
)
inline

Convert a string to a 8 bit unsigned integer.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.
template<>
bool DUNE::castLexical ( const std::string &  str,
int16_t &  var 
)
inline

Convert a string to a 16 bit signed integer.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.

References castLongSigned().

template<>
bool DUNE::castLexical ( const std::string &  str,
uint16_t &  var 
)
inline

Convert a string to a 16 bit unsigned integer.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.
template<>
bool DUNE::castLexical ( const std::string &  str,
int32_t &  var 
)
inline

Convert a string to a 32 bit signed integer.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.

References castLongSigned().

template<>
bool DUNE::castLexical ( const std::string &  str,
uint32_t &  var 
)
inline

Convert a string to a 32 bit unsigned integer.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.
template<>
bool DUNE::castLexical ( const std::string &  str,
std::string &  var 
)
inline

Convert a string to another string.

This function circumvents the problem of extract strings with spaces from stringstreams (used by the general template).

Parameters
strstring to convert.
varvariable to hold the result.
Returns
always true.
template<>
bool DUNE::castLexical ( const std::string &  str,
bool &  var 
)
inline

Convert a string to a boolean.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.
template<>
bool DUNE::castLexical ( const std::string &  str,
std::vector< std::string > &  var 
)
inline

Convert a string of elements separated by c_string_list_separator to a vector of strings.

The destination vector is cleared before conversion.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.

References DUNE::Utils::String::split().

template<typename T >
bool DUNE::castLexical ( const std::string &  str,
std::vector< T > &  var 
)
inline

Convert a string of elements separated by c_string_list_separator to a vector with elements of generic type.

The destination vector is cleared before conversion.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false if any errors have occurred.

References castLexical(), and DUNE::Utils::String::split().

template<typename T , long vmin, long vmax>
bool DUNE::castLongSigned ( const std::string &  str,
T &  var 
)
inline

Convert a string to a long signed integer, checking limits in the process.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.

Referenced by castLexical().

template<typename T , unsigned long vmax>
bool DUNE::castLongUnsigned ( const std::string &  str,
T &  var 
)
inline

Convert a string to a long unsigned integer, checking top limit.

Parameters
strstring to convert.
varvariable to hold the result.
Returns
true if the conversion is successful, false otherwise.
const char* DUNE::getCompileDate ( void  )

Retrieve the compilation date as a string.

Returns
compilation date.
const char* DUNE::getFullVersion ( void  )

Retrieve the full version as a string.

Returns
full version string.

Referenced by DUNE::Parsers::operator<<(), and DUNE::Daemon::writeParamsXML().

std::string DUNE::uncastLexical ( int8_t  var)
inline
std::string DUNE::uncastLexical ( uint8_t  var)
inline
template<>
std::string DUNE::uncastLexical ( std::vector< std::string > &  var)
inline

Variable Documentation

class DUNE_DLL_SYM DUNE::Daemon
class DUNE_DLL_SYM DUNE::Exception