clan::StylePropertyParser Class Reference - ClanLib SDK
Description: clan::StylePropertyParser Class Reference

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.
virtual | ~StylePropertyParser ()
virtual void | parse (StylePropertySetter *setter, const std::string &name, StyleParser &parser)=0
| Parse a property and set property values if successful.

## 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

## ◆ StylePropertyParser()

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

Constructs a property parser for the specified property names.

## ◆ ~StylePropertyParser()

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

## Member Function Documentation

## ◆ debug_parse_error()

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

## ◆ equals()

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

## ◆ is_angle()

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

## ◆ is_frequency()

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

## ◆ is_length()

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

## ◆ is_resolution()

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

## ◆ is_time()

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

## ◆ next_token()

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

## ◆ parse()

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

Parse a property and set property values if successful.

## ◆ parse_angle()

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

## ◆ parse_color()

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

## ◆ parse_frequency()

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

## ◆ parse_gradient()

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

## ◆ parse_integer()

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

## ◆ parse_length()

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

## ◆ parse_position()

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

## ◆ parse_resolution()

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

## ◆ parse_time()

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

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

- style_property_parser.h