XML file reader. More...
#include <xmlstorage.h>
Public Member Functions | |
XMLReader (XMLNode *node, std::istream &in) | |
int | get () |
read one character from XML stream | |
Protected Attributes | |
std::istream & | _in |
int | _last_crlf |
XML file reader.
Definition at line 2664 of file xmlstorage.h.
XMLStorage::XMLReader::XMLReader | ( | XMLNode * | node, |
std::istream & | in | ||
) | [inline] |
Definition at line 2666 of file xmlstorage.h.
: XMLReaderBase(node), _in(in), _last_crlf(0) { }
int XMLStorage::XMLReader::get | ( | ) | [inline, virtual] |
read one character from XML stream
Implements XMLStorage::XMLReaderBase.
Definition at line 2674 of file xmlstorage.h.
References XMLStorage::XMLLocation::_column, _in, _last_crlf, XMLStorage::XMLLocation::_line, and XMLStorage::XMLReaderBase::_location.
{ int c = _in.get(); // // increment line counter on LF // if (c == '\n') { // _location._column = 1; // ++_location._line; // increment line counter on LF, CR, CR/LF or LF/CR line endings if (c=='\n' || c=='\r') { if (!_last_crlf || c==_last_crlf) { _location._column = 1; ++_location._line; _last_crlf = c; } else _last_crlf = 0; } else { ++_location._column; _last_crlf = 0; } return c; }
std::istream& XMLStorage::XMLReader::_in [protected] |
Definition at line 2699 of file xmlstorage.h.
Referenced by get().
int XMLStorage::XMLReader::_last_crlf [protected] |
Definition at line 2700 of file xmlstorage.h.
Referenced by get().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |