Gizmo3D

gzBase.h File Reference

Basic utilites like string and time management. More...

#include "gzBasicTypes.h"
#include "gzMemory.h"
#include "gzDebug.h"
#include "gzMutex.h"
#include <string.h>
#include "windows.h"

Go to the source code of this file.

Classes

class  gzString
 Provides a generic string management class. More...
class  gzUniqueString
struct  gzTranslation
class  gzKeyDatabase
 Provides a generic user and global environment access. More...
class  gzDirectory
 General purpose class for Filesystem access etc. More...
class  gzDirectoryEntry
 Holds data about a directory entry. More...
class  gzDirectoryIterator
 Iterator class for directory entries. More...
class  gzNameInterface
class  gzUpdateIDInterface
 The purpose of these functions is to assure that there are no changes to the data in an instanse as long as the update id value is the same. More...
class  gzUpdateIDFeatureInterface
 The purpose of these functions is to assure that there are no changes to the data in an instanse as long as the update id value is the same. More...
class  gzUpdateIDFeatureInterface::gzUpdateIDFeature
class  gzLookupUpdateID
class  gzLookupUpdateID::gzLookupUpdateData
class  gzUniqueIDManager

Defines

#define GZ_T_UNICODE(x)   (const char *)(x)
#define GZ_T_UNICODE_LEN(x)   (x)##.length()

Typedefs

typedef HANDLE gzDirHandle
typedef WIN32_FIND_DATA gzDirEntry

Enumerations

enum  gzBeepType {
  GZ_BEEP_DEFAULT, GZ_BEEP_ASTERISK, GZ_BEEP_EXCLAMATION, GZ_BEEP_HAND,
  GZ_BEEP_QUESTION, GZ_BEEP_OK
}
 Possible values for gzBeep(). More...
enum  gzRegKeyHeader { GZ_KEY_LOCAL_MACHINE, GZ_KEY_CURRENT_USER, GZ_KEY_CLASSES_ROOT }
 Possible root values for your registry entries. More...

Functions

gzDouble gzRandom ()
 Gives random double value between 0.0 and 1.0.
const gzDoublegzRandom (gzULong seqIndex)
 Gives random double value between 0.0 and 1.0.
gzBool gzIsPowerOfTwo (gzDouble number)
 Checks if value is power of two.
gzDouble gzGetUpperPowerOfTwo (gzDouble number)
 Gets value that is power of two and that is larger or equal to number.
gzLong gzGetUpperPowerOfTwoExponent (gzDouble number)
 Gets the exponent for the value that is a power of two.
gzVoid gzLtoA (char *buffer, gzLongLong number, gzUByte radix, gzLong precision=0, gzLong *len=NULL, gzBool upper=FALSE)
 Generates an ascii representation of the long integer number with radix.
gzVoid gzLtoA (gzWideChar *buffer, gzLongLong number, gzUByte radix, gzLong precision=0, gzLong *len=NULL, gzBool upper=FALSE)
 Generates an unicode representation of the long integer number with radix.
gzVoid gzULtoA (char *buffer, gzULongLong number, gzUByte radix, gzLong precision=0, gzLong *len=NULL, gzBool upper=FALSE)
 Generates an ascii representation of the long integer number with radix.
gzVoid gzULtoA (gzWideChar *buffer, gzULongLong number, gzUByte radix, gzLong precision=0, gzLong *len=NULL, gzBool upper=FALSE)
 Generates an unicode representation of the long integer number with radix.
gzVoid gzULtoIdent (char *buffer, gzULongLong number, gzLong precision=0, gzLong *len=NULL)
 Generates an ascii identifier representation of the unsigned long integer number.
gzVoid gzDtoA (char *buffer, gzDouble number, gzLong precision=6, gzLong *len=NULL)
 Generates an ascii representation of the double precision number.
gzVoid gzDtoA (gzWideChar *buffer, gzDouble number, gzLong precision=6, gzLong *len=NULL)
 Generates an unicode representation of the double precision number.
