TC::Util Namespace Reference
[Base Classes and Functions]

Defines basic functions like Min, Max, Swap . More...


Functions

template<class T >
Abs (const T &x)
template<class T >
const T & Max (const T &x, const T &y)
template<class T >
const T & Max (const T &x, const T &y, const T &z)
template<class T >
const T & Min (const T &x, const T &y)
template<class T >
const T & Min (const T &x, const T &y, const T &z)
template<class T >
void Swap (T &x, T &y)
template<class T >
void FreeMemoryOfStlContainer (T &container)
 Really frees memory of vector.
template<class T >
void MinimizeMemoryOfStlContainer (T &container)
 Minimizes the memory usage of a vector.
template<class T >
void SafeRelease (T &mem)
 Function template for safe memory pointer deletion.
template<class T >
void SafeReleaseArray (T &mem)
 Function template for safe memory pointer deletion of an allocated array.
template<class T >
uint32 ArraySize (const T &array)
void SwapBytes (uint8 &)
 Swaps the bytes of an uint8 value.
void SwapBytes (uint16 &val)
 Swaps the bytes of an uint16 value.
void SwapBytes (uint32 &val)
 Swaps the bytes of an uint32 value.
void SwapBytes (uint64 &val)
 Swaps the bytes of an uint64 value.
void SwapBytes (sint8 &)
 Swaps the bytes of an sint8 value.
void SwapBytes (sint16 &val)
 Swaps the bytes of an sint16 value.
void SwapBytes (sint32 &val)
 Swaps the bytes of an sint32 value.
void SwapBytes (sint64 &val)
 Swaps the bytes of an sint64 value.
void SwapBytes (float &val)
 Swaps the bytes of an float value.
void SwapBytes (double &val)
 Swaps the bytes of an double value.
template<class T >
void SwapBytes (T &val)
 Swaps the bytes of any type.
bool IsBigEndian ()
bool IsLittleEndian ()


Detailed Description

Defines basic functions like Min, Max, Swap .

..


Function Documentation

template<class T >
T TC::Util::Abs ( const T &  x  )  [inline]

Returns:
the absolute value of the given value

Definition at line 62 of file TCUtil.h.

template<class T >
const T& TC::Util::Max ( const T &  x,
const T &  y 
) [inline]

Returns:
maximum of two values

Definition at line 69 of file TCUtil.h.

Referenced by Max().

Here is the caller graph for this function:

template<class T >
const T& TC::Util::Max ( const T &  x,
const T &  y,
const T &  z 
) [inline]

Returns:
maximum of three values

Definition at line 75 of file TCUtil.h.

References Max().

Here is the call graph for this function:

template<class T >
const T& TC::Util::Min ( const T &  x,
const T &  y 
) [inline]

Returns:
minimum of two values

Definition at line 82 of file TCUtil.h.

Referenced by Min().

Here is the caller graph for this function:

template<class T >
const T& TC::Util::Min ( const T &  x,
const T &  y,
const T &  z 
) [inline]

Returns:
minimum of three values

Definition at line 88 of file TCUtil.h.

References Min().

Here is the call graph for this function:

template<class T >
void TC::Util::Swap ( T &  x,
T &  y 
) [inline]

Returns:
Swap the two variables

Definition at line 96 of file TCUtil.h.

Referenced by TC::Math::Normalize().

Here is the caller graph for this function:

template<class T >
void TC::Util::FreeMemoryOfStlContainer ( T &  container  )  [inline]

Really frees memory of vector.

Definition at line 105 of file TCUtil.h.

template<class T >
void TC::Util::MinimizeMemoryOfStlContainer ( T &  container  )  [inline]

Minimizes the memory usage of a vector.

Definition at line 113 of file TCUtil.h.

template<class T >
void TC::Util::SafeRelease ( T &  mem  )  [inline]

Function template for safe memory pointer deletion.

Parameters:
p_mem memory pointer to delete

Definition at line 124 of file TCUtil.h.

template<class T >
void TC::Util::SafeReleaseArray ( T &  mem  )  [inline]

Function template for safe memory pointer deletion of an allocated array.

Parameters:
p_mem memory pointer to delete

Definition at line 138 of file TCUtil.h.

template<class T >
uint32 TC::Util::ArraySize ( const T &  array  )  [inline]

Returns:
The number of elements of an C array

Definition at line 149 of file TCUtil.h.

void TC::Util::SwapBytes ( uint8 &   )  [inline]

Swaps the bytes of an uint8 value.

Definition at line 155 of file TCUtil.h.

Referenced by SwapBytes().

Here is the caller graph for this function:

void TC::Util::SwapBytes ( uint16 &  val  )  [inline]

Swaps the bytes of an uint16 value.

Definition at line 159 of file TCUtil.h.

void TC::Util::SwapBytes ( uint32 &  val  )  [inline]

Swaps the bytes of an uint32 value.

Definition at line 164 of file TCUtil.h.

void TC::Util::SwapBytes ( uint64 &  val  )  [inline]

Swaps the bytes of an uint64 value.

Definition at line 169 of file TCUtil.h.

References SwapBytes().

Here is the call graph for this function:

void TC::Util::SwapBytes ( sint8 &   )  [inline]

Swaps the bytes of an sint8 value.

Definition at line 181 of file TCUtil.h.

void TC::Util::SwapBytes ( sint16 &  val  )  [inline]

Swaps the bytes of an sint16 value.

Definition at line 185 of file TCUtil.h.

References SwapBytes().

Here is the call graph for this function:

void TC::Util::SwapBytes ( sint32 &  val  )  [inline]

Swaps the bytes of an sint32 value.

Definition at line 190 of file TCUtil.h.

References SwapBytes().

Here is the call graph for this function:

void TC::Util::SwapBytes ( sint64 &  val  )  [inline]

Swaps the bytes of an sint64 value.

Definition at line 195 of file TCUtil.h.

References SwapBytes().

Here is the call graph for this function:

void TC::Util::SwapBytes ( float &  val  )  [inline]

Swaps the bytes of an float value.

Definition at line 200 of file TCUtil.h.

References SwapBytes().

Here is the call graph for this function:

void TC::Util::SwapBytes ( double &  val  )  [inline]

Swaps the bytes of an double value.

Definition at line 205 of file TCUtil.h.

References SwapBytes().

Here is the call graph for this function:

template<class T >
void TC::Util::SwapBytes ( T &  val  )  [inline]

Swaps the bytes of any type.

Definition at line 212 of file TCUtil.h.

bool TC::Util::IsBigEndian (  )  [inline]

Returns:
if byte ordering is big endian

Definition at line 224 of file TCUtil.h.

Referenced by IsLittleEndian().

Here is the caller graph for this function:

bool TC::Util::IsLittleEndian (  )  [inline]

Returns:
if byte ordering is little endian

Definition at line 236 of file TCUtil.h.

References IsBigEndian().

Referenced by TC::ByteOrderedValue< T, false >::SwapBytes().

Here is the call graph for this function:

Here is the caller graph for this function:


Copyright (c) Thomas Goessler 2003 - 2008