STOFFPropertyHandlerEncoder Class Reference

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

#include <STOFFPropertyHandler.hxx>

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

std::stringstream m_f
 the streamfile More...
 

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

◆ STOFFPropertyHandlerEncoder()

STOFFPropertyHandlerEncoder::STOFFPropertyHandlerEncoder ( )

constructor

Member Function Documentation

◆ characters()

void STOFFPropertyHandlerEncoder::characters ( librevenge::RVNGString const &  sCharacters)

writes a list of characters

◆ getData()

bool STOFFPropertyHandlerEncoder::getData ( librevenge::RVNGBinaryData &  data)

retrieves the data

◆ insertElement() [1/2]

void STOFFPropertyHandlerEncoder::insertElement ( const char *  psName)

inserts an element

◆ insertElement() [2/2]

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

inserts an element given a property list

◆ writeLong()

void STOFFPropertyHandlerEncoder::writeLong ( long  val)
protected

adds a long value if f

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

◆ writeProperty()

void STOFFPropertyHandlerEncoder::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 STOFFPropertyHandlerEncoder::writePropertyList ( const librevenge::RVNGPropertyList &  prop)
protected

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

Referenced by writePropertyListVector().

◆ writePropertyListVector()

void STOFFPropertyHandlerEncoder::writePropertyListVector ( const librevenge::RVNGPropertyListVector &  vect)
protected

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

Referenced by writePropertyList().

◆ writeString()

void STOFFPropertyHandlerEncoder::writeString ( const librevenge::RVNGString &  name)
protected

adds a string: size and string

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

Member Data Documentation

◆ m_f

std::stringstream STOFFPropertyHandlerEncoder::m_f
protected

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

Generated on Sat May 29 2021 22:54:04 for libstaroffice by doxygen 1.8.14