34 CSOModificator(
const std::string& type=
"CSOModificator",
int numInImages=0,
int numOutImages=0);
189 bool _shouldBaseParameterFieldTriggerUpdate(
Field *field)
const;
190 bool _isAutomaticallyUpdating();
191 bool _isAutomaticallyClearing();
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
CSOGenerator(std::string type="CSOGenerator", int numInImg=0, int numOutImg=0)
Constructor.
virtual void clearOutput()
Clears all outputs (used by auto clear mode).
BoolField * _changeSettingsForModifiedCSOsFld
Shall the module's user settings be used for modified CSOs?
virtual void _applyModificatorOnCSOs(const std::vector< CSO * > &csosToBeProcessed)
virtual void _setupCSOList()
Sets the _outCSOList correctly.
virtual void _applyModificator()
std::vector< CSO * > _getModifyCSOsFromIdList()
virtual std::vector< CSO * > getCSOsToBeProcessed(const std::vector< CSO * > &csosFromIdList)
StringField * _csoIdListFld
virtual bool canProcessInput()
virtual void _notifyObservers(bool didSomething)
Notifies other modules that processing has finished.
void _storeCurrentStateInUndoManager(std::vector< CSO * > csosToBeProcessed)
virtual void _onCSOIdListChanged()
virtual void _applyModificatorOn(CSO &outputCSO)
virtual void resetParsedIds()
Resets parameteres of the modificator.
bool _isWorkingDirectlyOnInputCSOList
Flag that indicates whether this module should work on its input CSOList directly.
virtual bool shouldTriggerParameterApplied(Field *field) const
void _applyChangedSettings(CSO &cso) const
Changes the settings of the given CSO (only if _changeSettingsForModifiedCSOsFld is true).
virtual void _updateCSOType(CSO &outputCSO)
Updates the CSO's type. Most modules change the type to the modificators name, but not all do it.
BoolField * _listenToFinishingNotificationsFld
Shall the module listen to finishing events?
bool _isInIdList(CSO *cso)
BoolField * _listenToSelectionNotificationsFld
Shall the module listen to selection change notifications?
bool _parsedIDsValid
Flag that indicates whether _parsedIDs is valid.
virtual void _onWorkDirectlyOnInputChanged()
bool _isNotifyingMyself
Is this module notifying itself? Locking variable to avoid infinite loops.
virtual bool shouldUseUndoRedo() const
Returns whether undo/Redo should be used.
CSOModificator(const std::string &type="CSOModificator", int numInImages=0, int numOutImages=0)
Standard constructor.
virtual void _onInputChanged()
Helper methods called by handleNotification, may be overwritten in very special cases.
virtual void _onParameterApplied()
ML_ABSTRACT_MODULE_CLASS_HEADER(CSOModificator)
bool _isOutputCSOListOwner
Flag that indicates whether this module is the owner of the output CSOList.
std::set< unsigned int > _parsedIDs
The IDs of the CSOs that should be processed according to the _csoIdListFld.
CSOListPtr _inCSOList
A pointer to the input CSOList.
void activateAttachments() override
Initializes the module after loading.
bool _isChangeSettingField(Field *field) const
BaseField * _inputCSOListFld
The input CSOList.
static void _csoListNotifyObserverCB(void *userData, int notificationFlag)
Can be called from anywhere from the network.
BoolField * _workDirectlyOnInputListFld
void _parseCSOIds(std::set< unsigned int > &ids)
Parse the CSO ID field into the given vector of IDs.
BoolField * _useUndoRedoFld
Shall undo/redo be used? The value is ignored if workDirectlyOnInputList is disabled.
void handleNotification(Field *field) override
Called when any field changes.
BaseField * _outputCSOListFld
The filtered output CSOList.
CSOListPtr _outCSOList
A pointer to the output CSOList.
~CSOModificator() override
Standard destructor.
virtual bool shouldTriggerInputChanged(Field *field) const
bool _isInNotificationCB
Locking variable for removing/adding a notification observer.