libRocket
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
Rocket::Core::Property Class Reference

#include <Property.h>

Public Types

enum  Unit {
  UNKNOWN = 1 << 0, KEYWORD = 1 << 1, STRING = 1 << 2, NUMBER = 1 << 3,
  PX = 1 << 4, COLOUR = 1 << 5, ABSOLUTE_UNIT = NUMBER | PX | COLOUR, EM = 1 << 6,
  PERCENT = 1 << 7, INCH = 1 << 8, CM = 1 << 9, MM = 1 << 10,
  PT = 1 << 11, PC = 1 << 12, PPI_UNIT = INCH | CM | MM | PT | PC, REM = 1 << 13,
  RELATIVE_UNIT = EM | REM | PERCENT
}
 

Public Member Functions

 Property ()
 
template<typename PropertyType >
 Property (PropertyType value, Unit unit, int specificity=-1)
 
 ~Property ()
 
String ToString () const
 Get the value of the property as a string. More...
 
template<typename T >
T Get () const
 Templatised accessor. More...
 

Public Attributes

Variant value
 
Unit unit
 
int specificity
 
const PropertyDefinition * definition
 
int parser_index
 
String source
 
int source_line_number
 

Detailed Description

Author
Peter Curry

Member Enumeration Documentation

Enumerator
UNKNOWN 
KEYWORD 
STRING 
NUMBER 
PX 
COLOUR 
ABSOLUTE_UNIT 
EM 
PERCENT 
INCH 
CM 
MM 
PT 
PC 
PPI_UNIT 
REM 
RELATIVE_UNIT 

Constructor & Destructor Documentation

Rocket::Core::Property::Property ( )
template<typename PropertyType >
Rocket::Core::Property::Property ( PropertyType  value,
Unit  unit,
int  specificity = -1 
)
inline
Rocket::Core::Property::~Property ( )

Member Function Documentation

template<typename T >
T Rocket::Core::Property::Get ( ) const
inline

Templatised accessor.

String Rocket::Core::Property::ToString ( ) const

Get the value of the property as a string.

Member Data Documentation

const PropertyDefinition* Rocket::Core::Property::definition
int Rocket::Core::Property::parser_index
String Rocket::Core::Property::source
int Rocket::Core::Property::source_line_number
int Rocket::Core::Property::specificity
Unit Rocket::Core::Property::unit
Variant Rocket::Core::Property::value

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