Assimp  v4.1. (December 2018)
irr::io Namespace Reference

Classes

class  CFileReadCallBack
 Implementation of the file read callback for ordinary files. More...
 
class  CXMLReaderImpl
 implementation of the IrrXMLReader More...
 
class  IFileReadCallBack
 Callback class for file read abstraction. More...
 
class  IIrrXMLReader
 Interface providing easy read access to a XML file. More...
 
class  IXMLBase
 Empty class to be used as parent class for IrrXMLReader. More...
 

Typedefs

typedef unsigned short char16
 defines the utf-16 type. More...
 
typedef unsigned long char32
 defines the utf-32 type. More...
 
typedef IIrrXMLReader< char, IXMLBaseIrrXMLReader
 A UTF-8 or ASCII character xml parser. More...
 
typedef IIrrXMLReader< char16, IXMLBaseIrrXMLReaderUTF16
 A UTF-16 xml parser. More...
 
typedef IIrrXMLReader< char32, IXMLBaseIrrXMLReaderUTF32
 A UTF-32 xml parser. More...
 

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 (const char *filename)
 Creates an instance of an UFT-8 or ASCII character xml parser. More...
 
IrrXMLReadercreateIrrXMLReader (FILE *file)
 Creates an instance of an UFT-8 or ASCII character xml parser. More...
 
IrrXMLReadercreateIrrXMLReader (IFileReadCallBack *callback)
 Creates an instance of an UFT-8 or ASCII character xml parser. More...
 
IrrXMLReaderUTF16createIrrXMLReaderUTF16 (const char *filename)
 Creates an instance of an UTF-16 xml parser. More...
 
IrrXMLReaderUTF16createIrrXMLReaderUTF16 (FILE *file)
 Creates an instance of an UTF-16 xml parser. More...
 
IrrXMLReaderUTF16createIrrXMLReaderUTF16 (IFileReadCallBack *callback)
 Creates an instance of an UTF-16 xml parser. More...
 
IrrXMLReaderUTF32createIrrXMLReaderUTF32 (const char *filename)
 Creates an instance of an UTF-32 xml parser. More...
 
IrrXMLReaderUTF32createIrrXMLReaderUTF32 (FILE *file)
 Creates an instance of an UTF-32 xml parser. More...
 
IrrXMLReaderUTF32createIrrXMLReaderUTF32 (IFileReadCallBack *callback)
 Creates an instance of an UTF-32 xml parser. More...
 

Typedef Documentation

◆ char16

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.

◆ char32

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.

◆ 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.

Examples
/build/assimp-gxbUXe/assimp-5.0.1~ds0/contrib/irrXML/irrXML.h.

◆ 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.

◆ 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.

Enumeration Type Documentation

◆ ETEXT_FORMAT

Enumeration of all supported source text file formats.

Enumerator
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.

◆ EXML_NODE

Enumeration for all xml nodes which are parsed by IrrXMLReader.

Enumerator
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.

Function Documentation

◆ createIrrXMLReader() [1/3]

IRRXML_API 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
filenameName 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.
Examples
/build/assimp-gxbUXe/assimp-5.0.1~ds0/contrib/irrXML/irrXML.h.

◆ createIrrXMLReader() [2/3]

IRRXML_API 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
filePointer 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.

◆ createIrrXMLReader() [3/3]

IRRXML_API 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
callbackCallback 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.

◆ createIrrXMLReaderUTF16() [1/3]

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

Creates an instance of an UTF-16 xml parser.

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
filenameName 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.

◆ createIrrXMLReaderUTF16() [2/3]

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

Creates an instance of an UTF-16 xml parser.

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
filePointer 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.

◆ createIrrXMLReaderUTF16() [3/3]

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

Creates an instance of an UTF-16 xml parser.

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
callbackCallback 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.

◆ createIrrXMLReaderUTF32() [1/3]

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

Creates an instance of an UTF-32 xml parser.

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
filenameName 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.

◆ createIrrXMLReaderUTF32() [2/3]

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

Creates an instance of an UTF-32 xml parser.

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
filePointer 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.

◆ createIrrXMLReaderUTF32() [3/3]

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

Creates an instance of an UTF-32 xml parser.

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
callbackCallback 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.