Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials
irrXML.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine" and the "irrXML" project.
3 // For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h
4 
5 #ifndef __IRR_XML_H_INCLUDED__
6 #define __IRR_XML_H_INCLUDED__
7 
8 #include <stdio.h>
9 #include "IrrCompileConfig.h"
10 
153 namespace irr
154 {
155 namespace io
156 {
159  {
162 
165 
168 
171 
174 
177  };
178 
179 
182  {
185 
188 
191 
195 
198 
201 
204  };
205 
207 
215  {
216  public:
217 
219  virtual ~IFileReadCallBack() {}
220 
222 
225  virtual int read(void* buffer, int sizeToRead) = 0;
226 
228  virtual long getSize() const = 0;
229  };
230 
232 
237  class IXMLBase
238  {
239  };
240 
242 
274  template<class char_type, class super_class>
275  class IIrrXMLReader : public super_class
276  {
277  public:
278 
280  virtual ~IIrrXMLReader() {}
281 
283 
284  virtual bool read() = 0;
285 
287  virtual EXML_NODE getNodeType() const = 0;
288 
290 
293  virtual unsigned int getAttributeCount() const = 0;
294 
296 
298  virtual const char_type* getAttributeName(int idx) const = 0;
299 
301 
303  virtual const char_type* getAttributeValue(int idx) const = 0;
304 
306 
308  virtual const char_type* getAttributeValue(const char_type* name) const = 0;
309 
311 
315  virtual const char_type* getAttributeValueSafe(const char_type* name) const = 0;
316 
318 
321  virtual int getAttributeValueAsInt(const char_type* name) const = 0;
322 
324 
327  virtual int getAttributeValueAsInt(int idx) const = 0;
328 
330 
333  virtual float getAttributeValueAsFloat(const char_type* name) const = 0;
334 
336 
339  virtual float getAttributeValueAsFloat(int idx) const = 0;
340 
342 
344  virtual const char_type* getNodeName() const = 0;
345 
347 
349  virtual const char_type* getNodeData() const = 0;
350 
352  virtual bool isEmptyElement() const = 0;
353 
355 
359  virtual ETEXT_FORMAT getSourceFormat() const = 0;
360 
362 
366  virtual ETEXT_FORMAT getParserFormat() const = 0;
367  };
368 
369 
370  template <typename T>
371  struct xmlChar
372  {
373  T c;
375  xmlChar<T>(char in) : c(static_cast<T>(in)) {}
376  xmlChar<T>(wchar_t in) : c(static_cast<T>(in)) {}
377  explicit xmlChar<T>(unsigned char in) : c(static_cast<T>(in)) {}
378  explicit xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {}
379  explicit xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {}
380  explicit xmlChar<T>(unsigned long in) : c(static_cast<T>(in)) {}
381  operator T() const { return c; }
382  void operator=(int t) { c=static_cast<T>(t); }
383  };
384 
386 
389 
391 
394 
396 
402 
404 
410 
412 
418 
419 
421 
430 
432 
442 
444 
457  bool deleteCallback = false);
458 
460 
470 
472 
482 
484 
497  bool deleteCallback = false);
498 
499 
501 
510 
512 
522 
524 
538  bool deleteCallback = false);
539 
540 
562 } // end namespace io
563 } // end namespace irr
564 
565 #endif // __IRR_XML_H_INCLUDED__
566 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Mon May 6 2013 17:41:01 by Doxygen (1.8.3.1)