gzDouble gzFaculty (gzULong num)
 Calculated the faculty of a number.
gzDouble gzCombination (gzULong n, gzULong p)
 Calculated the combination C of two numbers.
gzDouble gzPow10 (gzShort power)
gzDouble gzPrecision (gzDouble number, gzULong digits, gzBool round=TRUE)
 Rounding of double to x digits precision.
gzULong gzUTF8ToULong (const char *adress, gzUByte *size=NULL)
 Encode UTF8 to ULong.
gzUByte gzULongToUTF8 (char *adress, gzULong data)
 Decode ULong to UTF8.
gzUByte gzUTF8Size (gzULong data)
 Return size of UTF8 encoding for data.
gzUByte gzUTF8Size (const char *adress)
 Return size of UTF8 encoding for adress.
gzInt gzGetLastSysError ()
gzVoid gzSetLastSysError (gzInt error=0)
gzString gzGetSysErrorDescription (gzInt error)
gzString gzYesNo (gzBool value)
 Returns YES/NO depending on value.
gzBool gzBigEndian ()
gzVoid gzBeep (gzBeepType beepType=GZ_BEEP_DEFAULT)
gzBool gzIsValidIpAddress (const gzString &ipAddress, gzUInt groups=4)
gzBool gzAttachConsole ()
gzString gzRegKeyExpandedString (const gzString &compressed)
 Expands to reg key xxx values in a new string.
gzArray< gzTranslationgetDefaultTranslations ()

Variables

const gzString GZ_EMPTY_STRING
 Default empty string to be used for empty string argument passing.
const gzUShort GZ_MAX_SYSTEM_UNIQUE_ID = 65535
 Max unique ID for gzString in system.
const gzUShort GZ_MAX_BASE_UNIQUE_ID = 500
 Max unique ID for gzString used by base software.
const gzString GZ_DEFAULT_KEY_HEADER = "software/Saab Training Systems/GizmoSDK"
 Default registry location prefix.


Detailed Description

Basic utilites like string and time management.

Gizmo3D provides platform independant functionality for string management, time and date management, directory and file management etc. These features can be used without using the Gizmo3D graphical api.

Definition in file gzBase.h.


Define Documentation

#define GZ_T_UNICODE  )     (const char *)(x)
 

Definition at line 62 of file gzBase.h.

#define GZ_T_UNICODE_LEN  )     (x)##.length()
 

Definition at line 63 of file gzBase.h.


Typedef Documentation

typedef WIN32_FIND_DATA gzDirEntry
 

Definition at line 52 of file gzBase.h.

typedef HANDLE gzDirHandle
 

Definition at line 51 of file gzBase.h.


Enumeration Type Documentation

enum gzBeepType
 

Possible values for gzBeep().

Enumerator:
GZ_BEEP_DEFAULT 
GZ_BEEP_ASTERISK 
GZ_BEEP_EXCLAMATION 
GZ_BEEP_HAND 
GZ_BEEP_QUESTION 
GZ_BEEP_OK 

Definition at line 445 of file gzBase.h.

enum gzRegKeyHeader
 

Possible root values for your registry entries.

Enumerator:
GZ_KEY_LOCAL_MACHINE 
GZ_KEY_CURRENT_USER 
GZ_KEY_CLASSES_ROOT 

Definition at line 563 of file gzBase.h.


Function Documentation

gzArray<gzTranslation> getDefaultTranslations  ) 
 

gzBool gzAttachConsole  ) 
 

gzVoid gzBeep gzBeepType  beepType = GZ_BEEP_DEFAULT  ) 
 

gzBool gzBigEndian  ) 
 

gzDouble gzCombination gzULong  n,
gzULong  p
 

Calculated the combination C of two numbers.

gzVoid gzDtoA gzWideChar buffer,
gzDouble  number,
gzLong  precision = 6,
gzLong len = NULL
 

Generates an unicode representation of the double precision number.

