Rocket::Core::PropertyDefinition Class Reference

#include <PropertyDefinition.h>

Collaboration diagram for Rocket::Core::PropertyDefinition:

Public Member Functions

 PropertyDefinition (const String &default_value, bool inherited, bool forces_layout)
PropertyDefinitionAddParser (const String &parser_name, const String &parser_parameters="")
bool ParseValue (Property &property, const String &value) const
bool GetValue (String &value, const Property &property) const
bool IsInherited () const
 Returns true if this property is inherited from parent to child elements.
bool IsLayoutForced () const
 Returns true if this property forces a re-layout when changed.
const PropertyGetDefaultValue () const
 Returns the default defined for this property.

Data Structures

struct  ParserState

Detailed Description

Author:
Peter Curry

Member Function Documentation

PropertyDefinition & Rocket::Core::PropertyDefinition::AddParser ( const String parser_name,
const String parser_parameters = "" 
)

Registers a parser to parse values for this definition.

Parameters:
[in] parser_name The name of the parser (default parsers are 'string', 'keyword', 'number' and 'colour').
[in] parser_parameters A comma-separated list of validation parameters for the parser.
Returns:
This property definition.

bool Rocket::Core::PropertyDefinition::ParseValue ( Property property,
const String value 
) const

Called when parsing a RCSS declaration.

Parameters:
property[out] The property to set the parsed value onto.
value[in] The raw value defined for this property.
Returns:
True if all values were parsed successfully, false otherwise.

bool Rocket::Core::PropertyDefinition::GetValue ( String value,
const Property property 
) const

Called to convert a parsed property back into a value.

Parameters:
value[out] The string to return the value in.
property[in] The processed property to parse.
Returns:
True if the property was reverse-engineered successfully, false otherwise.


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