25 #ifndef WITEMSELECTIONITEMTYPED_H
26 #define WITEMSELECTIONITEMTYPED_H
31 #include <boost/shared_ptr.hpp>
33 #include "WItemSelectionItem.h"
42 template<
typename T >
49 typedef boost::shared_ptr< WItemSelectionItemTyped< T > >
SPtr;
54 typedef boost::shared_ptr< const WItemSelectionItemTyped< T > >
ConstSPtr;
92 static SPtr
create( T value, std::string name, std::string description =
"",
const char** icon = NULL )
134 #endif // WITEMSELECTIONITEMTYPED_H
boost::shared_ptr< const WItemSelectionItemTyped< T > > ConstSPtr
Abbreviation for a const shared pointer.
T m_value
Value which is stored by this item.
WItemSelectionItemTyped(T value, std::string name, std::string description="", const char **icon=NULL)
Constructs a new item with the specified values.
virtual ~WItemSelectionItemTyped()
Destruction.
static SPtr create(T value, std::string name, std::string description="", const char **icon=NULL)
Create a instance of the item.
T ValueType
The type of the value stored in here.
A derivation of WItemSelection which can store a value of any type.
void setValue(T value)
Sets a new value, which is associated with this item.
boost::shared_ptr< WItemSelectionItemTyped< T > > SPtr
Abbreviation for a shared pointer.
T getValue()
Returns the value.
Class for keeping a single named item in a WItemSelection.
const T getValue() const
Returns the value.