torque Torque Game Engine Documentation
TGE Version 1.5.2

engine/platform/platform.h File Reference

#include "core/torqueConfig.h"
#include "platform/types.h"
#include "platform/platformAssert.h"

Namespaces

namespace  Memory

Data Structures

struct  Platform
struct  Platform::LocalTime
struct  Platform::FileInfo
struct  Platform::VolumeInformation
struct  Platform::SystemInfo_struct
struct  Platform::SystemInfo_struct::Processor
struct  Processor
struct  TimeManager
struct  Math
struct  Net

Defines

#define dT(s)   s
 Obtain a pointer to the start of the Nth UTF-8 character in the string.
#define QSORT_CALLBACK   FN_CDECL
#define new   new(__FILE__, __LINE__)
#define placenew(x)   new(x)
#define dMalloc(x)   dMalloc_r(x, __FILE__, __LINE__)
#define dStrdup(x)   dStrdup_r(x, __FILE__, __LINE__)

Typedefs

typedef voidFILE_HANDLE
typedef S32 NetSocket

Enumerations

enum  ProcessorType {
  CPU_X86Compatible,
  CPU_Intel_Unknown,
  CPU_Intel_486,
  CPU_Intel_Pentium,
  CPU_Intel_PentiumMMX,
  CPU_Intel_PentiumPro,
  CPU_Intel_PentiumII,
  CPU_Intel_PentiumCeleron,
  CPU_Intel_PentiumIII,
  CPU_Intel_Pentium4,
  CPU_AMD_K6,
  CPU_AMD_K6_2,
  CPU_AMD_K6_3,
  CPU_AMD_Athlon,
  CPU_AMD_Unknown,
  CPU_Cyrix_6x86,
  CPU_Cyrix_MediaGX,
  CPU_Cyrix_6x86MX,
  CPU_Cyrix_GXm,
  CPU_Cyrix_Unknown,
  CPU_PowerPC_Unknown,
  CPU_PowerPC_601,
  CPU_PowerPC_603,
  CPU_PowerPC_603e,
  CPU_PowerPC_603ev,
  CPU_PowerPC_604,
  CPU_PowerPC_604e,
  CPU_PowerPC_604ev,
  CPU_PowerPC_G3,
  CPU_PowerPC_G4,
  CPU_PowerPC_G4_7450,
  CPU_PowerPC_G4_7455,
  CPU_PowerPC_G4_7447,
  CPU_PowerPC_G5
}
enum  x86Properties {
  CPU_PROP_C = (1<<0),
  CPU_PROP_FPU = (1<<1),
  CPU_PROP_MMX = (1<<2),
  CPU_PROP_3DNOW = (1<<3),
  CPU_PROP_SSE = (1<<4),
  CPU_PROP_RDTSC = (1<<5)
}
enum  PPCProperties {
  CPU_PROP_PPCMIN = (1<<0),
  CPU_PROP_ALTIVEC = (1<<1),
  CPU_PROP_PPCMP = (1<<7)
}
enum  DriveType {
  DRIVETYPE_FIXED = 0,
  DRIVETYPE_REMOVABLE = 1,
  DRIVETYPE_REMOTE = 2,
  DRIVETYPE_CDROM = 3,
  DRIVETYPE_RAMDISK = 4,
  DRIVETYPE_UNKNOWN = 5
}
enum  FontCharset {
  TGE_ANSI_CHARSET = 0,
  TGE_SYMBOL_CHARSET,
  TGE_SHIFTJIS_CHARSET,
  TGE_HANGEUL_CHARSET,
  TGE_HANGUL_CHARSET,
  TGE_GB2312_CHARSET,
  TGE_CHINESEBIG5_CHARSET,
  TGE_OEM_CHARSET,
  TGE_JOHAB_CHARSET,
  TGE_HEBREW_CHARSET,
  TGE_ARABIC_CHARSET,
  TGE_GREEK_CHARSET,
  TGE_TURKISH_CHARSET,
  TGE_VIETNAMESE_CHARSET,
  TGE_THAI_CHARSET,
  TGE_EASTEUROPE_CHARSET,
  TGE_RUSSIAN_CHARSET,
  TGE_MAC_CHARSET,
  TGE_BALTIC_CHARSET
}
enum  DFILE_STATUS { DFILE_OK = 1 }

Functions

