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 readStartElementWithVector (WPXInputStream &input)
 reads an startElement More...
 
bool readStartElementWithBinary (WPXInputStream &input)
 reads an startElement More...
 
bool readInsertElement (WPXInputStream &input)
 reads an simple element More...
 
bool readEndElement (WPXInputStream &input)
 reads an endElement More...
 
bool readCharacters (WPXInputStream &input)
 reads a set of characters More...
 
bool readPropertyListVector (WPXInputStream &input, WPXPropertyListVector &vect)
 low level: reads a property vector: number of properties list followed by list of properties list More...
 
bool readPropertyList (WPXInputStream &input, WPXPropertyList &lists)
 low level: reads a property list: number of properties followed by list of properties 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...
 
static bool readLong (WPXInputStream &input, long &val)
 low level: reads an long 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
  • [property:p]: a string value p.getStr()
  • [propertyList:pList]: a int: #pList followed by pList[0].key(),pList[0], pList[1].key(),pList[1], ...
  • [propertyListVector:v]: a int: #v followed by v[0], v[1], ...
  • [binaryData:d]: a int32 d.size() followed by the data content
  • [startElement:name proplist:prop]: char 'S', [string] name, prop
  • [startElement2:name proplist:prop proplistvector:vector]: char 'V', [string] name, prop, vector
  • [startElement3:name proplist:prop binarydata:data]: char 'B', [string] name, prop, data
  • [insertElement:name]: char 'I', [string] name
  • [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

bool MWAWPropertyHandlerDecoder::readInsertElement ( WPXInputStream &  input)
inlineprotected

reads an simple element

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

low level: reads an integer value

static bool MWAWPropertyHandlerDecoder::readLong ( WPXInputStream &  input,
long &  val 
)
inlinestaticprotected

low level: reads an long value

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

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

bool MWAWPropertyHandlerDecoder::readPropertyList ( WPXInputStream &  input,
WPXPropertyList &  lists 
)
inlineprotected

low level: reads a property list: number of properties followed by list of properties

bool MWAWPropertyHandlerDecoder::readPropertyListVector ( WPXInputStream &  input,
WPXPropertyListVector &  vect 
)
inlineprotected

low level: reads a property vector: number of properties list followed by list of properties list

bool MWAWPropertyHandlerDecoder::readStartElement ( WPXInputStream &  input)
inlineprotected

reads an startElement

bool MWAWPropertyHandlerDecoder::readStartElementWithBinary ( WPXInputStream &  input)
inlineprotected

reads an startElement

bool MWAWPropertyHandlerDecoder::readStartElementWithVector ( 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 Mar 10 2015 17:32:10 for libmwaw by doxygen 1.8.5