The XFileParser reads a XFile either in text or binary form and builds a temporary data structure out of it.
More...
#include <XFileParser.h>
|
void | ParseHeader () |
|
void | ParseFile () |
|
void | ParseDataObjectTemplate () |
|
void | ParseDataObjectFrame (XFile::Node *pParent) |
|
void | ParseDataObjectTransformationMatrix (Matrix4 &pMatrix) |
|
void | ParseDataObjectMesh (XFile::Mesh *pMesh) |
|
void | ParseDataObjectMeshNormals (XFile::Mesh *pMesh) |
|
void | ParseDataObjectMeshTextureCoords (XFile::Mesh *pMesh) |
|
void | ParseDataObjectMeshVertexColors (XFile::Mesh *pMesh) |
|
void | ParseDataObjectMeshMaterialList (XFile::Mesh *pMesh) |
|
void | ParseDataObjectMaterial (XFile::Material *pMaterial) |
|
void | ParseDataObjectTextureFilename (std::string &pName) |
|
void | ParseDataObjectParaXHeader (ParaXHeaderDef &pName) |
|
bool | ParseUnknownDataObject () |
|
void | FindNextNoneWhiteSpace () |
| places pointer to next begin of a token, and ignores comments
|
|
std::string | GetNextToken () |
| returns next parseable token. Returns empty string if no token there
|
|
bool | IsEndOfFile () |
|
void | readHeadOfDataObject (std::string *poName=NULL) |
| reads header of dataobject including the opening brace. More...
|
|
void | CheckForClosingBrace () |
| checks for closing curly brace, throws exception if not there More...
|
|
void | CheckForSemicolon () |
| checks for one following semicolon, throws exception if not there More...
|
|
void | CheckForSeparator () |
| checks for a separator char, either a ',' or a ';'
|
|
void | TestForSeparator () |
| tests and possibly consumes a separator char, but does nothing if there was no separator
|
|
void | GetNextTokenAsString (std::string &poString) |
| reads a x file style string
|
|
void | ReadUntilEndOfLine () |
|
void | ReadToEndOfDataObject () |
|
uint16 | ReadBinWord () |
|
uint32 | ReadBinDWord () |
|
uint32 | ReadInt () |
|
float | ReadFloat () |
|
Vector2 | ReadVector2 () |
|
Vector3 | ReadVector3 () |
|
Vector3 | ReadRGB () |
|
LinearColor | ReadRGBA () |
|
void | ReadCharArray (char *sOutput, int nCount) |
|
void | ThrowException (const std::string &pText) |
| Throws an exception with a line number and the given text. More...
|
|
void | FilterHierarchy (XFile::Node *pNode) |
| Filters the imported hierarchy for some degenerated cases that some exporters produce. More...
|
|
The XFileParser reads a XFile either in text or binary form and builds a temporary data structure out of it.
§ XFileParser()
ParaEngine::XFileParser::XFileParser |
( |
const char * |
pBuffer, |
|
|
int32 |
nSize |
|
) |
| |
Constructor.
Creates a data structure out of the XFile given in the memory block.
- Parameters
-
pBuffer | Null-terminated memory buffer containing the XFile |
§ ~XFileParser()
ParaEngine::XFileParser::~XFileParser |
( |
| ) |
|
Destructor.
Destroys all imported data along with it
§ CheckForClosingBrace()
void XFileParser::CheckForClosingBrace |
( |
| ) |
|
|
protected |
checks for closing curly brace, throws exception if not there
checks for closing curly brace
§ CheckForSemicolon()
void XFileParser::CheckForSemicolon |
( |
| ) |
|
|
protected |
checks for one following semicolon, throws exception if not there
checks for one following semicolon
§ FilterHierarchy()
void XFileParser::FilterHierarchy |
( |
XFile::Node * |
pNode | ) |
|
|
protected |
Filters the imported hierarchy for some degenerated cases that some exporters produce.
- Parameters
-
pData | The sub-hierarchy to filter |
§ GetImportedData()
XFile::Scene * ParaEngine::XFileParser::GetImportedData |
( |
bool |
bGiveupDataOwnerhip = false | ) |
|
Returns the temporary representation of the imported data.
- Parameters
-
bGiveupDataOwnerhip | if true, the parse will given up buffer ownership. |
§ readHeadOfDataObject()
void XFileParser::readHeadOfDataObject |
( |
std::string * |
poName = NULL | ) |
|
|
protected |
reads header of dataobject including the opening brace.
returns false if error happened, and writes name of object if there is one
§ ThrowException()
void XFileParser::ThrowException |
( |
const std::string & |
pText | ) |
|
|
protected |
Throws an exception with a line number and the given text.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/ParaXModel/XFileParser.h
- Client/trunk/ParaEngineClient/ParaXModel/XFileParser.cpp