MeVisLab Toolbox Reference
|
This handles rules like the maximum number of CSOs in a group and applies them. More...
#include <CSOGroupRules.h>
Public Member Functions | |
CSOGroupRules (unsigned int numMaxCSOs=0) | |
Constructor. More... | |
~CSOGroupRules () | |
Destructor. More... | |
void | reset () |
Sets default values to all members. More... | |
void | setNumMaximumCSOs (unsigned int numMaxCSOs) |
Sets the maximum number of CSOs allowed in the group where the rules are applied to. More... | |
unsigned int | getNumMaximumCSOs () const |
Returns the maximum number of CSOs. More... | |
void | setOverflowHandling (CSOGroupOverflowHandling handling) |
Sets the overflow handling, i.e. what has to done when one wants to add CSO and _numMaxCSOs is reached. More... | |
CSOGroupOverflowHandling | getOverflowHandling () const |
Returns the _overflowHandling mode. More... | |
void | setRemoveFromGroupHandling (CSORemoveHandling handling) |
Sets the handling mode for CSOs that are removed from the group, i.e. should they also be removed from the list... More... | |
CSORemoveHandling | getRemoveFromGroupHandling () const |
Returns the _removeFromGroupHandling mode. More... | |
void | setDeleteGroupCSOHandling (CSORemoveHandling handling) |
Sets the handling mode for CSOs when this group is deleted, i.e. should they also be removed from the list... More... | |
CSORemoveHandling | getDeleteGroupCSOHandling () const |
Returns the _deleteGroupCSOHandling mode. More... | |
bool | mayAddCSO (CSOGroup &csoGroup) const |
Checks if one could add a CSO to the group csoGroup. More... | |
void | applyTo (CSOGroup &csoGroup) |
Applies the rules to the csoGroup . More... | |
CSO * | addNewCSO (CSOGroup &csoGroup, bool useUndoRedo=true) |
Adds a new CSO to the csoGroup according to the rules. More... | |
bool | addCSO (CSO &cso, CSOGroup &csoGroup, bool useUndoRedo=true) |
Adds the given cso to the given csoGroup if the rules allow that. More... | |
void | removeCSO (CSO &cso, CSOGroup &csoGroup, bool useUndoRedo=true) |
Removes a CSO from the csoGroup according to the rules. More... | |
void | applyDeletionRule (CSOGroup &csoGroup) |
Applies the delete group rules to the csoGroup . More... | |
void | applyRemoveFromGroupRule (CSO &cso, bool useUndoRedo) |
Applies the remove from group rule to the cso (Is is executed anytime a cso is removed from the group) More... | |
Static Public Member Functions | |
static unsigned int | getDefaultNumMaximumCSOs () |
Returns the default value for the maximum amount of CSOs in a group. More... | |
static CSOGroupOverflowHandling | getDefaultOverflowHandling () |
Returns the default overflow handling for a group. More... | |
static CSORemoveHandling | getDefaultRemoveFromGroupHandling () |
Returns the default handling for removal from groups. More... | |
static CSORemoveHandling | getDefaultDeleteGroupCSOHandling () |
Returns the default handling for removal from groups. More... | |
Protected Member Functions | |
void | _removeAllCSO (CSOGroup &csoGroup, bool useUndoRedo=true) |
Removes all CSOs from the csoGroup according to the rules. More... | |
void | _combineCSOAndGroup (CSO &cso, CSOGroup &csoGroup) |
establishes bidirectional link between given cso and group More... | |
void | _breakCSOandGroup (CSO &cso, CSOGroup &csoGroup) |
removes bidirectional link between given cso and group More... | |
This handles rules like the maximum number of CSOs in a group and applies them.
Definition at line 57 of file CSOGroupRules.h.
ml::CSOGroupRules::CSOGroupRules | ( | unsigned int | numMaxCSOs = 0 | ) |
Constructor.
ml::CSOGroupRules::~CSOGroupRules | ( | ) |
Destructor.
removes bidirectional link between given cso and group
establishes bidirectional link between given cso and group
|
protected |
Removes all CSOs from the csoGroup
according to the rules.
Adds the given cso
to the given csoGroup
if the rules allow that.
Returns whether the operation was successful.
Adds a new CSO to the csoGroup
according to the rules.
void ml::CSOGroupRules::applyDeletionRule | ( | CSOGroup & | csoGroup | ) |
Applies the delete group rules to the csoGroup
.
void ml::CSOGroupRules::applyRemoveFromGroupRule | ( | CSO & | cso, |
bool | useUndoRedo | ||
) |
Applies the remove from group rule to the cso
(Is is executed anytime a cso is removed from the group)
void ml::CSOGroupRules::applyTo | ( | CSOGroup & | csoGroup | ) |
Applies the rules to the csoGroup
.
|
inlinestatic |
Returns the default handling for removal from groups.
Definition at line 110 of file CSOGroupRules.h.
References ml::REMOVE_IF_IN_NO_GROUP.
|
inlinestatic |
Returns the default value for the maximum amount of CSOs in a group.
Definition at line 104 of file CSOGroupRules.h.
|
inlinestatic |
Returns the default overflow handling for a group.
Definition at line 106 of file CSOGroupRules.h.
References ml::OVERFLOW_DELETE_FIRST.
|
inlinestatic |
Returns the default handling for removal from groups.
Definition at line 108 of file CSOGroupRules.h.
References ml::REMOVE_NEVER.
|
inline |
Returns the _deleteGroupCSOHandling mode.
Definition at line 85 of file CSOGroupRules.h.
|
inline |
Returns the maximum number of CSOs.
Definition at line 73 of file CSOGroupRules.h.
|
inline |
Returns the _overflowHandling mode.
Definition at line 77 of file CSOGroupRules.h.
|
inline |
Returns the _removeFromGroupHandling mode.
Definition at line 81 of file CSOGroupRules.h.
bool ml::CSOGroupRules::mayAddCSO | ( | CSOGroup & | csoGroup | ) | const |
Checks if one could add a CSO to the group csoGroup.
Removes a CSO from the csoGroup
according to the rules.
void ml::CSOGroupRules::reset | ( | ) |
Sets default values to all members.
|
inline |
Sets the handling mode for CSOs when this group is deleted, i.e. should they also be removed from the list...
Definition at line 83 of file CSOGroupRules.h.
|
inline |
Sets the maximum number of CSOs allowed in the group where the rules are applied to.
Definition at line 71 of file CSOGroupRules.h.
|
inline |
Sets the overflow handling, i.e. what has to done when one wants to add CSO and _numMaxCSOs is reached.
Definition at line 75 of file CSOGroupRules.h.
|
inline |
Sets the handling mode for CSOs that are removed from the group, i.e. should they also be removed from the list...
Definition at line 79 of file CSOGroupRules.h.