MWAWPropertyHandlerEncoder Class Reference

write in librevenge::RVNGBinaryData a list of tags/and properties More...

`#include <MWAWPropertyHandler.hxx>`

## Public Member Functions

| MWAWPropertyHandlerEncoder ()
| constructor
void | insertElement (const char *psName)
| inserts an element
void | insertElement (const char *psName, const librevenge::RVNGPropertyList &xPropList)
| inserts an element given a property list
void | characters (librevenge::RVNGString const &sCharacters)
| writes a list of characters
bool | getData (librevenge::RVNGBinaryData &data)
| retrieves the data

## Protected Member Functions

void | writeLong (long val)
| adds a long value if f
void | writeString (const librevenge::RVNGString &name)
| adds a string: size and string
void | writeProperty (const char *key, const librevenge::RVNGProperty &prop)
| adds a property: a string key, a string corresponding to value
void | writePropertyList (const librevenge::RVNGPropertyList &prop)
| adds a property list: int #prop followed by the different properties
void | writePropertyListVector (const librevenge::RVNGPropertyListVector &vect)
| adds a property vector: a int: #vect followed by vect[0], vect[1], ...

## Protected Attributes

std::stringstream | m_f
| the streamfile

## Detailed Description

write in librevenge::RVNGBinaryData 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() ( for a basic property )
- [propertyList:pList]: a int: #pList followed by -+ 'p',pList[i].key(),pList[i] for a basic child -+ 'v',pList[i].key(),*(pList.child(pList[i].key())) for a vector child
- [propertyListVector:v]: a int: #v followed by v[0], v[1], ...
- [binaryData:d]: a int32 d.size() followed by the data content
- [insertElement:name]: char 'E', [string] name
- [insertElement:name proplist:prop]: char 'S', [string] name, prop
- [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::MWAWPropertyHandlerEncoder | ( |  | ) |

constructor

## Member Function Documentation

## characters()

void MWAWPropertyHandlerEncoder::characters | ( | librevenge::RVNGString const & | sCharacters | ) |

writes a list of characters

## getData()

bool MWAWPropertyHandlerEncoder::getData | ( | librevenge::RVNGBinaryData & | data | ) |

retrieves the data

## insertElement() [1/2]

void MWAWPropertyHandlerEncoder::insertElement | ( | const char * | psName | ) |

inserts an element

## insertElement() [2/2]

void MWAWPropertyHandlerEncoder::insertElement | ( | const char * | psName,
|  | const librevenge::RVNGPropertyList & | xPropList )

inserts an element given a property list

## writeLong()

void MWAWPropertyHandlerEncoder::writeLong | ( | long | val | ) |

protected

adds a long value if f

Referenced by writePropertyList(), writePropertyListVector(), and writeString().

## writeProperty()

void MWAWPropertyHandlerEncoder::writeProperty | ( | const char * | key,
|  | const librevenge::RVNGProperty & | prop )

protected

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

Referenced by writePropertyList().

## writePropertyList()

void MWAWPropertyHandlerEncoder::writePropertyList | ( | const librevenge::RVNGPropertyList & | prop | ) |

protected

adds a property list: int #prop followed by the different properties

Referenced by insertElement(), and writePropertyListVector().

## writePropertyListVector()

void MWAWPropertyHandlerEncoder::writePropertyListVector | ( | const librevenge::RVNGPropertyListVector & | vect | ) |

protected

adds a property vector: a int: #vect followed by vect[0], vect[1], ...

Referenced by writePropertyList().

## writeString()

void MWAWPropertyHandlerEncoder::writeString | ( | const librevenge::RVNGString & | name | ) |

protected

adds a string: size and string

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

## Member Data Documentation

## m_f

std::stringstream MWAWPropertyHandlerEncoder::m_f

protected

the streamfile

Referenced by characters(), getData(), insertElement(), insertElement(), MWAWPropertyHandlerEncoder(), writeLong(), writePropertyList(), and writeString().

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

- MWAWPropertyHandler.hxx
- MWAWPropertyHandler.cxx