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

CommonPkdParser::TagSet Class Reference

#include <CommonPkdParser.h>

List of all members.

Public Types

typedef std::vector< CommonPkdParser::Tag * > tagvectortype

Public Member Functions

 TagSet ()
virtual ~TagSet ()
void addTag (Tag *tag)
Tag::assignstatus assign (const std::string &starttag, TagParser &parser, std::istream &istr)
void print (std::ostream &os)
void clear ()
virtual void setEncoding (Tag::encodingtype etype)
CommonPkdParser::TaggetTagByIndex (unsigned int idx)
void addTagByIndex (unsigned int idx, CommonPkdParser::Tag *t)

Protected Types

typedef std::map< std::string,
Tag * > 
tagmaptype

Protected Member Functions

void insert (const std::string key, Tag *tag)

Protected Attributes

std::vector< Tag * > _localetags
tagmaptype _tags
tagvectortype _tagv


Detailed Description

TagSet manages all Tags contained in a file. It redirects assignments to the proper Tag


Member Typedef Documentation

typedef std::map<std::string, Tag*> CommonPkdParser::TagSet::tagmaptype [protected]
 

typedef std::vector<CommonPkdParser::Tag*> CommonPkdParser::TagSet::tagvectortype
 


Constructor & Destructor Documentation

CommonPkdParser::TagSet::TagSet  )  [inline]
 

CommonPkdParser::TagSet::~TagSet  )  [virtual]
 


Member Function Documentation

void CommonPkdParser::TagSet::addTag Tag tag  )  [inline]
 

add Tag to TagSet

Parameters:
tag Tag to manage, will be free'd in destructor

void CommonPkdParser::TagSet::addTagByIndex unsigned int  idx,
CommonPkdParser::Tag t
[inline]
 

assign number to Tag

Parameters:
idx number
t Tag*

Tag::assignstatus CommonPkdParser::TagSet::assign const std::string &  starttag,
TagParser parser,
std::istream &  istr
 

lookup Tag responsible for parsing starttag in map and call its assign function

Parameters:
starttag Tag to assign
istr stream to parse

void CommonPkdParser::TagSet::clear  )  [inline]
 

reset all included tags

CommonPkdParser::Tag* CommonPkdParser::TagSet::getTagByIndex unsigned int  idx  )  [inline]
 

get Tag by number instead of string

Parameters:
idx Tag number
Returns:
pointer to tag or NULL if idx doesn't exist

void CommonPkdParser::TagSet::insert const std::string  key,
Tag tag
[inline, protected]
 

insert tag into tagmap

Parameters:
key Name of Tag (usually tag->Name())
tag Tag to instert

void CommonPkdParser::TagSet::print std::ostream &  os  )  [inline]
 

print every contained tag

virtual void CommonPkdParser::TagSet::setEncoding Tag::encodingtype  etype  )  [inline, virtual]
 

set encoding on all tags with locale, call this *before* assigning data to it

Parameters:
etype Encoding to use


Member Data Documentation

std::vector<Tag*> CommonPkdParser::TagSet::_localetags [protected]
 

language dependant tags, needed for setting the encoding

tagmaptype CommonPkdParser::TagSet::_tags [protected]
 

map of tags managed by this tagset

tagvectortype CommonPkdParser::TagSet::_tagv [protected]
 

vector of tags, used to retreive tags by index


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