Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
jpp::io Namespace Reference

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

Classes

class  IArchiveLoader
 Class which is able to create an archive from a file. More...
 
class  IAttributeExchangingObject
 An object which is able to serialize and deserialize its attributes into an attributes object. More...
 
class  IAttributes
 Provides a generic interface for attributes and their values and the possibility to serialize them. More...
 
class  IFileArchive
 The FileArchive manages archives and provides access to files inside them. More...
 
class  IFileList
 Provides a list of files and folders. More...
 
class  IFileReadCallBack
 Callback class for file read abstraction. More...
 
class  IFileSystem
 The FileSystem manages files and archives and provides access to them. More...
 
class  IIrrXMLReader
 Interface providing easy read access to a XML file. More...
 
class  IIrrXMLWriter
 Interface providing methods for making it easier to write XML files. More...
 
class  IMemoryReadFile
 Interface providing read access to a memory read file. More...
 
class  IReadFile
 Interface providing read access to a file. More...
 
class  IWriteFile
 Interface providing write access to a file. More...
 
class  IXMLBase
 Empty class to be used as parent class for IrrXMLReader. More...
 
class  SAttributeReadWriteOptions
 class holding data describing options More...
 
class  SNamedPath
 Used in places where we identify objects by a filename, but don't actually work with the real filename. More...
 
class  xmlChar
 

Typedefs

using path = core::string< fschar_t >
 Type used for all file system related strings.
 
using char16 = xmlChar< unsigned short >
 defines the utf-16 type.
 
using char32 = xmlChar< unsigned int >
 defines the utf-32 type.
 
using IrrXMLReader = IIrrXMLReader< char, IXMLBase >
 A UTF-8 or ASCII character xml parser.
 
using IrrXMLReaderUTF16 = IIrrXMLReader< char16, IXMLBase >
 A UTF-16 xml parser.
 
using IrrXMLReaderUTF32 = IIrrXMLReader< char32, IXMLBase >
 A UTF-32 xml parser.
 
using IXMLWriter = IIrrXMLWriter< wchar_t, IReferenceCounted >
 An xml writer for wide characters, derived from IReferenceCounted.
 
using IXMLWriterUTF8 = IIrrXMLWriter< c8, IReferenceCounted >
 An xml writer for ASCII or UTF-8 characters, derived from IReferenceCounted.
 
using IXMLReader = IIrrXMLReader< wchar_t, IReferenceCounted >
 An xml reader for wide characters, derived from IReferenceCounted.
 
using IXMLReaderUTF8 = IIrrXMLReader< c8, IReferenceCounted >
 An xml reader for ASCII or UTF-8 characters, derived from IReferenceCounted.
 

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...
 
enum  EFileSystemType { FILESYSTEM_NATIVE = 0 , FILESYSTEM_VIRTUAL }
 FileSystemType: which filesystem should be used for e.g. browsing.
 
enum  E_FILE_ARCHIVE_TYPE {
  EFAT_ZIP = MAKE_JPP_ID('Z','I','P', 0) , EFAT_GZIP = MAKE_JPP_ID('g','z','i','p') , EFAT_FOLDER = MAKE_JPP_ID('f','l','d','r') , EFAT_PAK = MAKE_JPP_ID('P','A','K', 0) ,
  EFAT_NPK = MAKE_JPP_ID('N','P','K', 0) , EFAT_TAR = MAKE_JPP_ID('T','A','R', 0) , EFAT_WAD = MAKE_JPP_ID('W','A','D', 0) , EFAT_UNKNOWN = MAKE_JPP_ID('u','n','k','n')
}
 Contains the different types of archives. More...
 
enum  E_ATTRIBUTE_READ_WRITE_FLAGS { EARWF_FOR_FILE = 0x00000001 , EARWF_FOR_EDITOR = 0x00000002 , EARWF_USE_RELATIVE_PATHS = 0x00000004 }
 Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object. More...
 
enum  EREAD_FILE_TYPE { ERFT_READ_FILE = MAKE_JPP_ID('r','e','a','d') , ERFT_MEMORY_READ_FILE = MAKE_JPP_ID('r','m','e','m') , ERFT_LIMIT_READ_FILE = MAKE_JPP_ID('r','l','i','m') , EFIT_UNKNOWN = MAKE_JPP_ID('u','n','k','n') }
 An enumeration for different class types implementing IReadFile. More...
 
enum  E_ATTRIBUTE_TYPE {
  EAT_INT = 0 , 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
}
 Types of attributes available for IAttributes.
 

Functions

IReadFilecreateLimitReadFile (const io::path &fileName, IReadFile *alreadyOpenedFile, long pos, long areaSize)
 Internal function, please do not use.
 

Detailed Description

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

Typedef Documentation

◆ char16

using jpp::io::char16 = typedef xmlChar<unsigned short>

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

using jpp::io::char32 = typedef xmlChar<unsigned int>

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.

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

◆ IXMLReader

An xml reader for wide characters, derived from IReferenceCounted.

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

◆ IXMLReaderUTF8

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 Jimcpp can read. Just call IFileSystem::createXMLReaderUTF8(). For more information on how to use the parser, see IIrrXMLReader

◆ IXMLWriter

An xml writer for wide characters, derived from IReferenceCounted.

Call IFileSystem::createXMLReader(). to create an IXMLWriter

◆ IXMLWriterUTF8

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

Call IFileSystem::createXMLReaderUtf8(). to create an IXMLWriter

◆ path

Type used for all file system related strings.

This type will transparently handle different file system encodings. NOTE: For historical reasons the tool-functions using io::path are all in coreutil.h

Enumeration Type Documentation

◆ E_ATTRIBUTE_READ_WRITE_FLAGS

Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object.

Enumerator
EARWF_FOR_FILE 

Serialization/deserialization is done for an xml file.

EARWF_FOR_EDITOR 

Serialization/deserialization is done for an editor property box.

EARWF_USE_RELATIVE_PATHS 

When writing filenames, relative paths should be used.

◆ E_FILE_ARCHIVE_TYPE

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.

◆ EREAD_FILE_TYPE

An enumeration for different class types implementing IReadFile.

Enumerator
ERFT_READ_FILE 

CReadFile.

ERFT_MEMORY_READ_FILE 

CMemoryReadFile.

ERFT_LIMIT_READ_FILE 

CLimitReadFile.

EFIT_UNKNOWN 

Unknown type.

◆ 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 

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.


Jimcpp    @cppfx.xyz

K