summaryrefslogtreecommitdiff
path: root/src/xmlstringreader.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-05-01 17:11:04 +0000
committerMike Buland <eichlan@xagasoft.com>2006-05-01 17:11:04 +0000
commitf7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54 (patch)
tree53cec4864776e07950e3c72f2a990a1017d08045 /src/xmlstringreader.cpp
downloadlibbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.gz
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.bz2
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.xz
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.zip
libbu++ is finally laid out the way it should be, trunk, branches, and tags.
Diffstat (limited to 'src/xmlstringreader.cpp')
-rw-r--r--src/xmlstringreader.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/xmlstringreader.cpp b/src/xmlstringreader.cpp
new file mode 100644
index 0000000..aa7174f
--- /dev/null
+++ b/src/xmlstringreader.cpp
@@ -0,0 +1,37 @@
1#include "xmlstringreader.h"
2#include <string.h>
3
4XmlStringReader::XmlStringReader( const char *sString, bool bStrip )
5 : XmlReader( bStrip )
6{
7 this->sString = sString;
8
9 nIndex = 0;
10 nLength = strlen( sString );
11
12 buildDoc();
13}
14
15XmlStringReader::~XmlStringReader()
16{
17}
18
19char XmlStringReader::getChar( int nAdd )
20{
21 if( nLength >= nIndex+nAdd+1 )
22 {
23 return sString[nIndex+nAdd];
24 }
25 else
26 {
27 return '\0';
28 }
29}
30
31void XmlStringReader::usedChar()
32{
33 if( nLength >= nIndex+1 )
34 {
35 nIndex++;
36 }
37}