Wm4::System Class Reference

#include <Wm4System.h>

List of all members.

Public Types

enum  { SM_READ, SM_WRITE, SM_READ_WRITE }

Static Public Member Functions

static bool Append (const char *acFilename, char *acBuffer, int iSize)
static void EndianCopy (int iSize, int iQuantity, const void *pvSrc, void *pvDst)
static void EndianCopy (int iSize, const void *pvSrc, void *pvDst)
static int Fclose (FILE *pkFile)
static FILE * Fopen (const char *acFilename, const char *acMode)
static int Fprintf (FILE *pkFile, const char *acFormat,...)
static const char * GetDirectory (int i)
static int GetDirectoryQuantity ()
static const char * GetEnv (const char *acEnvVarName)
static const char * GetPath (const char *acFilename, int eMode)
static const char * GetPath (const char *acDirectory, const char *acFilename)
static double GetTime ()
static void Initialize ()
static bool InsertDirectory (const char *acDirectory)
static bool IsBigEndian ()
static bool Load (const char *acFilename, char *&racBuffer, int &riSize)
static unsigned int MakeRGB (unsigned char ucR, unsigned char ucG, unsigned char ucB)
static unsigned int MakeRGBA (unsigned char ucR, unsigned char ucG, unsigned char ucB, unsigned char ucA)
static void * Memcpy (void *pvDst, size_t uiDstSize, const void *pvSrc, size_t uiSrcSize)
static int Read1 (FILE *pkFile, int iQuantity, void *pvData)
static int Read1 (const char *acBuffer, int iQuantity, void *pvData)
static int Read2be (FILE *pkFile, int iQuantity, void *pvData)
static int Read2be (const char *acBuffer, int iQuantity, void *pvData)
static int Read2le (FILE *pkFile, int iQuantity, void *pvData)
static int Read2le (const char *acBuffer, int iQuantity, void *pvData)
static int Read4be (FILE *pkFile, int iQuantity, void *pvData)
static int Read4be (const char *acBuffer, int iQuantity, void *pvData)
static int Read4le (FILE *pkFile, int iQuantity, void *pvData)
static int Read4le (const char *acBuffer, int iQuantity, void *pvData)
static int Read8be (FILE *pkFile, int iQuantity, void *pvData)
static int Read8be (const char *acBuffer, int iQuantity, void *pvData)
static int Read8le (FILE *pkFile, int iQuantity, void *pvData)
static int Read8le (const char *acBuffer, int iQuantity, void *pvData)
static void RemoveAllDirectories ()
static bool RemoveDirectory (const char *acDirectory)
static bool Save (const char *acFilename, const char *acBuffer, int iSize)
static int Sprintf (char *acDst, size_t uiDstSize, const char *acFormat,...)
static char * Strcat (char *acDst, size_t uiDstSize, const char *acSrc)
static char * Strcpy (char *acDst, size_t uiDstSize, const char *acSrc)
static char * Strncpy (char *acDst, size_t uiDstSize, const char *acSrc, size_t uiSrcSize)
static char * Strtok (char *acToken, const char *acDelimiters, char *&racNextToken)
static void SwapBytes (int iSize, int iQuantity, void *pvValue)
static void SwapBytes (int iSize, void *pvValue)
static void Terminate ()
static int Write1 (FILE *pkFile, int iQuantity, const void *pvData)
static int Write1 (char *acBuffer, int iQuantity, const void *pvData)
static int Write2be (FILE *pkFile, int iQuantity, const void *pvData)
static int Write2be (char *acBuffer, int iQuantity, const void *pvData)
static int Write2le (FILE *pkFile, int iQuantity, const void *pvData)
static int Write2le (char *acBuffer, int iQuantity, const void *pvData)
static int Write4be (FILE *pkFile, int iQuantity, const void *pvData)
static int Write4be (char *acBuffer, int iQuantity, const void *pvData)
static int Write4le (FILE *pkFile, int iQuantity, const void *pvData)
static int Write4le (char *acBuffer, int iQuantity, const void *pvData)
static int Write8be (FILE *pkFile, int iQuantity, const void *pvData)
static int Write8be (char *acBuffer, int iQuantity, const void *pvData)
static int Write8le (FILE *pkFile, int iQuantity, const void *pvData)
static int Write8le (char *acBuffer, int iQuantity, const void *pvData)

Static Public Attributes

static char WM4_PATH [SYSTEM_MAX_ENVVAR]

Detailed Description

Definition at line 55 of file Wm4System.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
SM_READ 
SM_WRITE 
SM_READ_WRITE 

Definition at line 145 of file Wm4System.h.


Member Function Documentation

bool System::Append ( const char *  acFilename,
char *  acBuffer,
int  iSize 
) [static]

Definition at line 207 of file Wm4System.cpp.

References Fclose(), Fopen(), and Py::int.

void System::EndianCopy ( int  iSize,
int  iQuantity,
const void *  pvSrc,
void *  pvDst 
) [static]

Definition at line 94 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

void System::EndianCopy ( int  iSize,
const void *  pvSrc,
void *  pvDst 
) [static]

Definition at line 85 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Fclose ( FILE *  pkFile  )  [static]
FILE * System::Fopen ( const char *  acFilename,
const char *  acMode 
) [static]
int System::Fprintf ( FILE *  pkFile,
const char *  acFormat,
  ... 
) [static]

Definition at line 804 of file Wm4System.cpp.

const char * System::GetDirectory ( int  i  )  [static]

Definition at line 664 of file Wm4System.cpp.

References Initialize().

int System::GetDirectoryQuantity (  )  [static]

Definition at line 654 of file Wm4System.cpp.

References Initialize().

const char * System::GetEnv ( const char *  acEnvVarName  )  [static]

