#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 |
| Get 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 |
| Gets 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 |
| Gets 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 |
| Gets 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 * | addCSO (CSOGroup &csoGroup, bool useUndoRedo=true) |
Add a new CSO to the csoGroup according to the rules. | |
| bool | addCSO (CSO &cso, CSOGroup &csoGroup, bool useUndoRedo=true) |
Add the given cso to the given csoGroup if the rules allow that. Returns true if done, false otherwise. | |
| void | applyDeletionRule (CSOGroup &csoGroup) |
Applies the delete group rules to the csoGroup. | |
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. | |
Static Public Attributes | |
| static const char * | sOverflowHandlingStrings [NUM_OVERFLOW_MODES] |
| Defines the strings for overflow handling (displayed in the fields). | |
| static const char * | sRemoveHandlingStrings [NUM_REMOVE_MODES] |
| Defines the strings for removal handling (displayed in the fields). | |
Protected Member Functions | |
| void | _removeCSO (CSO &cso, CSOGroup &csoGroup, bool useUndoRedo=true) |
Removes a CSO from the csoGroup according to the rules. | |
| void | _removeAllCSO (CSOGroup &csoGroup, bool useUndoRedo=true) |
Removes all CSOs from the csoGroup according to the rules. | |
Definition at line 45 of file CSOGroupRules.h.
| ml::CSOGroupRules::CSOGroupRules | ( | unsigned int | numMaxCSOs = 0 |
) |
Constructor.
| ml::CSOGroupRules::~CSOGroupRules | ( | ) |
Destructor.
| void ml::CSOGroupRules::_removeAllCSO | ( | CSOGroup & | csoGroup, | |
| bool | useUndoRedo = true | |||
| ) | [protected] |
Removes all CSOs from the csoGroup according to the rules.
| void ml::CSOGroupRules::_removeCSO | ( | CSO & | cso, | |
| CSOGroup & | csoGroup, | |||
| bool | useUndoRedo = true | |||
| ) | [protected] |
Removes a CSO from the csoGroup according to the rules.
Add the given cso to the given csoGroup if the rules allow that. Returns true if done, false otherwise.
Add 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::applyTo | ( | CSOGroup & | csoGroup | ) |
Applies the rules to the csoGroup.
| static CSORemoveHandling ml::CSOGroupRules::getDefaultDeleteGroupCSOHandling | ( | ) | [inline, static] |
Returns the default handling for removal from groups.
Definition at line 94 of file CSOGroupRules.h.
References ml::REMOVE_IF_IN_NO_GROUP.
| static unsigned int ml::CSOGroupRules::getDefaultNumMaximumCSOs | ( | ) | [inline, static] |
Returns the default value for the maximum amount of CSOs in a group.
Definition at line 88 of file CSOGroupRules.h.
| static CSOGroupOverflowHandling ml::CSOGroupRules::getDefaultOverflowHandling | ( | ) | [inline, static] |
Returns the default overflow handling for a group.
Definition at line 90 of file CSOGroupRules.h.
References ml::OVERFLOW_DELETE_FIRST.
| static CSORemoveHandling ml::CSOGroupRules::getDefaultRemoveFromGroupHandling | ( | ) | [inline, static] |
Returns the default handling for removal from groups.
Definition at line 92 of file CSOGroupRules.h.
References ml::REMOVE_IF_IN_NO_GROUP.
| CSORemoveHandling ml::CSOGroupRules::getDeleteGroupCSOHandling | ( | ) | const [inline] |
| unsigned int ml::CSOGroupRules::getNumMaximumCSOs | ( | ) | const [inline] |
| CSOGroupOverflowHandling ml::CSOGroupRules::getOverflowHandling | ( | ) | const [inline] |
| CSORemoveHandling ml::CSOGroupRules::getRemoveFromGroupHandling | ( | ) | const [inline] |
| bool ml::CSOGroupRules::mayAddCSO | ( | CSOGroup & | csoGroup | ) | const |
Checks if one could add a CSO to the group csoGroup.
| void ml::CSOGroupRules::reset | ( | ) |
Sets default values to all members.
| void ml::CSOGroupRules::setDeleteGroupCSOHandling | ( | CSORemoveHandling | handling | ) | [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 71 of file CSOGroupRules.h.
| void ml::CSOGroupRules::setNumMaximumCSOs | ( | unsigned int | numMaxCSOs | ) | [inline] |
Sets the maximum number of CSOs allowed in the group where the rules are applied to.
Definition at line 59 of file CSOGroupRules.h.
| void ml::CSOGroupRules::setOverflowHandling | ( | CSOGroupOverflowHandling | handling | ) | [inline] |
Sets the overflow handling, i.e. what has to done when one wants to add CSO and _numMaxCSOs is reached.
Definition at line 63 of file CSOGroupRules.h.
| void ml::CSOGroupRules::setRemoveFromGroupHandling | ( | CSORemoveHandling | handling | ) | [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 67 of file CSOGroupRules.h.
const char* ml::CSOGroupRules::sOverflowHandlingStrings[NUM_OVERFLOW_MODES] [static] |
Defines the strings for overflow handling (displayed in the fields).
Definition at line 97 of file CSOGroupRules.h.
const char* ml::CSOGroupRules::sRemoveHandlingStrings[NUM_REMOVE_MODES] [static] |
Defines the strings for removal handling (displayed in the fields).
Definition at line 99 of file CSOGroupRules.h.
1.5.8