SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
smtk::attribute::Categories Class Reference

Represents the category constraints associated with an Attribute, Attribute Definition, Item or Item Definition. More...

#include <Categories.h>

Classes

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, SMTK_DEPRECATED_IN_22_07 =("Please use Or") = Or,
  SMTK_DEPRECATED_IN_22_07 =("Please use And") = And
}
 

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< Setsets () const
 Return the sets contained 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 Set &set)
 Insert either a Categories::Set or the sets of another Categories instance into this instance.
 
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 bool combinationModeFromString (const std::string &val, Set::CombinationMode &mode)
 

Detailed Description

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.

Member Enumeration Documentation

◆ CombinationMode

Enumerator
Or 

Represents logical Or.

And 

Represents logical And.

LocalOnly 

Indicates no further processing of Category Set Pairs is required.


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