char * dStrcat (char *dst, const char *src)
char * dStrncat (char *dst, const char *src, dsize_t len)
char * dStrcatl (char *dst, dsize_t dstSize,...)
int dStrcmp (const char *str1, const char *str2)
int dStrcmp (const UTF16 *str1, const UTF16 *str2)
int dStricmp (const char *str1, const char *str2)
int dStrncmp (const char *str1, const char *str2, dsize_t len)
int dStrnicmp (const char *str1, const char *str2, dsize_t len)
char * dStrcpy (char *dst, const char *src)
char * dStrcpyl (char *dst, dsize_t dstSize,...)
char * dStrncpy (char *dst, const char *src, dsize_t len)
dsize_t dStrlen (const char *str)
char * dStrupr (char *str)
char * dStrlwr (char *str)
char * dStrchr (char *str, int c)
const char * dStrchr (const char *str, int c)
char * dStrrchr (char *str, int c)
const char * dStrrchr (const char *str, int c)
dsize_t dStrspn (const char *str, const char *set)
dsize_t dStrcspn (const char *str, const char *set)
char * dStrstr (char *str1, char *str2)
char * dStrstr (const char *str1, const char *str2)
char * dStrtok (char *str, const char *sep)
int dAtoi (const char *str)
float dAtof (const char *str)
bool dAtob (const char *str)
void dPrintf (const char *format,...)
int dVprintf (const char *format, void *arglist)
int dSprintf (char *buffer, dsize_t bufferSize, const char *format,...)
int dVsprintf (char *buffer, dsize_t bufferSize, const char *format, void *arglist)
int dSscanf (const char *buffer, const char *format,...)
int dFflushStdout ()
int dFflushStderr ()
char dToupper (const char c)
char dTolower (const char c)
bool dIsalnum (const char c)
bool dIsalpha (const char c)
bool dIsdigit (const char c)
bool dIsspace (const char c)
void dQsort (void *base, U32 nelem, U32 width, int(QSORT_CALLBACK *fcmp)(const void *, const void *))
dsize_t Memory::getMemoryUsed ()
dsize_t Memory::getMemoryAllocated ()
void Memory::validate ()
void *FN_CDECL operator new (dsize_t size, void *ptr)
template<class T>
T * constructInPlace (T *p)
template<class T>
T * constructInPlace (T *p, const T *copy)
template<class T>
void destructInPlace (T *p)
void *FN_CDECL operator new (dsize_t size, const char *, const U32)
void *FN_CDECL operator new[] (dsize_t size, const char *, const U32)
void FN_CDECL operator delete (void *ptr)
void FN_CDECL operator delete[] (void *ptr)
char * dStrdup_r (const char *src, const char *, dsize_t)
void setBreakAlloc (dsize_t)
void setMinimumAllocUnit (U32)
voiddMalloc_r (dsize_t in_size, const char *, const dsize_t)
void dFree (void *in_pFree)
voiddRealloc (void *in_pResize, dsize_t in_size)
voiddRealMalloc (dsize_t)
void dRealFree (void *)
voiddMemcpy (void *dst, const void *src, dsize_t size)
voiddMemmove (void *dst, const void *src, dsize_t size)
voiddMemset (void *dst, int c, dsize_t size)
int dMemcmp (const void *ptr1, const void *ptr2, dsize_t size)
GOldFont * createFont (const char *name, dsize_t size, U32 charset=TGE_ANSI_CHARSET)
const char * getCharSetName (const U32 charSet)
bool dFileDelete (const char *name)
bool dFileTouch (const char *name)
bool dPathCopy (const char *fromName, const char *toName, bool nooverwrite=true)
FILE_HANDLE dOpenFileRead (const char *name, DFILE_STATUS &error)
FILE_HANDLE dOpenFileReadWrite (const char *name, bool append, DFILE_STATUS &error)
int dFileRead (FILE_HANDLE handle, U32 bytes, char *dst, DFILE_STATUS &error)
int dFileWrite (FILE_HANDLE handle, U32 bytes, const char *dst, DFILE_STATUS &error)
void dFileClose (FILE_HANDLE handle)

Variables

S32 sgTimeManagerProcessInterval
const NetSocket InvalidSocket = -1


Define Documentation

#define dT ( s   )     s

Obtain a pointer to the start of the Nth UTF-8 character in the string.

