TGUI  0.8-dev
tgui::ObjectConverter Class Reference

Implicit converter for settable properties. More...

#include <ObjectConverter.hpp>

Public Member Functions

 ObjectConverter ()
 Default constructor, to create an empty object.
 
 ObjectConverter (const sf::String &string)
 Stores a string for later retrieval. More...
 
 ObjectConverter (Font font)
 Stores a font object for later retrieval. More...
 
 ObjectConverter (sf::Color color)
 Stores a color object for later retrieval. More...
 
 ObjectConverter (Color color)
 Stores a color object for later retrieval. More...
 
 ObjectConverter (float number)
 Stores a number for later retrieval. More...
 
 ObjectConverter (const Outline &outline)
 Stores a outline object for later retrieval. More...
 
 ObjectConverter (const Texture &texture)
 Stores a texture object for later retrieval. More...
 
 ObjectConverter (sf::Text::Style style)
 Stores a text style for later retrieval. More...
 
 ObjectConverter (TextStyle style)
 Stores a text style for later retrieval. More...
 
 ObjectConverter (std::shared_ptr< RendererData > data)
 Stores render data for later retrieval. More...
 
const sf::String & getString ()
 Retrieves the saved string. More...
 
const FontgetFont ()
 Retrieves the saved font. More...
 
const ColorgetColor ()
 Retrieves the saved color. More...
 
const OutlinegetOutline ()
 Retrieves the saved outline. More...
 
float getNumber ()
 Retrieves the saved number. More...
 
TexturegetTexture ()
 Retrieves the saved texture. More...
 
const TextStylegetTextStyle ()
 Retrieves the saved text style. More...
 
const std::shared_ptr< RendererData > & getRenderer ()
 Retrieves the saved renderer data. More...
 
Type getType () const
 Retrieves the type of the object that has been stored. More...
 

Detailed Description

Implicit converter for settable properties.

Constructor & Destructor Documentation

§ ObjectConverter() [1/10]

tgui::ObjectConverter::ObjectConverter ( const sf::String &  string)
inline

Stores a string for later retrieval.

Parameters
stringString to store

§ ObjectConverter() [2/10]

tgui::ObjectConverter::ObjectConverter ( Font  font)
inline

Stores a font object for later retrieval.

Parameters
fontFont to store

§ ObjectConverter() [3/10]

tgui::ObjectConverter::ObjectConverter ( sf::Color  color)
inline

Stores a color object for later retrieval.

Parameters
colorColor to store

§ ObjectConverter() [4/10]

tgui::ObjectConverter::ObjectConverter ( Color  color)
inline

Stores a color object for later retrieval.

Parameters
colorColor to store

§ ObjectConverter() [5/10]

tgui::ObjectConverter::ObjectConverter ( float  number)
inline

Stores a number for later retrieval.

Parameters
numberNumber to store

§ ObjectConverter() [6/10]

tgui::ObjectConverter::ObjectConverter ( const Outline outline)
inline

Stores a outline object for later retrieval.

Parameters
outlineOutline to store

§ ObjectConverter() [7/10]

tgui::ObjectConverter::ObjectConverter ( const Texture texture)
inline

Stores a texture object for later retrieval.

Parameters
textureTexture to store

§ ObjectConverter() [8/10]

tgui::ObjectConverter::ObjectConverter ( sf::Text::Style  style)
inline

Stores a text style for later retrieval.

Parameters
styleText style to store

To combine multiple text styles, wrap the value inside the TextStyle object before passing it.

§ ObjectConverter() [9/10]

tgui::ObjectConverter::ObjectConverter ( TextStyle  style)
inline

Stores a text style for later retrieval.

Parameters
styleText style to store

§ ObjectConverter() [10/10]

tgui::ObjectConverter::ObjectConverter ( std::shared_ptr< RendererData data)
inline

Stores render data for later retrieval.

Parameters
dataRenderer data to store

Member Function Documentation

§ getColor()

const Color& tgui::ObjectConverter::getColor ( )

Retrieves the saved color.

Returns
The saved color

This function will assert when something other than a color was saved

§ getFont()

const Font& tgui::ObjectConverter::getFont ( )

Retrieves the saved font.

Returns
The saved font

This function will assert when something other than a font was saved

§ getNumber()

float tgui::ObjectConverter::getNumber ( )

Retrieves the saved number.

Returns
The saved number

This function will assert when something other than a number was saved

§ getOutline()

const Outline& tgui::ObjectConverter::getOutline ( )

Retrieves the saved outline.

Returns
The saved outline

This function will assert when something other than a outline was saved

§ getRenderer()

const std::shared_ptr<RendererData>& tgui::ObjectConverter::getRenderer ( )

Retrieves the saved renderer data.

Returns
Saved renderer data

This function will assert when something other than a renderer data was saved

§ getString()

const sf::String& tgui::ObjectConverter::getString ( )

Retrieves the saved string.

Returns
The saved string or a serialized string

§ getTextStyle()

const TextStyle& tgui::ObjectConverter::getTextStyle ( )

Retrieves the saved text style.

Returns
Saved text style

This function will assert when something other than a text style was saved

§ getTexture()

Texture& tgui::ObjectConverter::getTexture ( )

Retrieves the saved texture.

Returns
The saved texture

This function will assert when something other than a texture was saved

§ getType()

Type tgui::ObjectConverter::getType ( ) const

Retrieves the type of the object that has been stored.

Returns
The stored object type

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