Darc Library  2012.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
darc Namespace Reference

Namespaces

namespace  core
namespace  geometry
namespace  math
namespace  numeric
namespace  protox

Classes

class  Singleton
 Template singleton class wrapper. More...
class  Debugger
class  DC_Component
class  MyEvent
class  DC_Directory
class  DC_File
class  IFunction
 Interface class for function pointers. More...
class  DC_MemberFunction
 Template interface for function pointers (non-static class member). More...
class  DC_StaticFunction
class  EventHandler
 Event handler for function pointer management. More...
class  DC_Dictonary
class  DC_DICT_BASE
class  DC_FunctionPointer
class  DC_Set
class  DC_IMacro
class  DC_Macro
class  DC_IThread
 Interface class for threads. More...
class  DC_Thread
 Wrapper class for windows threads. More...
class  DC_Mutex
class  DC_Timer
class  DC_Dispatcher
class  Window
 Wrapper class for window management (Windows OS). More...

Typedefs

typedef DCR(* PFN_EVENTCALLBACK )(MyEvent *)
typedef std::map< UInt,
std::wstring > 
DC_StringMap
typedef std::map< UInt,
DC_StringMap
DC_TranslationMap
typedef uint8_t Byte
typedef int16_t Short
typedef uint16_t UShort
typedef wchar_t WChar
typedef int32_t Int
typedef uint32_t UInt
typedef float Real
typedef int64_t Int64
typedef uint64_t UInt64
typedef double Real64
typedef UInt DCR

Enumerations

enum  E_DCR {
  OK = 0, FAILED, ARG_NULL, ARG_INVALID,
  OUT_OF_BOUNDS, OUT_OF_MEMORY, NOT_AVAILABLE, INACTIVE,
  CORRUPTED, NOT_FOUND
}
 General return types. Range 0-99. More...
enum  DC_ELANGUAGE { DC_ALL, DC_ENGLISH, DC_GERMAN, DC_LANGUAGE_MAX }

Functions

template<typename K , typename V >
DCR CR_GetMapValue (const std::map< K, V > &_map, const K &_key, V &_valueOut)
 Template wrapper class for maps.
template<typename K , typename V >
DCR CR_SetMapValue (const std::map< K, V > &_map, const K &_key, const V &_value)
DC_API UInt64 dc_getHash (Byte *data, UInt len)
Int DC_API dc_rand_int (int _min, int _max)
Int DC_API dc_sign (Real _x)
DC_API wostream & operator<< (wostream &_o, DC_Dictonary &_d)
DC_API const bool operator< (const DC_Dictonary::Item &_i0, const DC_Dictonary::Item &_i1)
DC_API std::wostream & operator<< (std::ostream &_o, DC_Dictonary &_d)
template<typename T >
Sq (const T &_tValue)
template<typename T >
DC_DTR (T _tDeg)
template<typename T >
DC_RTD (T _tRad)
template<typename T >
void Delete (T *&_ptObj)
template<typename T >
void Null (T *&_ptObj)
template<class T >
Random (T _min, T _max)
 Returns a random number without seeding.
template<class T >
T * dc_bsearch_first (T *_v, T *_key, int _left, int _right)
DC_API ostream & operator<< (ostream &_o, const DC_IMacro &_obj)

Variables

const int MOD_ADLER = 65521
static const Real64 EPSILON = 0.000001
static const Real64 PI = 3.1415926535897932384626433832795

Typedef Documentation

typedef uint8_t darc::Byte
typedef std::map<UInt, std::wstring> darc::DC_StringMap
typedef UInt darc::DCR
typedef int32_t darc::Int
typedef int64_t darc::Int64
typedef float darc::Real
typedef double darc::Real64
typedef int16_t darc::Short
typedef uint32_t darc::UInt
typedef uint64_t darc::UInt64
typedef uint16_t darc::UShort
typedef wchar_t darc::WChar

Enumeration Type Documentation

Enumerator:
DC_ALL 
DC_ENGLISH 
DC_GERMAN 
DC_LANGUAGE_MAX 

General return types. Range 0-99.

Enumerator:
OK 

Everything going as planned.

FAILED 

Failed for no further specified reason.

ARG_NULL 

Failed due to null pointer.

ARG_INVALID 
OUT_OF_BOUNDS 

Index out of bounds.

OUT_OF_MEMORY 

Failed due to memory limitations.

NOT_AVAILABLE 

Action currently not available.

INACTIVE 

Action currently not available.

CORRUPTED 

Failed due to data corruption.

NOT_FOUND 

Item not found.


Function Documentation

template<typename K , typename V >
DCR darc::CR_GetMapValue ( const std::map< K, V > &  _map,
const K &  _key,
V &  _valueOut 
)

Template wrapper class for maps.

This wrapper can be used as a base class in combination with Singleton for sub classes that need to initiate the maps content globally on program start up. template <typename K, typename V> class DC_API DC_Map { public: DC_Map() {}

virtual ~DC_Map() {}

DCR getValue(K _key, V* _vOut) const { std::map<K,V>::const_iterator it = m_map.find(_key); if(it != m_map.end()){ (*_vOut) = it->second; return OK; } return NOT_FOUND; }

void insert(K _key, V _value) { m_map.insert(std::pair<K,V>(_key, _value)); }

const std::map<K, V>* getMap() const { return }

protected: std::map<K, V> m_map; };

template<typename K , typename V >
DCR darc::CR_SetMapValue ( const std::map< K, V > &  _map,
const K &  _key,
const V &  _value 
)
template<class T >
T* darc::dc_bsearch_first ( T *  _v,
T *  _key,
int  _left,
int  _right 
)
template<typename T >
T darc::DC_DTR ( _tDeg)
DC_API UInt64 darc::dc_getHash ( Byte *  data,
UInt  len 
)
Int DC_API darc::dc_rand_int ( int  _min,
int  _max 
)
template<typename T >
T darc::DC_RTD ( _tRad)
Int DC_API darc::dc_sign ( Real  _x)
template<typename T >
void darc::Delete ( T *&  _ptObj)
template<typename T >
void darc::Null ( T *&  _ptObj)
DC_API const bool darc::operator< ( const DC_Dictonary::Item &  _i0,
const DC_Dictonary::Item &  _i1 
)
DC_API ostream & darc::operator<< ( ostream &  _o,
const DC_IMacro &  _obj 
)

Operator "Stream out".

DC_API wostream& darc::operator<< ( wostream &  _o,
DC_Dictonary &  _d 
)
DC_API std::wostream& darc::operator<< ( std::ostream &  _o,
DC_Dictonary &  _d 
)
template<class T >
T darc::Random ( _min,
_max 
)

Returns a random number without seeding.

template<typename T >
T darc::Sq ( const T &  _tValue)

Variable Documentation

const Real64 darc::EPSILON = 0.000001 [static]
const int darc::MOD_ADLER = 65521
const Real64 darc::PI = 3.1415926535897932384626433832795 [static]