Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

TaggedParser Class Reference

#include <TaggedParser.h>

List of all members.

Public Types

typedef tag_type TagType
enum  tag_type {
  NONE = 0, SINGLE, START, END,
  OLDSINGLE, OLDMULTI
}

Public Member Functions

 TaggedParser ()
virtual ~TaggedParser ()
void asOldstyle (bool oldstyle)
int lineNumber () const
streamoff tagPos () const
const std::string & currentTag () const
const std::string & currentLocale () const
streamoff dataStartPos () const
streamoff dataEndPos () const
unsigned dataLength () const
const std::string & data ()
TagType lookupTag (istream &stream_fr, const std::string &stag_tr="", const std::string &slang_tr="")
TagType lookupEndTag (istream &stream_fr, const std::string &etag_tr, const std::string &elang_tr="", bool reverseLocale=false)

Static Public Member Functions

std::string data2string (const std::list< std::string > &data_Vtr)
vector< std::string > split2words (const std::string &line_tr, const std::string &sepchars_tr="\t\n")

Static Public Attributes

const streamoff nopos = streamoff(-1)

Private Member Functions

void _reset ()
void _datareset ()
TagType tagOnLine (const std::string &cline_tr, std::string &tag_tr, std::string::size_type &delim_ir, std::string &lang_tr)

Static Private Member Functions

streamoff readLine (istream &stream_fr, std::string &cline_tr)

Private Attributes

std::string currentLine
streamoff _tagPos
streamoff _startPos
streamoff _endPos
int _bufferPos
unsigned int _bufferLen
int _lineNumber
std::string _currentTag
std::string _currentLocale
std::string _currentData
bool _oldstyle
int _offset

Static Private Attributes

const unsigned bufferLen_i = 1024
char buffer_ac []


Member Typedef Documentation

typedef tag_type TaggedParser::TagType
 


Member Enumeration Documentation

enum TaggedParser::tag_type
 

Enumeration values:
NONE 
SINGLE 
START 
END 
OLDSINGLE 
OLDMULTI 


Constructor & Destructor Documentation

TaggedParser::TaggedParser  ) 
 

TaggedParser::~TaggedParser  )  [virtual]
 


Member Function Documentation

void TaggedParser::_datareset  )  [inline, private]
 

void TaggedParser::_reset  )  [inline, private]
 

void TaggedParser::asOldstyle bool  oldstyle  )  [inline]
 

const std::string& TaggedParser::currentLocale  )  const [inline]
 

const std::string& TaggedParser::currentTag  )  const [inline]
 

const std::string& TaggedParser::data  )  [inline]
 

string TaggedParser::data2string const std::list< std::string > &  data_Vtr  )  [static]
 

streamoff TaggedParser::dataEndPos  )  const [inline]
 

unsigned TaggedParser::dataLength  )  const [inline]
 

streamoff TaggedParser::dataStartPos  )  const [inline]
 

int TaggedParser::lineNumber  )  const [inline]
 

TaggedParser::TagType TaggedParser::lookupEndTag istream &  stream_fr,
const std::string &  etag_tr,
const std::string &  elang_tr = "",
bool  reverseLocale = false
 

lookup end tag set start and end retrieval positions

TaggedParser::TagType TaggedParser::lookupTag istream &  stream_fr,
const std::string &  stag_tr = "",
const std::string &  slang_tr = ""
 

lookup a tag parse until stag_tr, leave empty to parse until any tag. On succes posStartTag() and posEndTag() can be used Usually used to lookup a single or a start tag

streamoff TaggedParser::readLine istream &  stream_fr,
std::string &  cline_tr
[inline, static, private]
 

vector< string > TaggedParser::split2words const std::string &  line_tr,
const std::string &  sepchars_tr = "\t\n"
[static]
 

TaggedParser::TagType TaggedParser::tagOnLine const std::string &  cline_tr,
std::string &  tag_tr,
std::string::size_type &  delim_ir,
std::string &  lang_tr
[private]
 

streamoff TaggedParser::tagPos  )  const [inline]
 


Member Data Documentation

unsigned int TaggedParser::_bufferLen [private]
 

int TaggedParser::_bufferPos [private]
 

std::string TaggedParser::_currentData [private]
 

std::string TaggedParser::_currentLocale [private]
 

std::string TaggedParser::_currentTag [private]
 

streamoff TaggedParser::_endPos [private]
 

int TaggedParser::_lineNumber [private]
 

int TaggedParser::_offset [private]
 

bool TaggedParser::_oldstyle [private]
 

streamoff TaggedParser::_startPos [private]
 

streamoff TaggedParser::_tagPos [private]
 

char TaggedParser::buffer_ac [static, private]
 

const unsigned TaggedParser::bufferLen_i = 1024 [static, private]
 

std::string TaggedParser::currentLine [private]
 

const streamoff TaggedParser::nopos = streamoff(-1) [static]
 


The documentation for this class was generated from the following files:
Generated on Thu Feb 23 23:56:11 2006 for liby2util by doxygen 1.3.6