5 #ifndef __IRR_XML_H_INCLUDED__ 6 #define __IRR_XML_H_INCLUDED__ 225 virtual int read(
void* buffer,
int sizeToRead) = 0;
228 virtual long getSize()
const = 0;
274 template<
class char_type,
class super_
class>
284 virtual bool read() = 0;
287 virtual EXML_NODE getNodeType()
const = 0;
293 virtual unsigned int getAttributeCount()
const = 0;
298 virtual const char_type* getAttributeName(
int idx)
const = 0;
303 virtual const char_type* getAttributeValue(
int idx)
const = 0;
308 virtual const char_type* getAttributeValue(
const char_type* name)
const = 0;
315 virtual const char_type* getAttributeValueSafe(
const char_type* name)
const = 0;
321 virtual int getAttributeValueAsInt(
const char_type* name)
const = 0;
327 virtual int getAttributeValueAsInt(
int idx)
const = 0;
333 virtual float getAttributeValueAsFloat(
const char_type* name)
const = 0;
339 virtual float getAttributeValueAsFloat(
int idx)
const = 0;
344 virtual const char_type* getNodeName()
const = 0;
349 virtual const char_type* getNodeData()
const = 0;
352 virtual bool isEmptyElement()
const = 0;
370 template <
typename T>
377 #if defined(__BORLANDC__) 380 xmlChar<T>(
unsigned char in) : c(static_cast<T>(in)) {}
381 xmlChar<T>(
unsigned short in) : c(static_cast<T>(in)) {}
382 xmlChar<T>(
unsigned int in) : c(static_cast<T>(in)) {}
383 xmlChar<T>(
unsigned long in) : c(static_cast<T>(in)) {}
385 explicit xmlChar<T>(
unsigned char in) : c(static_cast<T>(in)) {}
386 explicit xmlChar<T>(
unsigned short in) : c(static_cast<T>(in)) {}
387 explicit xmlChar<T>(
unsigned int in) : c(static_cast<T>(in)) {}
388 explicit xmlChar<T>(
unsigned long in) : c(static_cast<T>(in)) {}
390 operator T()
const {
return c; }
466 bool deleteCallback =
false);
506 bool deleteCallback =
false);
547 bool deleteCallback =
false);
574 #endif // __IRR_XML_H_INCLUDED__ End of an xml element such as </foo>.
An xml comment like <!– I am a comment –> or a DTD definition.
#define IRRLICHT_API
Set FPU settings.
An xml element such as <foo>.
Empty class to be used as parent class for IrrXMLReader.
xmlChar< unsigned int > char32
defines the utf-32 type.
Everything in the Irrlicht Engine can be found in this namespace.
virtual long getSize() const =0
Returns size of file in bytes.
An xml cdata section like <![CDATA[ this is some CDATA ]]>.
UTF-16 format, little endian.
IIrrXMLReader< char, IXMLBase > IrrXMLReader
A UTF-8 or ASCII character xml parser.
UTF-16 format, big endian.
virtual ~IFileReadCallBack()
Destructor.
ETEXT_FORMAT
Enumeration of all supported source text file formats.
xmlChar< unsigned short > char16
defines the utf-16 type.
UTF-32 format, big endian.
IIrrXMLReader< char16, IXMLBase > IrrXMLReaderUTF16
A UTF-16 xml parser.
virtual int read(void *buffer, int sizeToRead)=0
Reads an amount of bytes from the file.
Interface providing easy read access to a XML file.
EXML_NODE
Enumeration for all xml nodes which are parsed by IrrXMLReader.
IRRLICHT_API IrrXMLReaderUTF32 *IRRCALLCONV createIrrXMLReaderUTF32(const char *filename)
Creates an instance of an UFT-32 xml parser.
virtual ~IIrrXMLReader()
Destructor.
IRRLICHT_API IrrXMLReader *IRRCALLCONV createIrrXMLReader(const char *filename)
Creates an instance of an UFT-8 or ASCII character xml parser.
Callback class for file read abstraction.
IIrrXMLReader< char32, IXMLBase > IrrXMLReaderUTF32
A UTF-32 xml parser.
IRRLICHT_API IrrXMLReaderUTF16 *IRRCALLCONV createIrrXMLReaderUTF16(const char *filename)
Creates an instance of an UFT-16 xml parser.
UTF-32 format, little endian.
No xml node. This is usually the node if you did not read anything yet.
ASCII, file without byte order mark, or not a text file.