STK++ 1.0
STK::Category Class Reference

The Category class specifies a category in FreeMiner's tool box component. More...

#include <STK_Category.h>

Collaboration diagram for STK::Category:

List of all members.

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< Tooltool_list_
 list of the Tool in the Category

Detailed Description

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.


Member Enumeration Documentation

Type of the category.

Enumerator:
Default 

Default : the category is frozen.

Scratchpad 

Scratchpad : the category can be modified.

Definition at line 58 of file STK_Category.h.


Constructor & Destructor Documentation

STK::Category::Category ( String const &  aname = String(),
Type  atype = Default 
)

Constructor.

Parameters:
anamethe name of the Category
atypethe Type of the Category

Definition at line 47 of file STK_Category.cpp.

                  : name_(aname), type_(atype)
{}
STK::Category::~Category ( ) [virtual]

Destructor.

Definition at line 51 of file STK_Category.cpp.

{ }

Member Function Documentation

String const& STK::Category::name ( ) const [inline]

Give the name of the Category.

Returns:
the name of the Category

Definition at line 79 of file STK_Category.h.

References name_.

    { return name_;}
void STK::Category::setName ( String const &  aname) [inline]

Set the name of the Category.

Parameters:
anamethe 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

Returns:
the number of Toool 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();}

Here is the call graph for this function:

Tool STK::Category::tool ( int  idx) const [inline]

Return a copy of the Tool with the given index.

Parameters:
idxthe index of the tool
Returns:
the tool with the given index

Definition at line 98 of file STK_Category.h.

References STK::List1D< TYPE >::elt(), and tool_list_.

    { return tool_list_.elt(idx);}

Here is the call graph for this function:

void STK::Category::removeTool ( int  idx) [inline]

remove the Tool with the given index

Parameters:
idxthe 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);}

Here is the call graph for this function:

void STK::Category::addTool ( const Tool atool) [inline]

Add a Tool to the Category.

Parameters:
atoolthe 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);}

Here is the call graph for this function:

Type STK::Category::type ( ) const [inline]

Give the Type of the Category.

Returns:
the Type of the Category

Definition at line 116 of file STK_Category.h.

References type_.

    { return type_;}
void STK::Category::setType ( Type  atype) [inline]

Set the Type of the Category.

Parameters:
atypethe Type to set

Definition at line 122 of file STK_Category.h.

References type_.

    { type_ = atype;}
bool STK::Category::isNull ( ) const [inline]
Returns:
true if the category does not have a name

Definition at line 127 of file STK_Category.h.

References name_.

    { return name_.empty();}

Member Data Documentation

name of the Category

Definition at line 134 of file STK_Category.h.

Referenced by isNull(), name(), and setName().

type of the Category

Definition at line 138 of file STK_Category.h.

Referenced by setType(), and type().

list of the Tool in the Category

Definition at line 142 of file STK_Category.h.

Referenced by addTool(), removeTool(), tool(), and toolCount().


The documentation for this class was generated from the following files: