Home | Class list | Files | Namespace Members | Class members | File members

irrXML.h File Reference

Header file of the irrXML, the Irrlicht XML parser. More...

#include <stdio.h>

Go to the source code of this file.

Namespaces

namespace  irr
namespace  irr::io

Typedefs

typedef unsigned short char16
 defines the utf-16 type.
typedef unsigned long char32
 defines the utf-32 type.
typedef IIrrXMLReader< char,
IXMLBase > 
IrrXMLReader
 A UTF-8 or ASCII character xml parser.
typedef IIrrXMLReader< char16,
IXMLBase > 
IrrXMLReaderUTF16
 A UTF-16 xml parser.
typedef IIrrXMLReader< char32,
IXMLBase > 
IrrXMLReaderUTF32
 A UTF-32 xml parser.

Enumerations

enum  ETEXT_FORMAT {
  ETF_ASCII, ETF_UTF8, ETF_UTF16_BE, ETF_UTF16_LE,
  ETF_UTF32_BE, ETF_UTF32_LE
}
 Enumeration of all supported source text file formats. More...
enum  EXML_NODE {
  EXN_NONE, EXN_ELEMENT, EXN_ELEMENT_END, EXN_TEXT,
  EXN_COMMENT, EXN_CDATA, EXN_UNKNOWN
}
 Enumeration for all xml nodes which are parsed by IrrXMLReader. More...

Functions

IrrXMLReadercreateIrrXMLReader (IFileReadCallBack *callback)
 Creates an instance of an UFT-8 or ASCII character xml parser.
IrrXMLReadercreateIrrXMLReader (FILE *file)
 Creates an instance of an UFT-8 or ASCII character xml parser.
IrrXMLReadercreateIrrXMLReader (const char *filename)
 Creates an instance of an UFT-8 or ASCII character xml parser.
IrrXMLReaderUTF16createIrrXMLReaderUTF16 (IFileReadCallBack *callback)
 Creates an instance of an UFT-16 xml parser.
IrrXMLReaderUTF16createIrrXMLReaderUTF16 (FILE *file)
 Creates an instance of an UFT-16 xml parser.
IrrXMLReaderUTF16createIrrXMLReaderUTF16 (const char *filename)
 Creates an instance of an UFT-16 xml parser.
IrrXMLReaderUTF32createIrrXMLReaderUTF32 (IFileReadCallBack *callback)
 Creates an instance of an UFT-32 xml parser.
IrrXMLReaderUTF32createIrrXMLReaderUTF32 (FILE *file)
 Creates an instance of an UFT-32 xml parser.
IrrXMLReaderUTF32createIrrXMLReaderUTF32 (const char *filename)
 Creates an instance of an UFT-32 xml parser.


Detailed Description

Header file of the irrXML, the Irrlicht XML parser.

This file includes everything needed for using irrXML, the XML parser of the Irrlicht Engine. To use irrXML, you only need to include this file in your project:

        #include <irrXML.h>

It is also common to use the two namespaces in which irrXML is included, directly after #including irrXML.h:

        #include <irrXML.h>
        using namespace irr;
        using namespace io;

Definition in file irrXML.h.


Typedef Documentation

typedef unsigned short irr::io::char16
 

defines the utf-16 type.

Not using wchar_t for this because wchar_t has 16 bit on windows and 32 bit on other operating systems.

Definition at line 371 of file irrXML.h.

typedef unsigned long irr::io::char32
 

defines the utf-32 type.

Not using wchar_t for this because wchar_t has 16 bit on windows and 32 bit on other operating systems.

Definition at line 376 of file irrXML.h.

typedef IIrrXMLReader<char, IXMLBase> irr::io::IrrXMLReader
 

A UTF-8 or ASCII character xml parser.

This means that all character data will be returned in 8 bit ASCII or UTF-8 by this parser. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. Create an instance of this with createIrrXMLReader(); See IIrrXMLReader for description on how to use it.

Definition at line 384 of file irrXML.h.

typedef IIrrXMLReader<char16, IXMLBase> irr::io::IrrXMLReaderUTF16
 

A UTF-16 xml parser.

This means that all character data will be returned in UTF-16 by this parser. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. Create an instance of this with createIrrXMLReaderUTF16(); See IIrrXMLReader for description on how to use it.

Definition at line 392 of file irrXML.h.

typedef IIrrXMLReader<char32, IXMLBase> irr::io::IrrXMLReaderUTF32
 

A UTF-32 xml parser.

This means that all character data will be returned in UTF-32 by this parser. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. Create an instance of this with createIrrXMLReaderUTF32(); See IIrrXMLReader for description on how to use it.

