- Cal3D 0.11 API Reference -

Static Public Member Functions | Protected Member Functions | List of all members
CalPlatform Class Reference

The platform class. More...

#include <platform.h>

Static Public Member Functions

static bool readBytes (std::istream &input, void *pBuffer, int length)
 Reads a number of bytes.
 
static bool readFloat (std::istream &input, float &value)
 Reads a float.
 
static bool readShort (std::istream &input, short &value)
 Reads a short.
 
static bool readInteger (std::istream &input, int &value)
 Reads an integer.
 
static bool readString (std::istream &input, std::string &strValue)
 Reads a string.
 
static bool readBytes (char *input, void *pBuffer, int length)
 Reads a number of bytes.
 
static bool readFloat (char *input, float &value)
 Reads a float.
 
static bool readShort (char *input, short &value)
 Reads a short.
 
static bool readInteger (char *input, int &value)
 Reads an integer.
 
static bool readString (char *input, std::string &strValue)
 Reads a string.
 
static bool writeBytes (std::ostream &output, const void *pBuffer, int length)
 Writes a number of bytes.
 
static bool writeFloat (std::ostream &output, float value)
 Writes a float.
 
static bool writeShort (std::ostream &output, short value)
 Writes a short.
 
static bool writeInteger (std::ostream &output, int value)
 Writes an integer.
 
static bool writeString (std::ostream &output, const std::string &strValue)
 Writes a string.
 

Protected Member Functions

 CalPlatform ()
 Constructs the platform instance.
 
virtual ~CalPlatform ()
 Destructs the platform instance.
 

Detailed Description

The platform class.

Constructor & Destructor Documentation

◆ CalPlatform()

CalPlatform::CalPlatform ( )
protected

Constructs the platform instance.

This function is the default constructor of the platform instance.

◆ ~CalPlatform()

CalPlatform::~CalPlatform ( )
protectedvirtual

Destructs the platform instance.

This function is the destructor of the platform instance.

Member Function Documentation

◆ readBytes() [1/2]

bool CalPlatform::readBytes ( char * input,
void * pBuffer,
int length )
static

Reads a number of bytes.

This function reads a given number of bytes from a memory buffer.

Parameters
inputThe buffer to read the bytes from.
pBufferA pointer to the buffer where the bytes are stored into.
lengthThe number of bytes that should be read.
Returns
One of the following values:
  • true if successful
  • false if the input or destination buffer is NULL

◆ readBytes() [2/2]

bool CalPlatform::readBytes ( std::istream & input,
void * pBuffer,
int length )
static

Reads a number of bytes.

This function reads a given number of bytes from an input stream.

Parameters
inputThe stream to read the bytes from.
pBufferA pointer to the buffer where the bytes are stored into.
lengthThe number of bytes that should be read.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ readFloat() [1/2]

bool CalPlatform::readFloat ( char * input,
float & value )
static

Reads a float.

This function reads a float from a memory buffer.

Parameters
inputThe buffer to read the float from.
valueA reference to the float into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if the input buffer is NULL

◆ readFloat() [2/2]

bool CalPlatform::readFloat ( std::istream & input,
float & value )
static

Reads a float.

This function reads a float from an input stream.

Parameters
inputThe input stream to read the float from.
valueA reference to the float into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ readInteger() [1/2]

bool CalPlatform::readInteger ( char * input,
int & value )
static

Reads an integer.

This function reads an integer from a memory buffer.

Parameters
inputThe buffer to read the integer from.
valueA reference to the integer into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if the input buffer is NULL

◆ readInteger() [2/2]

bool CalPlatform::readInteger ( std::istream & input,
int & value )
static

Reads an integer.

This function reads an integer from an input stream.

Parameters
inputThe input stream to read the integer from.
valueA reference to the integer into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ readShort() [1/2]

bool CalPlatform::readShort ( char * input,
short & value )
static

Reads a short.

This function reads a short from a memory buffer.

Parameters
inputThe buffer to read the short from.
valueA reference to the short into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if the input buffer is NULL

◆ readShort() [2/2]

bool CalPlatform::readShort ( std::istream & input,
short & value )
static

Reads a short.

This function reads a short from an input stream.

Parameters
inputThe input stream to read the short from.
valueA reference to the short into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ readString() [1/2]

bool CalPlatform::readString ( char * input,
std::string & strValue )
static

Reads a string.

This function reads a string from a memory buffer.

Parameters
inputThe buffer to read the string from.
valueA reference to the string into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if the input buffer is NULL

◆ readString() [2/2]

bool CalPlatform::readString ( std::istream & input,
std::string & strValue )
static

Reads a string.

This function reads a string from an input stream.

Parameters
inputThe input stream to read the string from.
valueA reference to the string into which the data is read.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ writeBytes()

bool CalPlatform::writeBytes ( std::ostream & output,
const void * pBuffer,
int length )
static

Writes a number of bytes.

This function writes a given number of bytes to an output stream.

Parameters
outputThe output stream to write the bytes to.
pBufferA pointer to the byte buffer that should be written.
lengthThe number of bytes that should be written.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ writeFloat()

bool CalPlatform::writeFloat ( std::ostream & output,
float value )
static

Writes a float.

This function writes a float to an output stream.

Parameters
outputThe output stream to write the float to.
valueThe float that should be written..
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ writeInteger()

bool CalPlatform::writeInteger ( std::ostream & output,
int value )
static

Writes an integer.

This function writes an integer to an output stream.

Parameters
fileThe output stream to write the integer to.
valueThe integer that should be written.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ writeShort()

bool CalPlatform::writeShort ( std::ostream & output,
short value )
static

Writes a short.

This function writes a short to an output stream.

Parameters
fileThe output stream to write the short to.
valueThe short that should be written.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ writeString()

bool CalPlatform::writeString ( std::ostream & output,
const std::string & strValue )
static

Writes a string.

This function writes a string to an output stream.

Parameters
fileThe output stream to write the string to.
valueA reference to the string that should be written.
Returns
One of the following values:
  • true if successful
  • false if an error happened

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

Generated by The Cal3D Team with Doxygen 1.10.0