xyginext  0.2.0
Second generation of xygine game creation framework
Public Member Functions | Friends | List of all members
xy::ConfigProperty Class Referencefinal

Properties are a name / value pair which can only reside in configuration objects. More...

#include <ConfigFile.hpp>

Inheritance diagram for xy::ConfigProperty:
xy::ConfigItem

Public Member Functions

 ConfigProperty (const std::string &name, const std::string &value="")
 
template<typename T >
getValue () const
 Attempts to retrieve the value as the requested type. Valid types are : std::string, sf::Int32, float, bool, sf::Vector2f, sf::Vector3f, sf::FloatRect, sf::Color, xy::Vector4f.
 
void setValue (const std::string &v)
 
void setValue (sf::Int32 v)
 
void setValue (float v)
 
void setValue (bool v)
 
void setValue (sf::Vector2f v)
 
void setValue (sf::Vector2i v)
 
void setValue (sf::Vector2u v)
 
void setValue (sf::Vector3f v)
 
void setValue (sf::FloatRect)
 
void setValue (sf::Color)
 
void setValue (xy::Vector4f)
 
template<>
float getValue () const
 
template<>
bool getValue () const
 
- Public Member Functions inherited from xy::ConfigItem
 ConfigItem (const std::string &name)
 
 ConfigItem (const ConfigItem &)=default
 
ConfigItemoperator= (const ConfigItem &)=default
 
 ConfigItem (ConfigItem &&)=default
 
ConfigItemoperator= (ConfigItem &&)=default
 
const std::string & getName () const
 Returns the name of this item.
 

Friends

class ConfigObject
 

Additional Inherited Members

- Protected Member Functions inherited from xy::ConfigItem
void setParent (ConfigItem *parent)
 
ConfigItemgetParent () const
 
void setName (const std::string &name)
 

Detailed Description

Properties are a name / value pair which can only reside in configuration objects.