As UTF-8 characters can span multiple bytes, you can't scan the string in the same way you would an ANSI string. This allows you to quickly skip to the appropriate place in the string.

This still works if ptr points to the middle of a character.

Parameters:
ptr Pointer to last character or start of string
Returns:
Pointer to Nth UTF-8 character in the string or NULL for end of string.

#define QSORT_CALLBACK   FN_CDECL

#define new   new(__FILE__, __LINE__)

#define placenew ( x   )     new(x)

#define dMalloc ( x   )     dMalloc_r(x, __FILE__, __LINE__)

#define dStrdup ( x   )     dStrdup_r(x, __FILE__, __LINE__)


Typedef Documentation

typedef void* FILE_HANDLE

typedef S32 NetSocket


Enumeration Type Documentation

Enumerator:
CPU_X86Compatible 
CPU_Intel_Unknown 
CPU_Intel_486 
CPU_Intel_Pentium 
CPU_Intel_PentiumMMX 
CPU_Intel_PentiumPro 
CPU_Intel_PentiumII 
CPU_Intel_PentiumCeleron 
CPU_Intel_PentiumIII 
CPU_Intel_Pentium4 
CPU_AMD_K6 
CPU_AMD_K6_2 
CPU_AMD_K6_3 
CPU_AMD_Athlon 
CPU_AMD_Unknown 
CPU_Cyrix_6x86 
CPU_Cyrix_MediaGX 
CPU_Cyrix_6x86MX 
CPU_Cyrix_GXm 
CPU_Cyrix_Unknown 
CPU_PowerPC_Unknown 
CPU_PowerPC_601 
CPU_PowerPC_603 
CPU_PowerPC_603e 
CPU_PowerPC_603ev 
CPU_PowerPC_604 
CPU_PowerPC_604e 
CPU_PowerPC_604ev 
CPU_PowerPC_G3 
CPU_PowerPC_G4 
CPU_PowerPC_G4_7450 
CPU_PowerPC_G4_7455 
CPU_PowerPC_G4_7447 
CPU_PowerPC_G5 

Enumerator:
CPU_PROP_C 
CPU_PROP_FPU 
CPU_PROP_MMX 
CPU_PROP_3DNOW 
CPU_PROP_SSE 
CPU_PROP_RDTSC 

Enumerator:
CPU_PROP_PPCMIN 
CPU_PROP_ALTIVEC 
CPU_PROP_PPCMP 

enum DriveType

Enumerator:
DRIVETYPE_FIXED 
DRIVETYPE_REMOVABLE 
DRIVETYPE_REMOTE 
DRIVETYPE_CDROM 
DRIVETYPE_RAMDISK 
DRIVETYPE_UNKNOWN 

Enumerator:
TGE_ANSI_CHARSET 
TGE_SYMBOL_CHARSET 
TGE_SHIFTJIS_CHARSET 
TGE_HANGEUL_CHARSET 
TGE_HANGUL_CHARSET 
TGE_GB2312_CHARSET 
TGE_CHINESEBIG5_CHARSET 
TGE_OEM_CHARSET 
TGE_JOHAB_CHARSET 
TGE_HEBREW_CHARSET 
TGE_ARABIC_CHARSET 
TGE_GREEK_CHARSET 
TGE_TURKISH_CHARSET 
TGE_VIETNAMESE_CHARSET 
TGE_THAI_CHARSET 
TGE_EASTEUROPE_CHARSET 
TGE_RUSSIAN_CHARSET 
TGE_MAC_CHARSET 
TGE_BALTIC_CHARSET 

Enumerator:
DFILE_OK 


Function Documentation

UTF8 * dStrcat ( char *  dst,
const char *  src 
)

char* dStrncat ( char *  dst,
const char *  src,
dsize_t  len 
)

char* dStrcatl ( char *  dst,
dsize_t  dstSize,
  ... 
)

int dStrcmp ( const char *  str1,
const char *  str2 
)

int dStrcmp ( const UTF16 str1,
const UTF16 str2 
)

int dStricmp ( const char *  str1,
const char *  str2 
)

int dStrncmp ( const char *  str1,
const char *  str2,
dsize_t  len 
)

int dStrnicmp ( const char *  str1,
const char *  str2,
dsize_t  len 
)

char* dStrcpy ( char *  dst,
const char *  src 
)

