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. | |
~CSOGroupRules () | |
Destructor. | |
void | reset () |
Sets default values to all members. | |
void | setNumMaximumCSOs (unsigned int numMaxCSOs) |
Sets the maximum number of CSOs allowed in the group where the rules are applied to. | |
unsigned int | getNumMaximumCSOs () const |
Returns the maximum number of CSOs. | |
void | setOverflowHandling (CSOGroupOverflowHandling handling) |
Sets the overflow handling, i.e. what has to done when one wants to add CSO and _numMaxCSOs is reached. | |
CSOGroupOverflowHandling | getOverflowHandling () const |
Returns the _overflowHandling mode. | |
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... | |
CSORemoveHandling | getRemoveFromGroupHandling () const |
Returns the _removeFromGroupHandling mode. | |
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... | |
CSORemoveHandling | getDeleteGroupCSOHandling () const |
Returns the _deleteGroupCSOHandling mode. | |
bool | mayAddCSO (CSOGroup &csoGroup) const |
Checks if one could add a CSO to the group csoGroup. | |
void | applyTo (CSOGroup &csoGroup) |
Applies the rules to the csoGroup . | |
CSO * | addNewCSO (CSOGroup &csoGroup, bool useUndoRedo=true) |
Adds a new CSO to the csoGroup according to the rules. | |
bool | addCSO (CSO &cso, CSOGroup &csoGroup, bool useUndoRedo=true) |
Adds the given cso to the given csoGroup if the rules allow that. | |
void | removeCSO (CSO &cso, CSOGroup &csoGroup, bool useUndoRedo=true) |
Removes a CSO from the csoGroup according to the rules. | |
void | applyDeletionRule (CSOGroup &csoGroup) |
Applies the delete group rules to the csoGroup . | |
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) | |
Static Public Member Functions | |
static unsigned int | getDefaultNumMaximumCSOs () |
Returns the default value for the maximum amount of CSOs in a group. | |
static CSOGroupOverflowHandling | getDefaultOverflowHandling () |
Returns the default overflow handling for a group. | |
static CSORemoveHandling | getDefaultRemoveFromGroupHandling () |
Returns the default handling for removal from groups. | |
static CSORemoveHandling | getDefaultDeleteGroupCSOHandling () |
Returns the default handling for removal from groups. | |
Protected Member Functions | |
void | _removeAllCSO (CSOGroup &csoGroup, bool useUndoRedo=true) |
Removes all CSOs from the csoGroup according to the rules. | |
void | _combineCSOAndGroup (CSO &cso, CSOGroup &csoGroup) |
establishes bidirectional link between given cso and group | |
void | _breakCSOandGroup (CSO &cso, CSOGroup &csoGroup) |
removes bidirectional link between given cso and group | |
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 | ( | ) |
Destructor.
removes bidirectional link between given cso and group
establishes bidirectional link between given cso and group
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.
Applies the delete group rules to the csoGroup
.
Applies the remove from group rule to the cso
(Is is executed anytime a cso is removed from the group)
|
inlinestatic |
Returns the default handling for removal from groups.
Definition at line 110 of file CSOGroupRules.h.
References ml::REMOVE_IF_IN_NO_GROUP.
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.
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.
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.
Sets the maximum number of CSOs allowed in the group where the rules are applied to.
Definition at line 71 of file CSOGroupRules.h.
References mlrange_cast().
|
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.