Irrlicht 3D Engine
irr::io Namespace Reference

This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ... More...

Classes

Typedefs

Enumerations

Functions


Detailed Description

This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...


Typedef Documentation

typedef xmlChar<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 388 of file irrXML.h.

typedef xmlChar<unsigned int> 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 393 of file irrXML.h.

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 401 of file irrXML.h.

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 409 of file irrXML.h.

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 417 of file irrXML.h.

An xml reader for wide characters, derived from IReferenceCounted.

This XML Parser can read any type of text files from any source Irrlicht can read. Just call IFileSystem::createXMLReader(). For more informations on how to use the parser, see IIrrXMLReader

Definition at line 19 of file IXMLReader.h.

An xml reader for ASCII or UTF-8 characters, derived from IReferenceCounted.

This XML Parser can read any type of text files from any source Irrlicht can read. Just call IFileSystem::createXMLReaderUTF8(). For more informations on how to use the parser, see IIrrXMLReader

Definition at line 25 of file IXMLReader.h.

Type used for all file system related strings.

This type will transparently handle different file system encodings.

Definition at line 17 of file path.h.


Enumeration Type Documentation

Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object.

Enumerator:
EARWF_FOR_FILE 

Serialization/Deserializion is done for an xml file.

EARWF_FOR_EDITOR 

Serialization/Deserializion is done for an editor property box.

EARWF_USE_RELATIVE_PATHS 

When writing filenames, relative paths should be used.

Definition at line 20 of file IAttributeExchangingObject.h.

Types of attributes available for IAttributes.

Enumerator:
EAT_INT 
EAT_FLOAT 
EAT_STRING 
EAT_BOOL 
EAT_ENUM 
EAT_COLOR 
EAT_COLORF 
EAT_VECTOR3D 
EAT_POSITION2D 
EAT_VECTOR2D 
EAT_RECT 
EAT_MATRIX 
EAT_QUATERNION 
EAT_BBOX 
EAT_PLANE 
EAT_TRIANGLE3D 
EAT_LINE2D 
EAT_LINE3D 
EAT_STRINGWARRAY 
EAT_FLOATARRAY 
EAT_INTARRAY 
EAT_BINARY 
EAT_TEXTURE 
EAT_USER_POINTER 
EAT_DIMENSION2D 
EAT_COUNT 
EAT_UNKNOWN 

Definition at line 14 of file EAttributes.h.

Contains the different types of archives.

Enumerator:
EFAT_ZIP 

A PKZIP archive.

EFAT_GZIP 

A gzip archive.

EFAT_FOLDER 

A virtual directory.

EFAT_PAK 

An ID Software PAK archive.

EFAT_NPK 

A Nebula Device archive.

EFAT_TAR 

A Tape ARchive.

EFAT_WAD 

A wad Archive, Quake2, Halflife.

EFAT_UNKNOWN 

The type of this archive is unknown.

Definition at line 25 of file IFileArchive.h.

FileSystemType: which Filesystem should be used for e.g. browsing.

Enumerator:
FILESYSTEM_NATIVE 
FILESYSTEM_VIRTUAL 

Definition at line 18 of file IFileArchive.h.

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.

Definition at line 158 of file irrXML.h.

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 

An xml element such as <foo>.

EXN_ELEMENT_END 

End of an xml element such as </foo>.

EXN_TEXT 

Text within an xml element: <foo> this is the text. </foo> Also text between 2 xml elements: </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 181 of file irrXML.h.


Function Documentation

IRRLICHT_API IrrXMLReader* IRRCALLCONV 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.
IRRLICHT_API IrrXMLReader* IRRCALLCONV 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.
IRRLICHT_API IrrXMLReader* IRRCALLCONV irr::io::createIrrXMLReader ( IFileReadCallBack *  callback,
bool  deleteCallback = false 
)

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.
deleteCallback,:if true, the callback will be deleted after the file has been read. Otherwise the caller si responsible for cleaning it up.
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.
IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV 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.
IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV 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.
IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV irr::io::createIrrXMLReaderUTF16 ( IFileReadCallBack *  callback,
bool  deleteCallback = false 
)

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.
deleteCallback,:if true, the callback will be deleted after the file has been read. Otherwise the caller si responsible for cleaning it up.
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.
IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV 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.
IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV 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.
IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV irr::io::createIrrXMLReaderUTF32 ( IFileReadCallBack *  callback,
bool  deleteCallback = false 
)

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.
deleteCallback,:if true, the callback will be deleted after the file has been read. Otherwise the caller si responsible for cleaning it up.
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.
IReadFile* irr::io::createLimitReadFile ( const io::path &  fileName,
IReadFile *  alreadyOpenedFile,
long  pos,
long  areaSize 
)

Internal function, please do not use.

IReadFile* irr::io::createMemoryReadFile ( void *  memory,
long  size,
const io::path &  fileName,
bool  deleteMemoryWhenDropped 
)

Internal function, please do not use.

IReadFile* irr::io::createReadFile ( const io::path &  fileName)

Internal function, please do not use.

IWriteFile* irr::io::createWriteFile ( const io::path &  fileName,
bool  append 
)

Internal function, please do not use.