ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > irrXML
Trying to expand the reader
Author Text

Registered User
2009-08-22 08:25:07

Hello all,

Recently I've been working with the XML reader. During this I was wanting some better capabilities for error checking. I decided that at the very least I would try to implement into the reader a simple function to return the current position in the file that the reader was at. With this function if there's an error reading a file and the error is indeed in the source file, then the user can have a chance to know about where in the file the error occured. This was a nice theory, but when I looked into the applicable files of Irrlicht I was rather confused...

I'll be the first to admit that my C++ skills are not the best. I opened irrXML.h and saw that all of the functions were pure virtual, but somehow worked correctly...which goes against my understanding of how classes work, but okay, we can persevere... I came across XCMLReader.cpp, and CXMLReaderImpl.h and saw loads of code! Great! I looked through this code but was rather confused...

I did learn that the format of text that is read in isn't necessarily what will be stored in memory.

I added a function in CXMLReaderImpl.h to return return a value (to be calculated with other code) but I'm not sure how to let the be called in irrXML.h

I was hoping I could just use one of the C STL functions to get the position of the reader in the XML file, but that was dashed when I learned that the text is read in all at once.

Any tips for trying to implement something to help a programmer's error checking result code with the position in the current block of text, and eventually the position in the source file?

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Internationa?" (you are not logged in)




Forum Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Software: Ambiera Light Forum. © 2008-2018 Nikolaus Gebhardt, Ambiera e.U.