- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

CalPlatform Class Reference

The platform class. More...

#include <platform.h>

List of all members.

Static Public Methods

bool readBytes (std::istream &input, void *pBuffer, int length)
 Reads a number of bytes. More...

bool readFloat (std::istream &input, float &value)
 Reads a float. More...

bool readInteger (std::istream &input, int &value)
 Reads an integer. More...

bool readString (std::istream &input, std::string &strValue)
 Reads a string. More...

bool readBytes (char *input, void *pBuffer, int length)
 Reads a number of bytes. More...

bool readFloat (char *input, float &value)
 Reads a float. More...

bool readInteger (char *input, int &value)
 Reads an integer. More...

bool readString (char *input, std::string &strValue)
 Reads a string. More...

bool writeBytes (std::ostream &output, const void *pBuffer, int length)
 Writes a number of bytes. More...

bool writeFloat (std::ostream &output, float value)
 Writes a float. More...

bool writeInteger (std::ostream &output, int value)
 Writes an integer. More...

bool writeString (std::ostream &output, const std::string &strValue)
 Writes a string. More...


Protected Methods

 CalPlatform ()
 Constructs the platform instance. More...

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


Detailed Description

The platform class.


Constructor & Destructor Documentation

CalPlatform::CalPlatform   [protected]
 

Constructs the platform instance.

This function is the default constructor of the platform instance.

CalPlatform::~CalPlatform   [protected, virtual]
 

Destructs the platform instance.

This function is the destructor of the platform instance.


Member Function Documentation

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:
input  The buffer to read the bytes from.
pBuffer  A pointer to the buffer where the bytes are stored into.
length  The 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

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:
input  The stream to read the bytes from.
pBuffer  A pointer to the buffer where the bytes are stored into.
length  The number of bytes that should be read.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalPlatform::readFloat char *    input,
float &    value
[static]
 

Reads a float.

This function reads a float from a memory buffer.

Parameters:
input  The buffer to read the float from.
value  A 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

bool CalPlatform::readFloat std::istream &    input,
float &    value
[static]
 

Reads a float.

This function reads a float from an input stream.

Parameters:
input  The input stream to read the float from.
value  A reference to the float into which the data is read.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalPlatform::readInteger char *    input,
int &    value
[static]
 

Reads an integer.

This function reads an integer from a memory buffer.

Parameters:
input  The buffer to read the integer from.
value  A 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

bool CalPlatform::readInteger std::istream &    input,
int &    value
[static]
 

Reads an integer.

This function reads an integer from an input stream.

Parameters:
input  The input stream to read the integer from.
value  A reference to the integer into which the data is read.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalPlatform::readString char *    input,
std::string &    strValue
[static]
 

Reads a string.

This function reads a string from a memory buffer.

Parameters:
input  The buffer to read the string from.
value  A 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

bool CalPlatform::readString std::istream &    input,
std::string &    strValue
[static]
 

Reads a string.

This function reads a string from an input stream.

Parameters:
input  The input stream to read the string from.
value  A reference to the string into which the data is read.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

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:
output  The output stream to write the bytes to.
pBuffer  A pointer to the byte buffer that should be written.
length  The number of bytes that should be written.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalPlatform::writeFloat std::ostream &    output,
float    value
[static]
 

Writes a float.

This function writes a float to an output stream.

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

bool CalPlatform::writeInteger std::ostream &    output,
int    value
[static]
 

Writes an integer.

This function writes an integer to an output stream.

Parameters:
file  The output stream to write the integer to.
value  The integer that should be written.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalPlatform::writeString std::ostream &    output,
const std::string &    strValue
[static]
 

Writes a string.

This function writes a string to an output stream.

Parameters:
file  The output stream to write the string to.
value  A reference to the string that should be written.
Returns:
One of the following values:
  • true if successful
  • false if an error happend


The documentation for this class was generated from the following files:
Generated at Sun Oct 12 18:38:50 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch