|
STK++ 1.0
|
The Category class specifies a category in FreeMiner's tool box component. More...
#include <STK_Category.h>

Public Types | |
| enum | Type { Default, Scratchpad } |
| Type of the category. More... | |
Public Member Functions | |
| Category (String const &aname=String(), Type atype=Default) | |
| Constructor. | |
| virtual | ~Category () |
| Destructor. | |
| String const & | name () const |
| Give the name of the Category. | |
| void | setName (String const &aname) |
| Set the name of the Category. | |
| int | toolCount () const |
| count the number fo Tool in the Category | |
| Tool | tool (int idx) const |
| Return a copy of the Tool with the given index. | |
| void | removeTool (int idx) |
| remove the Tool with the given index | |
| void | addTool (const Tool &atool) |
| Add a Tool to the Category. | |
| Type | type () const |
| Give the Type of the Category. | |
| void | setType (Type atype) |
| Set the Type of the Category. | |
| bool | isNull () const |
Private Attributes | |
| String | name_ |
| name of the Category | |
| Type | type_ |
| type of the Category | |
| List1D< Tool > | tool_list_ |
| list of the Tool in the Category | |
The Category class specifies a category in FreeMiner's tool box component.
Each Category contain a set of Tool with similar properties.
Definition at line 52 of file STK_Category.h.
| enum STK::Category::Type |
Type of the category.
| Default |
Default : the category is frozen. |
| Scratchpad |
Scratchpad : the category can be modified. |
Definition at line 58 of file STK_Category.h.
{
Default,
Scratchpad
};
| STK::Category::~Category | ( | ) | [virtual] |
| String const& STK::Category::name | ( | ) | const [inline] |
| void STK::Category::setName | ( | String const & | aname | ) | [inline] |
Set the name of the Category.
| aname | the name to set |
Definition at line 85 of file STK_Category.h.
References name_.
{ name_ = aname;}
| int STK::Category::toolCount | ( | ) | const [inline] |
count the number fo Tool in the Category
Definition at line 91 of file STK_Category.h.
References STK::ITContainer1D< TYPE, TContainer1D >::size(), and tool_list_.
{ return tool_list_.size();}

| Tool STK::Category::tool | ( | int | idx | ) | const [inline] |
Return a copy of the Tool with the given index.
| idx | the index of the tool |
Definition at line 98 of file STK_Category.h.
References STK::List1D< TYPE >::elt(), and tool_list_.
{ return tool_list_.elt(idx);}

| void STK::Category::removeTool | ( | int | idx | ) | [inline] |
remove the Tool with the given index
| idx | the index of the Tool to remove |
Definition at line 104 of file STK_Category.h.
References STK::List1D< TYPE >::erase(), and tool_list_.
{ tool_list_.erase(idx);}

| void STK::Category::addTool | ( | const Tool & | atool | ) | [inline] |
| atool | the Tool to add |
Definition at line 110 of file STK_Category.h.
References STK::ITContainer1D< TYPE, TContainer1D >::push_back(), and tool_list_.
{ tool_list_.push_back(atool);}

| Type STK::Category::type | ( | ) | const [inline] |
| void STK::Category::setType | ( | Type | atype | ) | [inline] |
Set the Type of the Category.
| atype | the Type to set |
Definition at line 122 of file STK_Category.h.
References type_.
{ type_ = atype;}
| bool STK::Category::isNull | ( | ) | const [inline] |
Definition at line 127 of file STK_Category.h.
References name_.
{ return name_.empty();}
String STK::Category::name_ [private] |
Type STK::Category::type_ [private] |
type of the Category
Definition at line 138 of file STK_Category.h.
List1D<Tool> STK::Category::tool_list_ [private] |
list of the Tool in the Category
Definition at line 142 of file STK_Category.h.
Referenced by addTool(), removeTool(), tool(), and toolCount().