MWAWPropertyHandlerEncoder Class Reference

write in WPXBinaryData a list of tags/and properties More...

#include <MWAWPropertyHandler.hxx>

Public Member Functions

 MWAWPropertyHandlerEncoder ()
 constructor More...
 
void startElement (const char *psName, const WPXPropertyList &xPropList)
 starts an element More...
 
void startElement (const char *psName, const WPXPropertyList &xPropList, const WPXPropertyListVector &vect)
 starts an element given a property list vector More...
 
void startElement (const char *psName, const WPXPropertyList &xPropList, const WPXBinaryData &data)
 starts an element given a binary data More...
 
void insertElement (const char *psName)
 insert a simple element More...
 
void endElement (const char *psName)
 ends an element More...
 
void characters (WPXString const &sCharacters)
 writes a list of characters More...
 
bool getData (WPXBinaryData &data)
 retrieves the data More...
 

Protected Member Functions

void writeInteger (int val)
 adds an integer value in f More...
 
void writeLong (long val)
 adds a long value if f More...
 
void writeString (const char *name)
 adds a string: size and string More...
 
void writeProperty (const char *key, const WPXProperty &prop)
 adds a property: a string key, a string corresponding to value More...
 
void writePropertyList (const WPXPropertyList &prop)
 adds a property list: int #prop, #prop*WPXProperty More...
 

Protected Attributes

std::stringstream m_f
 the streamfile More...
 

Detailed Description

write in WPXBinaryData a list of tags/and properties

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

MWAWPropertyHandlerEncoder::MWAWPropertyHandlerEncoder ( )

constructor

Member Function Documentation

void MWAWPropertyHandlerEncoder::characters ( WPXString const &  sCharacters)

writes a list of characters

void MWAWPropertyHandlerEncoder::endElement ( const char *  psName)

ends an element

bool MWAWPropertyHandlerEncoder::getData ( WPXBinaryData &  data)

retrieves the data

void MWAWPropertyHandlerEncoder::insertElement ( const char *  psName)

insert a simple element

void MWAWPropertyHandlerEncoder::startElement ( const char *  psName,
const WPXPropertyList &  xPropList 
)

starts an element

void MWAWPropertyHandlerEncoder::startElement ( const char *  psName,
const WPXPropertyList &  xPropList,
const WPXPropertyListVector &  vect 
)

starts an element given a property list vector

void MWAWPropertyHandlerEncoder::startElement ( const char *  psName,
const WPXPropertyList &  xPropList,
const WPXBinaryData &  data 
)

starts an element given a binary data

void MWAWPropertyHandlerEncoder::writeInteger ( int  val)
inlineprotected

adds an integer value in f

Referenced by writePropertyList(), and writeString().

void MWAWPropertyHandlerEncoder::writeLong ( long  val)
protected

adds a long value if f

Referenced by writeInteger().

void MWAWPropertyHandlerEncoder::writeProperty ( const char *  key,
const WPXProperty &  prop 
)
protected

adds a property: a string key, a string corresponding to value

Referenced by writePropertyList().

void MWAWPropertyHandlerEncoder::writePropertyList ( const WPXPropertyList &  prop)
protected

adds a property list: int #prop, #prop*WPXProperty

void MWAWPropertyHandlerEncoder::writeString ( const char *  name)
protected

adds a string: size and string

Referenced by characters(), endElement(), insertElement(), and writeProperty().

Member Data Documentation

std::stringstream MWAWPropertyHandlerEncoder::m_f
protected

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

Generated on Tue Mar 10 2015 17:32:10 for libmwaw by doxygen 1.8.5