SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Represents the category constraints associated with an Attribute, Attribute Definition, Item or Item Definition. More...
#include <Categories.h>
Classes | |
class | Expression |
class | Set |
Categories::Set represents a single category constraint used by the Categories class. More... | |
class | Stack |
Public Types | |
enum | CombinationMode { CombinationMode::Or = 0, CombinationMode::And = 1, CombinationMode::LocalOnly = 2 } |
Public Member Functions | |
void | reset () |
Remove all stacks from this instance. | |
std::size_t | size () const |
Return the number of stacks in this instance. | |
const std::set< Stack > & | stacks () const |
Return the stacks contained in this instance. | |
std::set< std::string > | categoryNames () const |
Return a set of all category names referenced in all of the instance's stacks. | |
std::string | convertToString () const |
produce a formatted string representing the Categories' information. | |
void | print () const |
Print to cerr the current contents of the instance. | |
bool | passes (const std::set< std::string > &cats) const |
Returns true if atleast one of its sets passes its check. | |
bool | passes (const std::string &cat) const |
Returns true if atleast one of its sets passes its check. | |
bool | insert (const Stack &stack) |
Insert either a Categories::Set or the sets of another Categories instance into this instance. | |
void | insert (const Categories &cats) |
Insert either a Categories::Set or the sets of another Categories instance into this instance. | |
Static Public Member Functions | |
static std::string | combinationModeAsString (Set::CombinationMode mode) |
static std::string | combinationModeAsSymbol (Set::CombinationMode mode) |
static bool | combinationModeFromString (const std::string &val, Set::CombinationMode &mode) |
static bool | combinationModeStringToSymbol (const std::string &val, std::string &symbol) |
Represents the category constraints associated with an Attribute, Attribute Definition, Item or Item Definition.
Categories is composed of a set of Category Sets. Each set represents a single category constraint. The overall category constraint represented by Categories "or's" the result from its constraint sets. Therefore, the Categories' constraint is satisfied if at least one of its Sets' constraint is satisfied.
|
strong |
Enumerator | |
---|---|
Or | Represents logical Or. |
And | Represents logical And. |
LocalOnly | Indicates no further processing of Category Set Pairs is required. |