|
OpenWalnut 1.3.1
|
A derivation of WItemSelection which can store a value of any type. More...
#include <WItemSelectionItemTyped.h>
Inheritance diagram for WItemSelectionItemTyped< T >:Public Types | |
| typedef boost::shared_ptr < WItemSelectionItemTyped< T > > | SPtr |
| Abbreviation for a shared pointer. | |
| typedef boost::shared_ptr < const WItemSelectionItemTyped< T > > | ConstSPtr |
| Abbreviation for a const shared pointer. | |
| typedef T | ValueType |
| The type of the value stored in here. | |
Public Member Functions | |
| WItemSelectionItemTyped (T value, std::string name, std::string description="", const char **icon=NULL) | |
| Constructs a new item with the specified values. | |
| virtual | ~WItemSelectionItemTyped () |
| Destruction. | |
| const T | getValue () const |
| Returns the value. | |
| T | getValue () |
| Returns the value. | |
| void | setValue (T value) |
| Sets a new value, which is associated with this item. | |
Static Public Member Functions | |
| static SPtr | create (T value, std::string name, std::string description="", const char **icon=NULL) |
| Create a instance of the item. | |
Private Attributes | |
| T | m_value |
| Value which is stored by this item. | |
A derivation of WItemSelection which can store a value of any type.
| the | type to encapsulate |
Definition at line 43 of file WItemSelectionItemTyped.h.
| typedef boost::shared_ptr< const WItemSelectionItemTyped< T > > WItemSelectionItemTyped< T >::ConstSPtr |
Abbreviation for a const shared pointer.
Reimplemented from WItemSelectionItem.
Definition at line 54 of file WItemSelectionItemTyped.h.
| typedef boost::shared_ptr< WItemSelectionItemTyped< T > > WItemSelectionItemTyped< T >::SPtr |
Abbreviation for a shared pointer.
Reimplemented from WItemSelectionItem.
Definition at line 49 of file WItemSelectionItemTyped.h.
| typedef T WItemSelectionItemTyped< T >::ValueType |
The type of the value stored in here.
Definition at line 59 of file WItemSelectionItemTyped.h.
| WItemSelectionItemTyped< T >::WItemSelectionItemTyped | ( | T | value, |
| std::string | name, | ||
| std::string | description = "", |
||
| const char ** | icon = NULL |
||
| ) | [inline] |
Constructs a new item with the specified values.
| value | Value which is stored by the item. |
| name | Name of item. |
| description | Description, can be empty. |
| icon | Icon, can be NULL. |
Definition at line 69 of file WItemSelectionItemTyped.h.
| virtual WItemSelectionItemTyped< T >::~WItemSelectionItemTyped | ( | ) | [inline, virtual] |
| static SPtr WItemSelectionItemTyped< T >::create | ( | T | value, |
| std::string | name, | ||
| std::string | description = "", |
||
| const char ** | icon = NULL |
||
| ) | [inline, static] |
Create a instance of the item.
This shortens the rather long call which would be needed to create a shared pointer of this class.
| value | the value to store in the instance |
| name | the name of item |
| description | Description of the item. Can be empty. |
| icon | the icon of the item. Can be NULL. |
Definition at line 92 of file WItemSelectionItemTyped.h.
| const T WItemSelectionItemTyped< T >::getValue | ( | ) | const [inline] |
Returns the value.
This const version is especially useful when using reference types for T.
Definition at line 102 of file WItemSelectionItemTyped.h.
References WItemSelectionItemTyped< T >::m_value.
| T WItemSelectionItemTyped< T >::getValue | ( | ) | [inline] |
Returns the value.
Definition at line 112 of file WItemSelectionItemTyped.h.
References WItemSelectionItemTyped< T >::m_value.
| void WItemSelectionItemTyped< T >::setValue | ( | T | value | ) | [inline] |
Sets a new value, which is associated with this item.
| value | new value which should be stored by this item. |
Definition at line 122 of file WItemSelectionItemTyped.h.
References WItemSelectionItemTyped< T >::m_value.
T WItemSelectionItemTyped< T >::m_value [private] |
Value which is stored by this item.
Definition at line 131 of file WItemSelectionItemTyped.h.
Referenced by WItemSelectionItemTyped< T >::getValue(), and WItemSelectionItemTyped< T >::setValue().
1.7.4