WPS8Struct::FileData Struct Reference

A recursif structure which seems generally used to store complex memory structures in a file. More...

#include <WPS8Struct.h>

Public Member Functions

 FileData ()
 constructor More...
 
bool isBad () const
 returns true if the field was not read More...
 
bool hasStr () const
 returns true if it is a string data More...
 
bool isNumber () const
 returns true if it is a number data More...
 
uint32_t getRGBColor () const
 returns a rgb color by converting the integer value field More...
 
WPSBorder::Style getBorderStyle (std::string &mess) const
 returns the border style using the integer value field More...
 
bool isBool () const
 returns true if it is a bool data More...
 
bool isTrue () const
 returns true if this is a bool and the val is true More...
 
bool isFalse () const
 returns true if this is a bool and the val is false More...
 
bool isArray () const
 returns true if this is a list of block or an unstructured list More...
 
bool isRead () const
 returns true if the data are read More...
 
int type () const
 returns the data type (low level) More...
 
int id () const
 returns the identificator More...
 
bool readArrayBlock () const
 forces reading the data as a list of block More...
 
long begin () const
 beginning of data position More...
 
long end () const
 end of data position More...
 

Public Attributes

long m_value
 an int value, filled if the data store an val More...
 
std::string m_text
 the string values More...
 
std::vector< FileDatam_recursData
 the list of children More...
 

Static Protected Member Functions

static std::string createErrorString (WPXInputStreamPtr input, long endPos)
 creates a string used to store the unparsed data More...
 

Protected Attributes

int m_type
 an int which indicates the data type More...
 
int m_id
 an identificator More...
 
long m_beginOffset
 the initial position of the data of this field More...
 
long m_endOffset
 the final position of the data of this field More...
 
WPXInputStreamPtr m_input
 the input More...
 

Friends

std::ostream & operator<< (std::ostream &o, FileData const &dt)
 operator<< More...
 
bool readData (WPXInputStreamPtr input, long endPos, FileData &dt, std::string &error)
 function which parses an element More...
 
bool readBlockData (WPXInputStreamPtr input, long endPos, FileData &dt, std::string &error)
 function which parses a set of elements More...
 

Detailed Description

A recursif structure which seems generally used to store complex memory structures in a file.

Each element seems to contains

  • the encoded type of the field (bool, int, strings, lists, entry ...)
  • an identificator of the field
  • the field values
Note
  • the distinction between a lists of recursif Data and a list of << local >> structures is not clear. This implies that when the field is a list, readBlockData must be called in order to try reading the data recursively
  • the case typeId = 0x2a seems to correspond to an entry id (4 letters + id), it is the only special case ?
  • the difference between signed and unsigned field must be checked.

Constructor & Destructor Documentation

WPS8Struct::FileData::FileData ( )
inline

constructor

Member Function Documentation

long WPS8Struct::FileData::begin ( ) const
inline

beginning of data position

Referenced by WPS8Parser::readDocProperties(), and WPS8Parser::readFRAM().

std::string WPS8Struct::FileData::createErrorString ( WPXInputStreamPtr  input,
long  endPos 
)
staticprotected

creates a string used to store the unparsed data

Referenced by WPS8Struct::readBlockData().

long WPS8Struct::FileData::end ( ) const
inline

end of data position

Referenced by WPS8Parser::readDocProperties(), and WPS8Parser::readFRAM().

WPSBorder::Style WPS8Struct::FileData::getBorderStyle ( std::string &  mess) const

returns the border style using the integer value field

Referenced by WPS8Table::readMCLD(), and WPS8TextStyle::readParagraph().

uint32_t WPS8Struct::FileData::getRGBColor ( ) const
inline

returns a rgb color by converting the integer value field

Referenced by WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8Table::readMCLD(), and WPS8TextStyle::readParagraph().

bool WPS8Struct::FileData::hasStr ( ) const
inline

returns true if it is a string data

Referenced by isArray(), isBool(), isNumber(), and WPS8Struct::operator<<().

bool WPS8Struct::FileData::isArray ( ) const
inline

returns true if this is a list of block or an unstructured list

Referenced by readArrayBlock(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), and WPS8TextStyle::readParagraph().

bool WPS8Struct::FileData::isBool ( ) const
inline

returns true if it is a bool data

bool WPS8Struct::FileData::isFalse ( ) const
inline

returns true if this is a bool and the val is false

Referenced by WPS8Struct::operator<<(), and WPS8Parser::readDocProperties().

bool WPS8Struct::FileData::isNumber ( ) const
inline

returns true if it is a number data

bool WPS8Struct::FileData::isTrue ( ) const
inline

returns true if this is a bool and the val is true

Referenced by WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), and WPS8Table::readMCLD().

bool WPS8Struct::FileData::readArrayBlock ( ) const

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
FileData const &  dt 
)
friend

operator<<

bool readBlockData ( WPXInputStreamPtr  input,
long  endPos,
FileData dt,
std::string &  error 
)
friend

function which parses a set of elements

Referenced by readArrayBlock().

bool readData ( WPXInputStreamPtr  input,
long  endPos,
FileData dt,
std::string &  error 
)
friend

function which parses an element

Member Data Documentation

long WPS8Struct::FileData::m_beginOffset
protected

the initial position of the data of this field

Referenced by begin(), isRead(), WPS8Struct::operator<<(), readArrayBlock(), WPS8Struct::readBlockData(), and WPS8Struct::readData().

long WPS8Struct::FileData::m_endOffset
protected

the final position of the data of this field

Referenced by end(), isRead(), WPS8Struct::operator<<(), readArrayBlock(), WPS8Struct::readBlockData(), and WPS8Struct::readData().

int WPS8Struct::FileData::m_id
protected

an identificator

Referenced by id(), and WPS8Struct::readData().

WPXInputStreamPtr WPS8Struct::FileData::m_input
protected
std::string WPS8Struct::FileData::m_text
int WPS8Struct::FileData::m_type
protected

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

Generated on Wed Jun 11 2014 02:26:02 for libwps by doxygen 1.8.5