Definition at line 400 of file irrXML.h.


Enumeration Type Documentation

enum irr::io::ETEXT_FORMAT
 

Enumeration of all supported source text file formats.

Enumeration values:
ETF_ASCII  ASCII, file without byte order mark, or not a text file.
ETF_UTF8  UTF-8 format.
ETF_UTF16_BE  UTF-16 format, big endian.
ETF_UTF16_LE  UTF-16 format, little endian.
ETF_UTF32_BE  UTF-32 format, big endian.
ETF_UTF32_LE  UTF-32 format, little endian.

Definition at line 157 of file irrXML.h.

enum irr::io::EXML_NODE
 

Enumeration for all xml nodes which are parsed by IrrXMLReader.

Enumeration values:
EXN_NONE  No xml node. This is usually the node if you did not read anything yet.
EXN_ELEMENT  A xml element, like <foo>.
EXN_ELEMENT_END  End of an xml element, like </foo>.
EXN_TEXT  Text within a xml element: <foo> this is the text. </foo>.
EXN_COMMENT  An xml comment like <!-- I am a comment --> or a DTD definition.
EXN_CDATA  An xml cdata section like <![CDATA[ this is some CDATA ]]>.
EXN_UNKNOWN  Unknown element.

Definition at line 180 of file irrXML.h.


Function Documentation

IrrXMLReader* irr::io::createIrrXMLReader IFileReadCallBack *  callback  ) 
 

Creates an instance of an UFT-8 or ASCII character xml parser.

This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.

Parameters:
callback,: Callback for file read abstraction. Implement your own callback to make the xml parser read in other things than just files. See IFileReadCallBack for more information about this.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReader* irr::io::createIrrXMLReader FILE *  file  ) 
 

Creates an instance of an UFT-8 or ASCII character xml parser.

This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.

Parameters:
file,: Pointer to opened file, must have been opened in binary mode, e.g. using fopen("foo.bar", "wb"); The file will not be closed after it has been read.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReader* irr::io::createIrrXMLReader const char *  filename  ) 
 

Creates an instance of an UFT-8 or ASCII character xml parser.

This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.

Parameters:
filename,: Name of file to be opened.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReaderUTF16* irr::io::createIrrXMLReaderUTF16 IFileReadCallBack *  callback  ) 
 

Creates an instance of an UFT-16 xml parser.

This means that all character data will be returned in UTF-16. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

Parameters:
callback,: Callback for file read abstraction. Implement your own callback to make the xml parser read in other things than just files. See IFileReadCallBack for more information about this.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReaderUTF16* irr::io::createIrrXMLReaderUTF16 FILE *  file  ) 
 

Creates an instance of an UFT-16 xml parser.

This means that all character data will be returned in UTF-16. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

Parameters:
file,: Pointer to opened file, must have been opened in binary mode, e.g. using fopen("foo.bar", "wb"); The file will not be closed after it has been read.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReaderUTF16* irr::io::createIrrXMLReaderUTF16 const char *  filename  ) 
 

Creates an instance of an UFT-16 xml parser.

This means that all character data will be returned in UTF-16. The file to read can be in any format, it will be converted to UTF-16 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

Parameters:
filename,: Name of file to be opened.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReaderUTF32* irr::io::createIrrXMLReaderUTF32 IFileReadCallBack *  callback  ) 
 

Creates an instance of an UFT-32 xml parser.

This means that all character data will be returned in UTF-32. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

Parameters:
callback,: Callback for file read abstraction. Implement your own callback to make the xml parser read in other things than just files. See IFileReadCallBack for more information about this.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReaderUTF32* irr::io::createIrrXMLReaderUTF32 FILE *  file  ) 
 

Creates an instance of an UFT-32 xml parser.

This means that all character data will be returned in UTF-32. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. if you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

Parameters:
file,: Pointer to opened file, must have been opened in binary mode, e.g. using fopen("foo.bar", "wb"); The file will not be closed after it has been read.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.

IrrXMLReaderUTF32* irr::io::createIrrXMLReaderUTF32 const char *  filename  ) 
 

Creates an instance of an UFT-32 xml parser.

This means that all character data will be returned in UTF-32. The file to read can be in any format, it will be converted to UTF-32 if it is not in this format. If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReader() instead.

Parameters:
filename,: Name of file to be opened.
Returns:
Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened.


irrXML
The irrXML Documentation © 2003-2005 by Nikolaus Gebhardt. Generated on Sat Nov 12 17:28:48 2005 by Doxygen (1.4.2)