Classes | Public Member Functions | Static Protected Member Functions | List of all members
clan::StylePropertyParser Class Referenceabstract

Style property parser. More...

`#include <style_property_parser.h>`

## Public Member Functions
| StylePropertyParser (const std::vector< std::string > &property_names)
| Constructs a property parser for the specified property names. More...
virtual | ~StylePropertyParser ()
virtual void | parse (StylePropertySetter *setter, const std::string &name, StyleParser &parser)=0
| Parse a property and set property values if successful. More...

## Static Protected Member Functions
static void | debug_parse_error (const std::string &name, const std::vector< StyleToken > &tokens)
static bool | equals (const std::string &s1, const std::string &s2)
static bool | is_angle (const StyleToken &token)
static bool | is_frequency (const StyleToken &token)
static bool | is_length (const StyleToken &token)
static bool | is_resolution (const StyleToken &token)
static bool | is_time (const StyleToken &token)
static StyleToken | next_token (size_t &pos, const std::vector< StyleToken > &tokens, bool skip_whitespace=true)
static bool | parse_angle (const StyleToken &token, StyleSetValue &out_angle)
static bool | parse_color (const std::vector< StyleToken > &tokens, size_t &in_out_pos, Colorf &out_color)
static bool | parse_frequency (const StyleToken &token, StyleSetValue &out_frequency)
static bool | parse_gradient (const std::vector< StyleToken > &tokens, size_t &in_out_pos, StyleGradient &out_gradient)
static bool | parse_integer (const std::string &value, int &out_int)
static bool | parse_length (const StyleToken &token, StyleSetValue &out_length)
static bool | parse_position (const std::vector< StyleToken > &tokens, size_t &in_out_pos, StyleSetValue &out_position_x, StyleSetValue &out_position_y)
static bool | parse_resolution (const StyleToken &token, StyleSetValue &out_resolution)
static bool | parse_time (const StyleToken &token, StyleSetValue &out_time)

## Detailed Description

Style property parser.

## Constructor & Destructor Documentation

clan::StylePropertyParser::StylePropertyParser | ( | const std::vector< std::string > & | property_names | ) |

Constructs a property parser for the specified property names.

virtual clan::StylePropertyParser::~StylePropertyParser | ( |  | ) |
| inline virtual

## Member Function Documentation

static void clan::StylePropertyParser::debug_parse_error | ( | const std::string & | name,
|  | const std::vector< StyleToken > & | tokens
| ) |  |
| static protected

static bool clan::StylePropertyParser::equals | ( | const std::string & | s1,
|  | const std::string & | s2
| ) |  |
| static protected

static bool clan::StylePropertyParser::is_angle | ( | const StyleToken & | token | ) |
| static protected

static bool clan::StylePropertyParser::is_frequency | ( | const StyleToken & | token | ) |
| static protected

static bool clan::StylePropertyParser::is_length | ( | const StyleToken & | token | ) |
| static protected

static bool clan::StylePropertyParser::is_resolution | ( | const StyleToken & | token | ) |
| static protected

static bool clan::StylePropertyParser::is_time | ( | const StyleToken & | token | ) |
| static protected

static StyleToken clan::StylePropertyParser::next_token | ( | size_t & | pos,
|  | const std::vector< StyleToken > & | tokens,
|  | bool | skip_whitespace = `true`
| ) |  |
| static protected

virtual void clan::StylePropertyParser::parse | ( | StylePropertySetter * | setter,
|  | const std::string & | name,
|  | StyleParser & | parser
| ) |  |
| pure virtual

Parse a property and set property values if successful.

static bool clan::StylePropertyParser::parse_angle | ( | const StyleToken & | token,
|  | StyleSetValue & | out_angle
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_color | ( | const std::vector< StyleToken > & | tokens,
|  | size_t & | in_out_pos,
|  | Colorf & | out_color
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_frequency | ( | const StyleToken & | token,
|  | StyleSetValue & | out_frequency
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_gradient | ( | const std::vector< StyleToken > & | tokens,
|  | size_t & | in_out_pos,
|  | StyleGradient & | out_gradient
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_integer | ( | const std::string & | value,
|  | int & | out_int
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_length | ( | const StyleToken & | token,
|  | StyleSetValue & | out_length
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_position | ( | const std::vector< StyleToken > & | tokens,
|  | size_t & | in_out_pos,
|  | StyleSetValue & | out_position_x,
|  | StyleSetValue & | out_position_y
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_resolution | ( | const StyleToken & | token,
|  | StyleSetValue & | out_resolution
| ) |  |
| static protected

static bool clan::StylePropertyParser::parse_time | ( | const StyleToken & | token,
|  | StyleSetValue & | out_time
| ) |  |
| static protected

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

- style_property_parser.h