CL_System Class Reference
[clanCore System]

General system helper functions. More...

#include <system.h>

List of all members.

Static Public Member Functions

Attributes
static unsigned int get_time ()
 Get the current time (since system boot), in milliseconds.
static bool detect_mmx ()
 Returns true if MMX technology is available on this CPU.
static bool detect_3dnow ()
 Returns true if 3DNow! technology is available on this CPU.
static bool detect_ext_3dnow ()
 Returns true if extended 3DNow! is present on this CPU.
static CL_Mutexget_sharedptr_mutex ()
 Returns the mutex used by CL_SharedPtr.
static int get_num_cores ()
 Return the number of CPU cores.
Operations
static int capture_stack_trace (int frames_to_skip, int max_frames, void **out_frames, unsigned int *out_hash=0)
 Captures a stack back trace by walking up the stack and recording the information for each frame.
static std::vector< CL_Stringget_stack_frames_text (void **frames, int num_frames)
 Returns the function names and lines for the specified stack frame addresses.
static void sleep (int millis)
 Sleep for 'millis' milliseconds.
static CL_String get_exe_path ()
 Returns the full dirname of the executable that started this process (aka argv[0]).
template<typename T>
static void call_constructor (T *memory)
 Calls the constructor of a class.
template<typename T, typename P1>
static void call_constructor (T *memory, P1 p1)
template<typename T, typename P1, typename P2>
static void call_constructor (T *memory, P1 p1, P2 p2)
template<typename T, typename P1, typename P2, typename P3>
static void call_constructor (T *memory, P1 p1, P2 p2, P3 p3)
template<typename T, typename P1, typename P2, typename P3, typename P4>
static void call_constructor (T *memory, P1 p1, P2 p2, P3 p3, P4 p4)
template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5>
static void call_constructor (T *memory, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
static void call_constructor (T *memory, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
static void call_constructor (T *memory, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
template<typename T>
static void call_destructor (T *memory)
 Calls the destructor of a class.
static void alloc_thread_temp_pool ()
static void free_thread_temp_pool ()


Detailed Description

General system helper functions.


Member Function Documentation

static void CL_System::alloc_thread_temp_pool  )  [static]
 

template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
static void CL_System::call_constructor T *  memory,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6,
P7  p7
[inline, static]
 

template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
static void CL_System::call_constructor T *  memory,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5,
P6  p6
[inline, static]
 

template<typename T, typename P1, typename P2, typename P3, typename P4, typename P5>
static void CL_System::call_constructor T *  memory,
P1  p1,
P2  p2,
P3  p3,
P4  p4,
P5  p5
[inline, static]
 

template<typename T, typename P1, typename P2, typename P3, typename P4>
static void CL_System::call_constructor T *  memory,
P1  p1,
P2  p2,
P3  p3,
P4  p4
[inline, static]
 

template<typename T, typename P1, typename P2, typename P3>
static void CL_System::call_constructor T *  memory,
P1  p1,
P2  p2,
P3  p3
[inline, static]
 

template<typename T, typename P1, typename P2>
static void CL_System::call_constructor T *  memory,
P1  p1,
P2  p2
[inline, static]
 

template<typename T, typename P1>
static void CL_System::call_constructor T *  memory,
P1  p1
[inline, static]
 

template<typename T>
static void CL_System::call_constructor T *  memory  )  [inline, static]
 

Calls the constructor of a class.

template<typename T>
static void CL_System::call_destructor T *  memory  )  [inline, static]
 

Calls the destructor of a class.

static int CL_System::capture_stack_trace int  frames_to_skip,
int  max_frames,
void **  out_frames,
unsigned int *  out_hash = 0
[static]
 

Captures a stack back trace by walking up the stack and recording the information for each frame.

static bool CL_System::detect_3dnow  )  [static]
 

Returns true if 3DNow! technology is available on this CPU.

static bool CL_System::detect_ext_3dnow  )  [static]
 

Returns true if extended 3DNow! is present on this CPU.

static bool CL_System::detect_mmx  )  [static]
 

Returns true if MMX technology is available on this CPU.

static void CL_System::free_thread_temp_pool  )  [static]
 

static CL_String CL_System::get_exe_path  )  [static]
 

Returns the full dirname of the executable that started this process (aka argv[0]).

This is necessary since when programms are started from the PATH there is no clean and simple way to figure out the location of the data files, thus information is read from /proc/self/exe under GNU/Linux and from GetModuleFileName() on Win32.

Returns:
full dirname of the executable, trailing slash is included

static int CL_System::get_num_cores  )  [static]
 

Return the number of CPU cores.

static CL_Mutex* CL_System::get_sharedptr_mutex  )  [static]
 

Returns the mutex used by CL_SharedPtr.

static std::vector<CL_String> CL_System::get_stack_frames_text void **  frames,
int  num_frames
[static]
 

Returns the function names and lines for the specified stack frame addresses.

On Linux, to obtain function names, remember to link with the -rdynamic flag

static unsigned int CL_System::get_time  )  [static]
 

Get the current time (since system boot), in milliseconds.

static void CL_System::sleep int  millis  )  [static]
 

Sleep for 'millis' milliseconds.


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 02:39:41 2009 for ClanLib by  doxygen 1.4.6