char* dStrcpyl ( char *  dst,
dsize_t  dstSize,
  ... 
)

char * dStrncpy ( char *  dst,
const char *  src,
dsize_t  len 
)

dsize_t dStrlen ( const char *  str  ) 

char* dStrupr ( char *  str  ) 

char* dStrlwr ( char *  str  ) 

char* dStrchr ( char *  str,
int  c 
)

const char* dStrchr ( const char *  str,
int  c 
)

char* dStrrchr ( char *  str,
int  c 
)

const char* dStrrchr ( const char *  str,
int  c 
)

dsize_t dStrspn ( const char *  str,
const char *  set 
)

dsize_t dStrcspn ( const char *  str,
const char *  set 
)

char* dStrstr ( char *  str1,
char *  str2 
)

char* dStrstr ( const char *  str1,
const char *  str2 
)

char* dStrtok ( char *  str,
const char *  sep 
)

int dAtoi ( const char *  str  ) 

float dAtof ( const char *  str  ) 

bool dAtob ( const char *  str  ) 

void dPrintf ( const char *  format,
  ... 
)

int dVprintf ( const char *  format,
void arglist 
)

int dSprintf ( char *  buffer,
dsize_t  bufferSize,
const char *  format,
  ... 
)

int dVsprintf ( char *  buffer,
dsize_t  bufferSize,
const char *  format,
void arglist 
)

int dSscanf ( const char *  buffer,
const char *  format,
  ... 
)

int dFflushStdout (  ) 

int dFflushStderr (  ) 

char dToupper ( const char  c  )  [inline]

char dTolower ( const char  c  )  [inline]

bool dIsalnum ( const char  c  ) 

bool dIsalpha ( const char  c  ) 

bool dIsdigit ( const char  c  ) 

bool dIsspace ( const char  c  ) 

void dQsort ( void base,
U32  nelem,
U32  width,
int(QSORT_CALLBACK *fcmp)(const void *, const void *)   
)

void* FN_CDECL operator new ( dsize_t  size,
void ptr 
)

template<class T>
T* constructInPlace ( T *  p  )  [inline]

template<class T>
T* constructInPlace ( T *  p,
const T *  copy 
) [inline]

template<class T>
void destructInPlace ( T *  p  )  [inline]

void* FN_CDECL operator new ( dsize_t  size,
const char *  ,
const   U32 
)

void* FN_CDECL operator new[] ( dsize_t  size,
const char *  ,
const   U32 
)

void FN_CDECL operator delete ( void ptr  ) 

void FN_CDECL operator delete[] ( void ptr  ) 

char* dStrdup_r ( const char *  src,
const char *  ,
dsize_t   
)

void setBreakAlloc ( dsize_t   ) 

void setMinimumAllocUnit ( U32   ) 

void* dMalloc_r ( dsize_t  in_size,
const char *  ,
const   dsize_t 
)

void dFree ( void in_pFree  ) 

void* dRealloc ( void in_pResize,
dsize_t  in_size 
)

void* dRealMalloc ( dsize_t   ) 

void dRealFree ( void  ) 

void* dMemcpy ( void dst,
const void src,
dsize_t  size 
)

void* dMemmove ( void dst,
const void src,
dsize_t  size 
)

void* dMemset ( void dst,
int  c,
dsize_t  size 
)

int dMemcmp ( const void ptr1,
const void ptr2,
dsize_t  size 
)

GOldFont* createFont ( const char *  name,
dsize_t  size,
U32  charset = TGE_ANSI_CHARSET 
)

const char* getCharSetName ( const U32  charSet  ) 

bool dFileDelete ( const char *  name  ) 

bool dFileTouch ( const char *  name  ) 

bool dPathCopy ( const char *  fromName,
const char *  toName,
bool  nooverwrite = true 
)

FILE_HANDLE dOpenFileRead ( const char *  name,
DFILE_STATUS error 
)

FILE_HANDLE dOpenFileReadWrite ( const char *  name,
bool  append,
DFILE_STATUS error 
)

int dFileRead ( FILE_HANDLE  handle,
U32  bytes,
char *  dst,
DFILE_STATUS error 
)

int dFileWrite ( FILE_HANDLE  handle,
U32  bytes,
const char *  dst,
DFILE_STATUS error 
)

void dFileClose ( FILE_HANDLE  handle  ) 


Variable Documentation




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen