libetonyek::KEY2ParserUtils Class Reference documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
libetonyek::KEY2ParserUtils Class Reference

A "mixin" containing a set of helper functions used in parser classes. More...

`#include <KEY2ParserUtils.h>`

Inheritance diagram for libetonyek::KEY2ParserUtils:

## Public Member Functions
virtual | ~KEY2ParserUtils ()

## Static Public Member Functions
static boost::optional< ID_t > | readID (const KEYXMLReader &reader)
| Read sfa:ID attribute of an element. More...
static ID_t | readRef (const KEYXMLReader &reader)
| Read a reference element. More...
static std::pair< boost::optional< double >, boost::optional< double > > | readPoint (const KEYXMLReader &reader)
| Read sf:point element. More...
static KEYPosition | readPosition (const KEYXMLReader &reader)
| Read sf:position element. More...
static KEYSize | readSize (const KEYXMLReader &reader)
| Read sf:size element. More...
static bool | bool_cast (const char *value)
| Convert string value to bool. More...
static double | double_cast (const char *value)
static int | int_cast (const char *value)
static double | deg2rad (double value)

## Protected Member Functions
| KEY2ParserUtils ()

## Private Member Functions
| KEY2ParserUtils (const KEY2ParserUtils &other)
KEY2ParserUtils & | operator= (const KEY2ParserUtils &other)

## Detailed Description

A "mixin" containing a set of helper functions used in parser classes.

KEY2Parser, KEY2StyleParser

## Constructor & Destructor Documentation

libetonyek::KEY2ParserUtils::KEY2ParserUtils | ( | const KEY2ParserUtils & | other | ) |
| private

libetonyek::KEY2ParserUtils::~KEY2ParserUtils | ( |  | ) |
| virtual

libetonyek::KEY2ParserUtils::KEY2ParserUtils | ( |  | ) |
| protected

## Member Function Documentation

bool libetonyek::KEY2ParserUtils::bool_cast | ( | const char * | value | ) |
| static

Convert string value to bool.

- value the string
  Returns
    the boolean value of the string

Referenced by libetonyek::KEY2Parser::parseCallout2Path(), libetonyek::KEY2Parser::parseGeometry(), libetonyek::KEY2Parser::parseImage(), and libetonyek::KEY2StyleParser::readGeometry().

double libetonyek::KEY2ParserUtils::deg2rad | ( | double | value | ) |
| static

Referenced by libetonyek::KEY2Parser::parseGeometry().

double libetonyek::KEY2ParserUtils::double_cast | ( | const char * | value | ) |
| static

int libetonyek::KEY2ParserUtils::int_cast | ( | const char * | value | ) |
| static

KEY2ParserUtils& libetonyek::KEY2ParserUtils::operator= | ( | const KEY2ParserUtils & | other | ) |
| private

optional< ID_t > libetonyek::KEY2ParserUtils::readID | ( | const KEYXMLReader & | reader | ) |
| static

Read sfa:ID attribute of an element.

ID is expected to be the only attribute.

- [in] reader the reader
  Returns
    the ID

Referenced by libetonyek::KEY2Parser::parseBezierPath(), libetonyek::KEY2Parser::parseConnectionLine(), libetonyek::KEY2Parser::parseConnectionPath(), libetonyek::KEY2Parser::parseFilteredImage(), libetonyek::KEY2Parser::parseGroup(), libetonyek::KEY2Parser::parseLayer(), libetonyek::KEY2Parser::parseLeveled(), libetonyek::KEY2Parser::parseLine(), libetonyek::KEY2Parser::parseMedia(), libetonyek::KEY2Parser::parsePlaceholder(), libetonyek::KEY2Parser::parseShape(), libetonyek::KEY2Parser::parseSlide(), libetonyek::KEY2Parser::parseStylesheet(), and libetonyek::KEY2Parser::parseUnfiltered().

pair< optional< double >, optional< double > > libetonyek::KEY2ParserUtils::readPoint | ( | const KEYXMLReader & | reader | ) |
| static

Read sf:point element.

- [in] reader the reader
  Returns
    a pair of "coordinates"

Referenced by libetonyek::KEY2Parser::parseConnectionPath(), and libetonyek::KEY2Parser::parsePointPath().

KEYPosition libetonyek::KEY2ParserUtils::readPosition | ( | const KEYXMLReader & | reader | ) |
| static

Read sf:position element.

- [in] reader the reader
  Returns
    the position

Referenced by libetonyek::KEY2Parser::parseGeometry(), libetonyek::KEY2Parser::parseLine(), and libetonyek::KEY2StyleParser::readGeometry().

ID_t libetonyek::KEY2ParserUtils::readRef | ( | const KEYXMLReader & | reader | ) |
| static

Read a reference element.

It is expected that the element is empty and does have a single attribute: sfa:IDREF.

- [in] reader the reader
  Returns
    the value of the sfa:IDREF attribute
  Exceptions

    a | GenericException if sfa:IDREF attribute is not present

Referenced by libetonyek::KEY2Parser::parseBezierPath(), libetonyek::KEY2Parser::parseDrawables(), libetonyek::KEY2Parser::parseFilteredImage(), libetonyek::KEY2Parser::parseOtherDatas(), libetonyek::KEY2Parser::parsePlaceholder(), libetonyek::KEY2StyleParser::parsePropertyImpl(), libetonyek::KEY2Parser::parseStyles(), and libetonyek::KEY2Parser::parseStylesheet().

KEYSize libetonyek::KEY2ParserUtils::readSize | ( | const KEYXMLReader & | reader | ) |
| static

Read sf:size element.

- [in] reader the reader
  Returns
    the size

Referenced by libetonyek::KEY2Parser::parseCallout2Path(), libetonyek::KEY2Parser::parseConnectionPath(), libetonyek::KEY2Parser::parseFiltered(), libetonyek::KEY2Parser::parseGeometry(), libetonyek::KEY2Parser::parsePage(), libetonyek::KEY2Parser::parsePointPath(), libetonyek::KEY2Parser::parseScalarPath(), libetonyek::KEY2Parser::parseTheme(), libetonyek::KEY2Parser::parseUnfiltered(), libetonyek::KEY2Parser::processXmlNode(), and libetonyek::KEY2StyleParser::readGeometry().

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

- KEY2ParserUtils.h
- KEY2ParserUtils.cpp