Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit cbd8ddaa authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Introducing AbstractProcessor::forceProcess().

parent 151a2cf3
......@@ -155,6 +155,11 @@ namespace campvis {
}
}
void AbstractProcessor::forceProcess(DataContainer& dataContainer, int invalidationLevel) {
invalidate(invalidationLevel);
process(dataContainer);
}
void AbstractProcessor::updateShader() {
LDEBUG("Called non-overriden updateShader() in " << getName() << ". Did you forget to override your method?");
}
......@@ -163,11 +168,7 @@ namespace campvis {
LDEBUG("Called non-overriden updateProperties() in " << getName() << ". Did you forget to override your method?");
}
void AbstractProcessor::addProperty(AbstractProperty& prop) {
this->addProperty(prop, INVALID_RESULT);
}
void AbstractProcessor::addProperty(AbstractProperty& prop, int invalidationLevel) {
void AbstractProcessor::addProperty(AbstractProperty& prop, int invalidationLevel /* = INVALID_RESULT*/) {
HasPropertyCollection::addProperty(prop);
setPropertyInvalidationLevel(prop, invalidationLevel);
}
......
......@@ -149,13 +149,6 @@ namespace campvis {
*/
virtual ProcessorState getProcessorState() const = 0;
/**
* Registers \a prop as property with the default invalidation level of INVALID_RESULT.
* \see HasPropertyCollection::addProperty()
* \param prop Property to register
*/
virtual void addProperty(AbstractProperty& prop);
/**
* Registers \a prop as property with the provided invalidation level. Registered properties
* can be accessed from the outside, e.g. via getProperty(), and will automatically invalidate
......@@ -164,7 +157,7 @@ namespace campvis {
* \param prop Property to add
* \param invalidationLevel Invalidation level of this property
*/
void addProperty(AbstractProperty& prop, int invalidationLevel);
void addProperty(AbstractProperty& prop, int invalidationLevel = INVALID_RESULT);
/**
* Sets the property invalidation level to the specified value.
......@@ -183,6 +176,16 @@ namespace campvis {
**/
void process(DataContainer& data);
/**
* Forces the execution of this processor according to the given invalidation level and
* independent of its current invalidation level. Sets this processor's invalidation level
* to \a invalidationLevel and then calles process().
*
* \param dataContainer DataContainer to work on
* \param invalidationLevel Invalidation level to enforce prior to calling process.
*/
void forceProcess(DataContainer& dataContainer, int invalidationLevel);
/**
* Gets the flag whether this processor is currently enabled.
* \return _enabled
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment