MWAWPropertyHandlerDecoder Class Reference

Internal: the property decoder. More...

Public Member Functions

 MWAWPropertyHandlerDecoder (MWAWPropertyHandler *hdl=0L)
 constructor given a MWAWPropertyHandler More...
 
bool readData (WPXBinaryData const &encoded)
 tries to read the data More...
 

Protected Member Functions

bool readStartElement (WPXInputStream &input)
 reads an startElement More...
 
bool readEndElement (WPXInputStream &input)
 reads an endElement More...
 
bool readCharacters (WPXInputStream &input)
 reads a set of characters More...
 
bool readProperty (WPXInputStream &input, WPXPropertyList &list)
 low level: reads a property and its value, adds it to list More...
 
bool readString (WPXInputStream &input, std::string &s)
 low level: reads a string : size and string More...
 

Static Protected Member Functions

static bool readInteger (WPXInputStream &input, int &val)
 low level: reads an integer value More...
 

Protected Attributes

MWAWPropertyHandlerm_handler
 the streamfile More...
 
std::stack< std::string > m_openTag
 the list of open tags More...
 

Private Member Functions

 MWAWPropertyHandlerDecoder (MWAWPropertyHandlerDecoder const &orig)
 
MWAWPropertyHandlerDecoderoperator= (MWAWPropertyHandlerDecoder const &)
 

Detailed Description

Internal: the property decoder.

In order to be read by writerperfect, we must code document consisting in tag and propertyList in an intermediar format:

  • [string:s]: an int length(s) follow by the length(s) characters of string s
  • [startElement:name proplist:prop]: char 'S', [string] name, int #properties, 2#prop*string )
  • [endElement:name ]: char 'E', [string] name
  • [characters:s ]: char 'T', [string] s
    • if len(s)==0, we write nothing
    • the string is written as is (ie. we do not escaped any characters).

Constructor & Destructor Documentation

MWAWPropertyHandlerDecoder::MWAWPropertyHandlerDecoder ( MWAWPropertyHandler hdl = 0L)
inline

constructor given a MWAWPropertyHandler

MWAWPropertyHandlerDecoder::MWAWPropertyHandlerDecoder ( MWAWPropertyHandlerDecoder const &  orig)
private

Member Function Documentation

MWAWPropertyHandlerDecoder& MWAWPropertyHandlerDecoder::operator= ( MWAWPropertyHandlerDecoder const &  )
private
bool MWAWPropertyHandlerDecoder::readCharacters ( WPXInputStream &  input)
inlineprotected

reads a set of characters

bool MWAWPropertyHandlerDecoder::readData ( WPXBinaryData const &  encoded)
inline

tries to read the data

Referenced by MWAWPropertyHandler::checkData(), and MWAWPropertyHandler::readData().

bool MWAWPropertyHandlerDecoder::readEndElement ( WPXInputStream &  input)
inlineprotected

reads an endElement

static bool MWAWPropertyHandlerDecoder::readInteger ( WPXInputStream &  input,
int &  val 
)
inlinestaticprotected

low level: reads an integer value

bool MWAWPropertyHandlerDecoder::readProperty ( WPXInputStream &  input,
WPXPropertyList &  list 
)
inlineprotected

low level: reads a property and its value, adds it to list

bool MWAWPropertyHandlerDecoder::readStartElement ( WPXInputStream &  input)
inlineprotected

reads an startElement

bool MWAWPropertyHandlerDecoder::readString ( WPXInputStream &  input,
std::string &  s 
)
inlineprotected

low level: reads a string : size and string

Member Data Documentation

MWAWPropertyHandler* MWAWPropertyHandlerDecoder::m_handler
protected

the streamfile

std::stack<std::string> MWAWPropertyHandlerDecoder::m_openTag
protected

the list of open tags


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

Generated on Tue Jun 24 2014 16:46:28 for libmwaw by doxygen 1.8.5