|
MeVisLab Toolbox Reference
|
This handles rules like the maximum number of CSOs in a CSOGroup 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 CSOGroup 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 be 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 CSOGroup, 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 CSOGroup 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 whether one could add a CSO to the specified 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 specified cso to the specified 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 any time a CSO is removed from the CSOGroup). | |
Static Public Member Functions | |
| static unsigned int | getDefaultNumMaximumCSOs () |
| Returns the default value for the maximum amount of CSOs in a CSOGroup. | |
| static CSOGroupOverflowHandling | getDefaultOverflowHandling () |
| Returns the default overflow handling for a CSOGroup. | |
| static CSORemoveHandling | getDefaultRemoveFromGroupHandling () |
| Returns the default handling for removal from CSOGroups. | |
| static CSORemoveHandling | getDefaultDeleteGroupCSOHandling () |
| Returns the default handling for removal from CSOGroups. | |
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 a bidirectional link between the specified CSO and the specified CSOGroup. | |
| void | _breakCSOandGroup (CSO &cso, CSOGroup &csoGroup) |
| Removes the bidirectional link between the specified CSO and the specified CSOGroup. | |
This handles rules like the maximum number of CSOs in a CSOGroup and applies them.
Definition at line 57 of file CSOGroupRules.h.
| ml::CSOGroupRules::CSOGroupRules | ( | unsigned int | numMaxCSOs = 0 | ) |
Constructor.
| ml::CSOGroupRules::~CSOGroupRules | ( | ) |
Destructor.
|
protected |
Removes all CSOs from the csoGroup according to the rules.
Adds the specified cso to the specified 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 | ||
| ) |
| void ml::CSOGroupRules::applyTo | ( | CSOGroup & | csoGroup | ) |
Applies the rules to the csoGroup.
|
inlinestatic |
Returns the default handling for removal from CSOGroups.
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 CSOGroup.
Definition at line 104 of file CSOGroupRules.h.
|
inlinestatic |
Returns the default overflow handling for a CSOGroup.
Definition at line 106 of file CSOGroupRules.h.
References ml::OVERFLOW_DELETE_FIRST.
|
inlinestatic |
Returns the default handling for removal from CSOGroups.
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 |
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 CSOGroup 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 CSOGroup where the rules are applied to.
Definition at line 71 of file CSOGroupRules.h.
|
inline |
Sets the overflow handling, i.e., what has to be 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 CSOGroup, i.e., should they also be removed from the list?
Definition at line 79 of file CSOGroupRules.h.