A recursif structure which seems generally used to store complex memory structures in a file. More...
#include <WPS8Struct.h>
Public Member Functions | |
FileData () | |
constructor | |
bool | isBad () const |
returns true if the field was not read | |
bool | hasStr () const |
returns true if it is a string data | |
bool | isNumber () const |
returns true if it is a number data | |
WPSColor | getRGBColor () const |
returns a rgb color by converting the integer value field | |
bool | getBorderStyles (WPSBorder::Style &style, WPSBorder::Type &type, std::string &mess) const |
returns the border, type style using the integer value field | |
bool | isBool () const |
returns true if it is a bool data | |
bool | isTrue () const |
returns true if this is a bool and the val is true | |
bool | isFalse () const |
returns true if this is a bool and the val is false | |
bool | isArray () const |
returns true if this is a list of block or an unstructured list | |
bool | isRead () const |
returns true if the data are read | |
int | type () const |
returns the data type (low level) | |
int | id () const |
returns the identificator | |
bool | readArrayBlock () const |
forces reading the data as a list of block | |
long | begin () const |
beginning of data position | |
long | end () const |
end of data position | |
Public Attributes | |
long | m_value |
an int value, filled if the data store an val | |
std::string | m_text |
the string values | |
std::vector< FileData > | m_recursData |
the list of children | |
Static Protected Member Functions | |
static std::string | createErrorString (RVNGInputStreamPtr input, long endPos) |
creates a string used to store the unparsed data | |
Protected Attributes | |
int | m_type |
an int which indicates the data type | |
int | m_id |
an identificator | |
long | m_beginOffset |
the initial position of the data of this field | |
long | m_endOffset |
the final position of the data of this field | |
RVNGInputStreamPtr | m_input |
the input | |
Friends | |
std::ostream & | operator<< (std::ostream &o, FileData const &dt) |
operator<< | |
bool | readData (RVNGInputStreamPtr input, long endPos, FileData &dt, std::string &error) |
function which parses an element | |
bool | readBlockData (RVNGInputStreamPtr input, long endPos, FileData &dt, std::string &error) |
function which parses a set of elements |
A recursif structure which seems generally used to store complex memory structures in a file.
Each element seems to contains
WPS8Struct::FileData::FileData | ( | ) | [inline] |
constructor
long WPS8Struct::FileData::begin | ( | ) | const [inline] |
beginning of data position
Referenced by WPS8Parser::readDocProperties(), and WPS8Parser::readFRAM().
std::string WPS8Struct::FileData::createErrorString | ( | RVNGInputStreamPtr | input, |
long | endPos | ||
) | [static, protected] |
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().
bool WPS8Struct::FileData::getBorderStyles | ( | WPSBorder::Style & | style, |
WPSBorder::Type & | type, | ||
std::string & | mess | ||
) | const |
returns the border, type style using the integer value field
Referenced by WPS8Table::readMCLD(), and WPS8TextStyle::readParagraph().
WPSColor 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<<().
int WPS8Struct::FileData::id | ( | ) | const [inline] |
returns the identificator
Referenced by WPS8Text::objectDataParser(), WPS8Struct::operator<<(), WPS8Struct::readBlockData(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8Table::readMCLD(), WPS8TextStyle::readParagraph(), WPS8TextStyle::readSGP(), WPS8Text::textZonesDataParser(), and WPS8Text::tokenEndDataParser().
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::isBad | ( | ) | const [inline] |
returns true if the field was not read
Referenced by WPS8Text::objectDataParser(), WPS8Struct::readBlockData(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8Table::readMCLD(), WPS8TextStyle::readParagraph(), WPS8TextStyle::readSGP(), WPS8Text::textZonesDataParser(), and WPS8Text::tokenEndDataParser().
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::isRead | ( | ) | const [inline] |
returns true if the data are read
Referenced by WPS8Text::defDataParser(), WPS8Struct::operator<<(), readArrayBlock(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8TextStyle::readParagraph(), and WPS8Text::textZonesDataParser().
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 |
forces reading the data as a list of block
Referenced by WPS8Text::defDataParser(), WPS8Struct::operator<<(), WPS8TextStyle::readFont(), WPS8TextStyle::readParagraph(), and WPS8Text::textZonesDataParser().
int WPS8Struct::FileData::type | ( | ) | const [inline] |
returns the data type (low level)
Referenced by WPS8Text::objectDataParser(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8Table::readMCLD(), WPS8TextStyle::readParagraph(), WPS8Text::textZonesDataParser(), and WPS8Text::tokenEndDataParser().
std::ostream& operator<< | ( | std::ostream & | o, |
FileData const & | dt | ||
) | [friend] |
operator<<
bool readBlockData | ( | RVNGInputStreamPtr | input, |
long | endPos, | ||
FileData & | dt, | ||
std::string & | error | ||
) | [friend] |
function which parses a set of elements
Referenced by readArrayBlock().
bool readData | ( | RVNGInputStreamPtr | input, |
long | endPos, | ||
FileData & | dt, | ||
std::string & | error | ||
) | [friend] |
function which parses an element
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().
RVNGInputStreamPtr WPS8Struct::FileData::m_input [protected] |
the input
Referenced by isRead(), WPS8Struct::operator<<(), readArrayBlock(), WPS8Struct::readBlockData(), and WPS8Struct::readData().
std::vector<FileData> WPS8Struct::FileData::m_recursData |
the list of children
Referenced by WPS8Text::defDataParser(), WPS8Text::objectDataParser(), WPS8Struct::operator<<(), WPS8Struct::readBlockData(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8Table::readMCLD(), WPS8TextStyle::readParagraph(), WPS8TextStyle::readSGP(), WPS8Text::textZonesDataParser(), and WPS8Text::tokenEndDataParser().
std::string WPS8Struct::FileData::m_text |
the string values
Referenced by hasStr(), WPS8Struct::operator<<(), WPS8Struct::readData(), WPS8Parser::readDocProperties(), and WPS8Parser::readFRAM().
int WPS8Struct::FileData::m_type [protected] |
an int which indicates the data type
Referenced by isArray(), isBad(), isBool(), isFalse(), isNumber(), isRead(), isTrue(), WPS8Struct::operator<<(), WPS8Struct::readBlockData(), WPS8Struct::readData(), and type().
an int value, filled if the data store an val
Referenced by getBorderStyles(), getRGBColor(), WPS8Text::objectDataParser(), WPS8Struct::operator<<(), WPS8Struct::readBlockData(), WPS8Struct::readData(), WPS8Parser::readDocProperties(), WPS8TextStyle::readFont(), WPS8Parser::readFRAM(), WPS8Table::readMCLD(), WPS8TextStyle::readParagraph(), WPS8TextStyle::readSGP(), WPS8Text::textZonesDataParser(), and WPS8Text::tokenEndDataParser().