#include <iso_base_tools.h>
Collaboration diagram for iso::base::Tools:
Public Member Functions | |
template<class Type> | |
void | buffer2Type (const char *pBuffer, Type &pValue) |
convert byte buffer into int | |
template<class Type> | |
void | buffer2TypeLE (const char *pBuffer, Type &pValue) |
convert byte buffer into int (little endian version) | |
template<class Type> | |
void | buffer2TypeBE (const char *pBuffer, Type &pValue) |
convert byte buffer into int (big endian version) | |
template<class Type> | |
void | type2Buffer (const Type &pValue, char *pBuffer) |
convert type into buffer | |
template<class Type> | |
void | type2BufferLE (const Type &pValue, char *pBuffer) |
convert type into buffer (iittle endian version) | |
template<class Type> | |
void | type2BufferBE (const Type &pValue, char *pBuffer) |
convert type into buffer (big endian version) | |
template<class Type> | |
void | type2Buffer (const Type *pValues, unsigned int pValueCount, char *pBuffer) |
convert type array into buffer | |
template<class Type> | |
void | type2BufferLE (const Type *pValues, unsigned int pValueCount, char *pBuffer) |
convert type array into buffer (little endian version) | |
template<class Type> | |
void | type2BufferBE (const Type *pValues, unsigned int pValueCount, char *pBuffer) |
convert type array into buffer (big endian version) | |
void | buffer2Buffer (const char *pSource, unsigned int pValueSize, unsigned int pValueCount, char *pTarget) |
convert buffer into buffer | |
void | buffer2Buffer (char *pSource, char *pTarget, unsigned int pArraySize) |
copy byte buffer into byte buffer | |
void | byteswap (char *pSource, char *pTarget, unsigned int pArraySize) |
byteswap from source byte array to target byte array | |
float | byteswap (float pValue) |
byteswap for float values | |
double | byteswap (double pValue) |
byteswap for double values | |
int64 | time () |
return absolute time (in micro secs) | |
double | milisecs () |
return absolute time (in mili secs) | |
int64 | absTime () |
return absolute time (in micro secs) | |
int64 | relTime () |
return relative time since the first instantiation of this class (in micro secs) | |
Static Public Member Functions | |
static Tools & | get () |
get singleton instance | |
static void | destroy () |
destroy singleton instance | |
Protected Member Functions | |
Tools () | |
default constructor | |
~Tools () | |
destructor | |
Protected Attributes | |
Time | mStartTime |
start time | |
Time | mCurrentTime |
current time | |
TimeZone | mTimeZone |
time zone | |
Static Protected Attributes | |
static Tools * | sTools |
singleton instance |
providing a basic set basic utility functions
Created by Daniel Bisig on 7/22/07.
Tools::Tools | ( | ) | [protected] |
default constructor
Tools::~Tools | ( | ) | [protected] |
destructor
Tools & Tools::get | ( | ) | [static] |
get singleton instance
void Tools::destroy | ( | ) | [static] |
destroy singleton instance
void iso::base::Tools::buffer2Type | ( | const char * | pBuffer, | |
Type & | pValue | |||
) |
convert byte buffer into int
pBuffer | byte buffer |
void iso::base::Tools::buffer2TypeLE | ( | const char * | pBuffer, | |
Type & | pValue | |||
) |
convert byte buffer into int (little endian version)
pBuffer | byte buffer |
void iso::base::Tools::buffer2TypeBE | ( | const char * | pBuffer, | |
Type & | pValue | |||
) |
convert byte buffer into int (big endian version)
pBuffer | byte buffer |
void iso::base::Tools::type2Buffer | ( | const Type & | pValue, | |
char * | pBuffer | |||
) |
convert type into buffer
pValue | type value | |
pBuffer | target buffer |
void iso::base::Tools::type2BufferLE | ( | const Type & | pValue, | |
char * | pBuffer | |||
) |
convert type into buffer (iittle endian version)
pValue | type value | |
pBuffer | target buffer |
void iso::base::Tools::type2BufferBE | ( | const Type & | pValue, | |
char * | pBuffer | |||
) |
convert type into buffer (big endian version)
pValue | type value | |
pBuffer | target buffer |
void iso::base::Tools::type2Buffer | ( | const Type * | pValues, | |
unsigned int | pValueCount, | |||
char * | pBuffer | |||
) |
convert type array into buffer
pValues | type array | |
pValueCount | number of type values | |
pBuffer | target buffer |
void iso::base::Tools::type2BufferLE | ( | const Type * | pValues, | |
unsigned int | pValueCount, | |||
char * | pBuffer | |||
) |
convert type array into buffer (little endian version)
pValues | type array | |
pValueCount | number of type values | |
pBuffer | target buffer |
void iso::base::Tools::type2BufferBE | ( | const Type * | pValues, | |
unsigned int | pValueCount, | |||
char * | pBuffer | |||
) |
convert type array into buffer (big endian version)
pValues | type array | |
pValueCount | number of type values | |
pBuffer | target buffer |
void Tools::buffer2Buffer | ( | const char * | pSource, | |
unsigned int | pValueSize, | |||
unsigned int | pValueCount, | |||
char * | pTarget | |||
) |
convert buffer into buffer
pSource | source buffer | |
pValueSize | size of value type stored in source buffer | |
pValueCount | number of values stored in source buffer | |
pTarget | target buffer |
void Tools::buffer2Buffer | ( | char * | pSource, | |
char * | pTarget, | |||
unsigned int | pArraySize | |||
) |
copy byte buffer into byte buffer
pSource | source byte array | |
pTarget | target byte array | |
pArraySize | size of array |
void Tools::byteswap | ( | char * | pSource, | |
char * | pTarget, | |||
unsigned int | pArraySize | |||
) |
byteswap from source byte array to target byte array
pSource | source byte array | |
pTarget | target byte array | |
pArraySize | size of array |
float Tools::byteswap | ( | float | pValue | ) |
byteswap for float values
pValue | input value |
double Tools::byteswap | ( | double | pValue | ) |
byteswap for double values
pValue | input value |
int64 Tools::time | ( | ) |
return absolute time (in micro secs)
double Tools::milisecs | ( | ) |
return absolute time (in mili secs)
int64 Tools::absTime | ( | ) |
return absolute time (in micro secs)
int64 Tools::relTime | ( | ) |
return relative time since the first instantiation of this class (in micro secs)
Tools * Tools::sTools [static, protected] |
singleton instance
Time iso::base::Tools::mStartTime [protected] |
start time
Time iso::base::Tools::mCurrentTime [protected] |
current time
TimeZone iso::base::Tools::mTimeZone [protected] |
time zone