5 #ifndef __IRR_XML_H_INCLUDED__ 6 #define __IRR_XML_H_INCLUDED__ 227 virtual int read(
void*
buffer,
int sizeToRead) = 0;
230 virtual long getSize()
const = 0;
276 template<
class char_type,
class super_
class>
286 virtual bool read() = 0;
376 template<
class char_type,
class super_
class>
408 const char_type* attr1Name = 0,
const char_type* attr1Value = 0,
409 const char_type* attr2Name = 0,
const char_type* attr2Value = 0,
410 const char_type* attr3Name = 0,
const char_type* attr3Value = 0,
411 const char_type* attr4Name = 0,
const char_type* attr4Value = 0,
412 const char_type* attr5Name = 0,
const char_type* attr5Value = 0) = 0;
419 virtual void writeComment(
const char_type* comment) = 0;
428 virtual void writeText(
const char_type* text) = 0;
435 template <
typename T>
442 #if defined(__BORLANDC__) 446 xmlChar<T>(
unsigned short in) :
c(static_cast<T>(
in)) {}
447 xmlChar<T>(
unsigned int in) :
c(static_cast<T>(
in)) {}
448 xmlChar<T>(
unsigned long in) :
c(static_cast<T>(
in)) {}
452 #if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) // VS compiling without native wchar_t can't have it 458 operator T()
const {
return c; }
496 #ifdef _IRR_COMPILE_WITH_XML_ 535 bool deleteCallback =
false);
575 bool deleteCallback =
false);
616 bool deleteCallback =
false);
618 #endif // _IRR_COMPILE_WITH_XML_ 644 #endif // __IRR_XML_H_INCLUDED__ End of an xml element such as </foo>.
virtual int getAttributeValueAsInt(const char_type *name, int defaultNotFound=0) const =0
Returns the value of an attribute as integer.
virtual ~IIrrXMLWriter()
Destructor.
virtual float getAttributeValueAsFloat(const char_type *name, float defaultNotFound=0.f) const =0
Returns the value of an attribute as float.
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.
GLuint const GLchar * name
virtual const char_type * getNodeData() const =0
Returns data of the current node.
Everything in the Irrlicht Engine can be found in this namespace.
virtual ETEXT_FORMAT getParserFormat() const =0
Returns format of the strings returned by the parser.
virtual long getSize() const =0
Returns size of file in bytes on success or -1L on failure.
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.
virtual unsigned int getAttributeCount() const =0
Returns attribute count of the current XML node.
Very simple string class with some useful features.
virtual const char_type * getAttributeName(int idx) const =0
Returns name of an attribute.
virtual void writeLineBreak()=0
Writes a line break.
virtual bool isEmptyElement() const =0
Returns if an element is an empty element, like <foo />
UTF-16 format, big endian.
virtual ~IFileReadCallBack()
Destructor.
virtual const char_type * getAttributeValue(int idx) const =0
Returns the value of an attribute.
ETEXT_FORMAT
Enumeration of all supported source text file formats.
xmlChar< unsigned short > char16
defines the utf-16 type.
UTF-32 format, big endian.
virtual bool read()=0
Reads forward to the next xml node.
virtual const char_type * getNodeName() const =0
Returns the name of the current node.
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.
virtual void writeText(const char_type *text)=0
Writes a text into the file.
Interface providing easy read access to a XML file.
GLenum GLsizei GLsizei GLint * values
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 EXML_NODE getNodeType() const =0
Returns the type of the current XML node.
virtual ~IIrrXMLReader()
Destructor.
virtual ETEXT_FORMAT getSourceFormat() const =0
Returns format of the source xml file.
virtual void writeComment(const char_type *comment)=0
Writes a comment into the xml file.
virtual void writeXMLHeader()=0
Writes an xml 1.0 header.
IRRLICHT_API IrrXMLReader *IRRCALLCONV createIrrXMLReader(const char *filename)
Creates an instance of an UFT-8 or ASCII character xml parser.
virtual void writeElement(const char_type *name, bool empty=false, const char_type *attr1Name=0, const char_type *attr1Value=0, const char_type *attr2Name=0, const char_type *attr2Value=0, const char_type *attr3Name=0, const char_type *attr3Value=0, const char_type *attr4Name=0, const char_type *attr4Value=0, const char_type *attr5Name=0, const char_type *attr5Value=0)=0
virtual const char_type * getAttributeValueSafe(const char_type *name) const =0
Returns the value of an attribute in a safe way.
Callback class for file read abstraction.
Interface providing methods for making it easier to write XML files.
Self reallocating template array (like stl vector) with additional features.
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.
virtual void writeClosingTag(const char_type *name)=0
Writes the closing tag for an element. Like "</foo>".
ASCII, file without byte order mark, or not a text file.