OpenWalnut
1.2.5
|
Class for keeping a single named item in a WItemSelection. More...
#include <WItemSelectionItem.h>
Public Member Functions | |
WItemSelectionItem (std::string name, std::string description="", const char **icon=NULL) | |
Constructs a new item with the specified values. | |
virtual | ~WItemSelectionItem () |
Destruction. | |
std::string | getName () const |
Returns the name of the item. | |
std::string | getDescription () const |
The description of the item. | |
const char ** | getIcon () const |
The icon associated with this item. | |
bool | operator== (const WItemSelectionItem &other) const |
Compares this and another item using their names only. | |
Protected Attributes | |
std::string | m_name |
Item name. | |
std::string | m_description |
Item description. | |
const char ** | m_icon |
Item icon. |
Class for keeping a single named item in a WItemSelection.
Definition at line 35 of file WItemSelectionItem.h.
WItemSelectionItem::WItemSelectionItem | ( | std::string | name, |
std::string | description = "" , |
||
const char ** | icon = NULL |
||
) |
Constructs a new item with the specified values.
name | Name of item. |
description | Description, can be empty. |
icon | Icon, can be NULL. |
Definition at line 29 of file WItemSelectionItem.cpp.
WItemSelectionItem::~WItemSelectionItem | ( | ) | [virtual] |
std::string WItemSelectionItem::getDescription | ( | ) | const |
The description of the item.
Definition at line 47 of file WItemSelectionItem.cpp.
References m_description.
const char ** WItemSelectionItem::getIcon | ( | ) | const |
The icon associated with this item.
Can be NULL.
Definition at line 52 of file WItemSelectionItem.cpp.
References m_icon.
std::string WItemSelectionItem::getName | ( | ) | const |
Returns the name of the item.
Definition at line 42 of file WItemSelectionItem.cpp.
References m_name.
bool WItemSelectionItem::operator== | ( | const WItemSelectionItem & | other | ) | const |
Compares this and another item using their names only.
other | the second to compare the this one with |
Definition at line 57 of file WItemSelectionItem.cpp.
References m_name.
std::string WItemSelectionItem::m_description [protected] |
Item description.
Definition at line 93 of file WItemSelectionItem.h.
Referenced by getDescription().
const char** WItemSelectionItem::m_icon [protected] |
std::string WItemSelectionItem::m_name [protected] |
Item name.
Definition at line 88 of file WItemSelectionItem.h.
Referenced by getName(), and operator==().