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()

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

◆ equals()

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

◆ is_angle()

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

◆ is_frequency()

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

◆ is_length()

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

◆ is_resolution()

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

◆ is_time()

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

◆ next_token()

static 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()

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

◆ parse_color()

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

◆ parse_frequency()

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

◆ parse_gradient()

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

◆ parse_integer()

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

◆ parse_length()

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

◆ parse_position()

static 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()

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

◆ parse_time()

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

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