uicore::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

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

Constructs a property parser for the specified property names.

virtual uicore::StylePropertyParser::~StylePropertyParser ( )
inlinevirtual

Member Function Documentation

static void uicore::StylePropertyParser::debug_parse_error ( const std::string name,
const std::vector< StyleToken > &  tokens 
)
staticprotected
static bool uicore::StylePropertyParser::equals ( const std::string s1,
const std::string s2 
)
staticprotected
static bool uicore::StylePropertyParser::is_angle ( const StyleToken token)
staticprotected
static bool uicore::StylePropertyParser::is_frequency ( const StyleToken token)
staticprotected
static bool uicore::StylePropertyParser::is_length ( const StyleToken token)
staticprotected
static bool uicore::StylePropertyParser::is_resolution ( const StyleToken token)
staticprotected
static bool uicore::StylePropertyParser::is_time ( const StyleToken token)
staticprotected
static StyleToken uicore::StylePropertyParser::next_token ( size_t &  pos,
const std::vector< StyleToken > &  tokens,
bool  skip_whitespace = true 
)
staticprotected
virtual void uicore::StylePropertyParser::parse ( StylePropertySetter setter,
const std::string name,
StyleParser parser 
)
pure virtual

Parse a property and set property values if successful.

static bool uicore::StylePropertyParser::parse_angle ( const StyleToken token,
StyleSetValue out_angle 
)
staticprotected
static bool uicore::StylePropertyParser::parse_color ( const std::vector< StyleToken > &  tokens,
size_t &  in_out_pos,
Colorf out_color 
)
staticprotected
static bool uicore::StylePropertyParser::parse_frequency ( const StyleToken token,
StyleSetValue out_frequency 
)
staticprotected
static bool uicore::StylePropertyParser::parse_gradient ( const std::vector< StyleToken > &  tokens,
size_t &  in_out_pos,
StyleGradient out_gradient 
)
staticprotected
static bool uicore::StylePropertyParser::parse_integer ( const std::string value,
int &  out_int 
)
staticprotected
static bool uicore::StylePropertyParser::parse_length ( const StyleToken token,
StyleSetValue out_length 
)
staticprotected
static bool uicore::StylePropertyParser::parse_position ( const std::vector< StyleToken > &  tokens,
size_t &  in_out_pos,
StyleSetValue out_position_x,
StyleSetValue out_position_y 
)
staticprotected
static bool uicore::StylePropertyParser::parse_resolution ( const StyleToken token,
StyleSetValue out_resolution 
)
staticprotected
static bool uicore::StylePropertyParser::parse_time ( const StyleToken token,
StyleSetValue out_time 
)
staticprotected

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