gzVoid gzDtoA char *  buffer,
gzDouble  number,
gzLong  precision = 6,
gzLong len = NULL
 

Generates an ascii representation of the double precision number.

gzDouble gzFaculty gzULong  num  ) 
 

Calculated the faculty of a number.

gzInt gzGetLastSysError  ) 
 

gzString gzGetSysErrorDescription gzInt  error  ) 
 

gzDouble gzGetUpperPowerOfTwo gzDouble  number  ) 
 

Gets value that is power of two and that is larger or equal to number.

gzLong gzGetUpperPowerOfTwoExponent gzDouble  number  ) 
 

Gets the exponent for the value that is a power of two.

gzBool gzIsPowerOfTwo gzDouble  number  ) 
 

Checks if value is power of two.

gzBool gzIsValidIpAddress const gzString ipAddress,
gzUInt  groups = 4
 

gzVoid gzLtoA gzWideChar buffer,
gzLongLong  number,
gzUByte  radix,
gzLong  precision = 0,
gzLong len = NULL,
gzBool  upper = FALSE
 

Generates an unicode representation of the long integer number with radix.

gzVoid gzLtoA char *  buffer,
gzLongLong  number,
gzUByte  radix,
gzLong  precision = 0,
gzLong len = NULL,
gzBool  upper = FALSE
 

Generates an ascii representation of the long integer number with radix.

gzDouble gzPow10 gzShort  power  ) 
 

gzDouble gzPrecision gzDouble  number,
gzULong  digits,
gzBool  round = TRUE
 

Rounding of double to x digits precision.

const gzDouble& gzRandom gzULong  seqIndex  ) 
 

Gives random double value between 0.0 and 1.0.

gzDouble gzRandom  ) 
 

Gives random double value between 0.0 and 1.0.

Examples:
billboard.cpp.

gzString gzRegKeyExpandedString const gzString compressed  ) 
 

Expands to reg key xxx values in a new string.

gzVoid gzSetLastSysError gzInt  error = 0  ) 
 

gzUByte gzULongToUTF8 char *  adress,
gzULong  data
 

Decode ULong to UTF8.

gzVoid gzULtoA gzWideChar buffer,
gzULongLong  number,
gzUByte  radix,
gzLong  precision = 0,
gzLong len = NULL,
gzBool  upper = FALSE
 

Generates an unicode representation of the long integer number with radix.

gzVoid gzULtoA char *  buffer,
gzULongLong  number,
gzUByte  radix,
gzLong  precision = 0,
gzLong len = NULL,
gzBool  upper = FALSE
 

Generates an ascii representation of the long integer number with radix.

gzVoid gzULtoIdent char *  buffer,
gzULongLong  number,
gzLong  precision = 0,
gzLong len = NULL
 

Generates an ascii identifier representation of the unsigned long integer number.

gzUByte gzUTF8Size const char *  adress  ) 
 

Return size of UTF8 encoding for adress.

gzUByte gzUTF8Size gzULong  data  ) 
 

Return size of UTF8 encoding for data.

gzULong gzUTF8ToULong const char *  adress,
gzUByte size = NULL
 

Encode UTF8 to ULong.

gzString gzYesNo gzBool  value  ) 
 

Returns YES/NO depending on value.


Variable Documentation

const gzString GZ_DEFAULT_KEY_HEADER = "software/Saab Training Systems/GizmoSDK"
 

Default registry location prefix.

Definition at line 571 of file gzBase.h.

const gzString GZ_EMPTY_STRING
 

Default empty string to be used for empty string argument passing.

Definition at line 426 of file gzBase.h.

const gzUShort GZ_MAX_BASE_UNIQUE_ID = 500
 

Max unique ID for gzString used by base software.

Definition at line 432 of file gzBase.h.

const gzUShort GZ_MAX_SYSTEM_UNIQUE_ID = 65535
 

Max unique ID for gzString in system.

Definition at line 429 of file gzBase.h.


Documentation for Gizmo3D generated at Wed Feb 20 11:54:13 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond