MWAWPropertyHandlerDecoder Class Reference

Internal: the property decoder. More...

List of all members.

Public Member Functions

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

Protected Member Functions

bool readStartElement (WPXInputStream &input)
 reads an startElement
bool readStartElementWithVector (WPXInputStream &input)
 reads an startElement
bool readStartElementWithBinary (WPXInputStream &input)
 reads an startElement
bool readInsertElement (WPXInputStream &input)
 reads an simple element
bool readEndElement (WPXInputStream &input)
 reads an endElement
bool readCharacters (WPXInputStream &input)
 reads a set of characters
bool readPropertyListVector (WPXInputStream &input, WPXPropertyListVector &vect)
 low level: reads a property vector: number of properties list followed by list of properties list
bool readPropertyList (WPXInputStream &input, WPXPropertyList &lists)
 low level: reads a property list: number of properties followed by list of properties
bool readProperty (WPXInputStream &input, WPXPropertyList &list)
 low level: reads a property and its value, adds it to list
bool readString (WPXInputStream &input, std::string &s)
 low level: reads a string : size and string

Static Protected Member Functions

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

Protected Attributes

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

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


Member Function Documentation

MWAWPropertyHandlerDecoder& MWAWPropertyHandlerDecoder::operator= ( MWAWPropertyHandlerDecoder const &  ) [private]
bool MWAWPropertyHandlerDecoder::readCharacters ( WPXInputStream &  input) [inline, protected]

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) [inline, protected]

reads an endElement

bool MWAWPropertyHandlerDecoder::readInsertElement ( WPXInputStream &  input) [inline, protected]

reads an simple element

static bool MWAWPropertyHandlerDecoder::readInteger ( WPXInputStream &  input,
int &  val 
) [inline, static, protected]

low level: reads an integer value

static bool MWAWPropertyHandlerDecoder::readLong ( WPXInputStream &  input,
long &  val 
) [inline, static, protected]

low level: reads an long value

bool MWAWPropertyHandlerDecoder::readProperty ( WPXInputStream &  input,
WPXPropertyList &  list 
) [inline, protected]

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

bool MWAWPropertyHandlerDecoder::readPropertyList ( WPXInputStream &  input,
WPXPropertyList &  lists 
) [inline, protected]

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

bool MWAWPropertyHandlerDecoder::readPropertyListVector ( WPXInputStream &  input,
WPXPropertyListVector &  vect 
) [inline, protected]

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

bool MWAWPropertyHandlerDecoder::readStartElement ( WPXInputStream &  input) [inline, protected]

reads an startElement

bool MWAWPropertyHandlerDecoder::readStartElementWithBinary ( WPXInputStream &  input) [inline, protected]

reads an startElement

bool MWAWPropertyHandlerDecoder::readStartElementWithVector ( WPXInputStream &  input) [inline, protected]

reads an startElement

bool MWAWPropertyHandlerDecoder::readString ( WPXInputStream &  input,
std::string &  s 
) [inline, protected]

low level: reads a string : size and string


Member Data Documentation

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

the list of open tags


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