Definition at line 829 of file Wm4System.cpp.

References Strcpy().

Referenced by Initialize().

const char * System::GetPath ( const char *  acFilename,
int  eMode 
) [static]

Definition at line 727 of file Wm4System.cpp.

References Fclose(), Fopen(), GetPath(), Initialize(), Py::int, SM_READ, and SM_WRITE.

const char * System::GetPath ( const char *  acDirectory,
const char *  acFilename 
) [static]

Definition at line 569 of file Wm4System.cpp.

References Strcat(), and Strcpy().

Referenced by GetPath().

double System::GetTime (  )  [static]
void System::Initialize (  )  [static]
bool System::InsertDirectory ( const char *  acDirectory  )  [static]

Definition at line 678 of file Wm4System.cpp.

References Initialize(), and Py::int.

bool System::IsBigEndian (  )  [static]

Definition at line 78 of file Wm4System.cpp.

bool System::Load ( const char *  acFilename,
char *&  racBuffer,
int &  riSize 
) [static]

Definition at line 146 of file Wm4System.cpp.

References Fclose(), Fopen(), Py::int, WM4_DELETE, and WM4_NEW.

unsigned int System::MakeRGB ( unsigned char  ucR,
unsigned char  ucG,
unsigned char  ucB 
) [static]

Definition at line 766 of file Wm4System.cpp.

unsigned int System::MakeRGBA ( unsigned char  ucR,
unsigned char  ucG,
unsigned char  ucB,
unsigned char  ucA 
) [static]

Definition at line 776 of file Wm4System.cpp.

void * System::Memcpy ( void *  pvDst,
size_t  uiDstSize,
const void *  pvSrc,
size_t  uiSrcSize 
) [static]
int System::Read1 ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 249 of file Wm4System.cpp.

int System::Read1 ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 233 of file Wm4System.cpp.

References Memcpy().

int System::Read2be ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 488 of file Wm4System.cpp.

References SwapBytes().

int System::Read2be ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 416 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Read2le ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 335 of file Wm4System.cpp.

References SwapBytes().

int System::Read2le ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 263 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Read4be ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 498 of file Wm4System.cpp.

References SwapBytes().

int System::Read4be ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 428 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Read4le ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 345 of file Wm4System.cpp.

References SwapBytes().

int System::Read4le ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]
int System::Read8be ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 508 of file Wm4System.cpp.

References SwapBytes().

int System::Read8be ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 440 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Read8le ( FILE *  pkFile,
int  iQuantity,
void *  pvData 
) [static]

Definition at line 355 of file Wm4System.cpp.

References SwapBytes().

int System::Read8le ( const char *  acBuffer,
int  iQuantity,
void *  pvData 
) [static]
void System::RemoveAllDirectories (  )  [static]

Definition at line 717 of file Wm4System.cpp.

References Initialize().

bool System::RemoveDirectory ( const char *  acDirectory  )  [static]

Definition at line 697 of file Wm4System.cpp.

References Initialize().

bool System::Save ( const char *  acFilename,
const char *  acBuffer,
int  iSize 
) [static]

Definition at line 181 of file Wm4System.cpp.

References Fclose(), Fopen(), and Py::int.

int System::Sprintf ( char *  acDst,
size_t  uiDstSize,
const char *  acFormat,
  ... 
) [static]

Definition at line 882 of file Wm4System.cpp.

char * System::Strcat ( char *  acDst,
size_t  uiDstSize,
const char *  acSrc 
) [static]

Definition at line 935 of file Wm4System.cpp.

Referenced by GetPath().

char * System::Strcpy ( char *  acDst,
size_t  uiDstSize,
const char *  acSrc 
) [static]

Definition at line 902 of file Wm4System.cpp.

Referenced by GetEnv(), GetPath(), and Initialize().

char * System::Strncpy ( char *  acDst,
size_t  uiDstSize,
const char *  acSrc,
size_t  uiSrcSize 
) [static]

Definition at line 970 of file Wm4System.cpp.

char * System::Strtok ( char *  acToken,
const char *  acDelimiters,
char *&  racNextToken 
) [static]

Definition at line 1002 of file Wm4System.cpp.

void System::SwapBytes ( int  iSize,
int  iQuantity,
void *  pvValue 
) [static]

Definition at line 61 of file Wm4System.cpp.

void System::SwapBytes ( int  iSize,
void *  pvValue 
) [static]
void System::Terminate (  )  [static]

Definition at line 648 of file Wm4System.cpp.

References WM4_DELETE.

int System::Write1 ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 256 of file Wm4System.cpp.

int System::Write1 ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 241 of file Wm4System.cpp.

References Memcpy().

int System::Write2be ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 518 of file Wm4System.cpp.

References SwapBytes().

int System::Write2be ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 452 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Write2le ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 365 of file Wm4System.cpp.

References SwapBytes().

int System::Write2le ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 299 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Write4be ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 535 of file Wm4System.cpp.

References SwapBytes().

int System::Write4be ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 464 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Write4le ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 382 of file Wm4System.cpp.

References SwapBytes().

int System::Write4le ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]
int System::Write8be ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 552 of file Wm4System.cpp.

References SwapBytes().

int System::Write8be ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 476 of file Wm4System.cpp.

References Memcpy(), and SwapBytes().

int System::Write8le ( FILE *  pkFile,
int  iQuantity,
const void *  pvData 
) [static]

Definition at line 399 of file Wm4System.cpp.

References SwapBytes().

int System::Write8le ( char *  acBuffer,
int  iQuantity,
const void *  pvData 
) [static]

Member Data Documentation

char System::WM4_PATH [static]

Definition at line 186 of file Wm4System.h.

Referenced by Initialize().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:50 2011 for FreeCAD by  doxygen 1.6.1