WPSEntry Class Reference

basic class to store an entry in a file This contained : More...

#include <WPSEntry.h>

Inheritance diagram for WPSEntry:
WPS4TextInternal::Note

Public Member Functions

 WPSEntry ()
 constructor
virtual ~WPSEntry ()
void setBegin (long off)
 sets the begin offset
void setLength (long l)
 sets the zone size
void setEnd (long e)
 sets the end offset
long begin () const
 returns the begin offset
long end () const
 returns the end offset
long length () const
 returns the length of the zone
bool valid (bool checkId=false) const
 returns true if the zone length is positive
bool operator== (const WPSEntry &a) const
 basic operator==
bool operator!= (const WPSEntry &a) const
 basic operator!=
bool isParsed () const
 a flag to know if the entry was parsed or not
void setParsed (bool ok=true) const
 sets the flag m_parsed to true or false
void setType (std::string const tp)
 sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
std::string const & type () const
 returns the type of the entry
bool hasType (std::string const tp) const
 returns true if the type entry == type
void setName (std::string const &nam)
 sets the name of the entry
std::string const & name () const
 name of the entry
bool hasName (std::string const &nam) const
 checks if the entry name is equal to name
int id () const
 returns the entry id
void setId (int i)
 sets the id
std::string const & extra () const
 retrieves the extra string
void setExtra (std::string const &s)
 sets the extra string

Protected Attributes

long m_begin
 the begin of the entry.
long m_length
 the size of the entry
std::string m_type
 the entry type
std::string m_name
 the name
int m_id
 the identificator
bool m_parsed
 a bool to store if the entry is or not parsed
std::string m_extra
 an extra string

Friends

std::ostream & operator<< (std::ostream &o, WPSEntry const &ent)

Detailed Description

basic class to store an entry in a file This contained :

  • its begin and end positions
  • its type, its name and an identificator
  • a flag used to know if the file is or not parsed

Constructor & Destructor Documentation

WPSEntry::WPSEntry ( )
inline

constructor

virtual WPSEntry::~WPSEntry ( )
inlinevirtual

Member Function Documentation

std::string const& WPSEntry::extra ( ) const
inline

retrieves the extra string

bool WPSEntry::hasName ( std::string const &  nam) const
inline

checks if the entry name is equal to name

bool WPSEntry::hasType ( std::string const  tp) const
inline

returns true if the type entry == type

Referenced by WPS4Text::readFDP(), and WPS4Parser::send().

int WPSEntry::id ( ) const
inline

returns the entry id

Referenced by WPS4Graph::readObject(), and WPS4Text::readText().

bool WPSEntry::isParsed ( ) const
inline

a flag to know if the entry was parsed or not

Referenced by WPS4ParserInternal::SubDocument::parse().

std::string const& WPSEntry::name ( ) const
inline

name of the entry

bool WPSEntry::operator!= ( const WPSEntry a) const
inline

basic operator!=

bool WPSEntry::operator== ( const WPSEntry a) const
inline

basic operator==

Referenced by operator!=().

void WPSEntry::setEnd ( long  e)
inline
void WPSEntry::setExtra ( std::string const &  s)
inline

sets the extra string

void WPSEntry::setLength ( long  l)
inline
void WPSEntry::setName ( std::string const &  nam)
inline

sets the name of the entry

void WPSEntry::setParsed ( bool  ok = true) const
inline

sets the flag m_parsed to true or false

Referenced by WPS4ParserInternal::SubDocument::parse(), and WPS4Text::readFDP().

void WPSEntry::setType ( std::string const  tp)
inline
std::string const& WPSEntry::type ( ) const
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
WPSEntry const &  ent 
)
friend

Member Data Documentation

long WPSEntry::m_begin
protected

the begin of the entry.

Referenced by begin(), end(), operator==(), setBegin(), setEnd(), and valid().

std::string WPSEntry::m_extra
protected

an extra string

Referenced by extra(), and setExtra().

int WPSEntry::m_id
protected

the identificator

Referenced by id(), operator==(), setId(), and valid().

long WPSEntry::m_length
protected

the size of the entry

Referenced by end(), length(), operator==(), setEnd(), setLength(), and valid().

std::string WPSEntry::m_name
protected

the name

Referenced by hasName(), name(), operator==(), and setName().

bool WPSEntry::m_parsed
mutableprotected

a bool to store if the entry is or not parsed

Referenced by isParsed(), and setParsed().

std::string WPSEntry::m_type
protected

the entry type

Referenced by hasType(), operator==(), setType(), and type().


The documentation for this class was generated from the following file:

Generated on Wed Aug 8 2012 16:07:58 for libwps by doxygen 1.8.1.2