BasicStyleOption< T > Class Template Reference

#include <Pt/Forms/StyleOptions.h>

Typed style option that stores a value of type T. More...

Inherits StyleOption.

Public Member Functions

const T & value () const
 Returns the stored value.
 
void setValue (const T &v)
 Sets the value (does not bump generation).
 
BasicStyleOptionoperator= (const BasicStyleOption &o)
 Copies the value only.
 
virtual const std::type_info & typeInfo () const
 Returns the dynamic type of the stored value.
 
virtual const Pt::Anyget () const
 Returns the current value wrapped in an Any.
 
virtual void set (const Pt::Any &v)
 Sets the value from an Any; throws std::bad_cast on type mismatch.
 
const char * name () const
 Returns the option name.
 

Detailed Description

template<typename T>
class Pt::Forms::BasicStyleOption< T >

Only mutated through StyleOptions setters, which bump the generation counter. Copy ctor and operator= preserve the value as-is.