abstractprocessor.cpp 1.22 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "abstractprocessor.h"

namespace TUMVis {

    const std::string AbstractProcessor::loggerCat_ = "TUMVis.core.datastructures.Processor";


    AbstractProcessor::AbstractProcessor() {

    }

    AbstractProcessor::~AbstractProcessor() {

    }

    void AbstractProcessor::addDataHandle(const std::string& name, const DataHandle* dh) {
17
        _dataContainer.addDataHandle(name, dh);
schultezub's avatar
schultezub committed
18
19
20
    }

    const DataContainer& AbstractProcessor::getDataContainer() const {
21
        return _dataContainer;
schultezub's avatar
schultezub committed
22
    }
23

schultezub's avatar
schultezub committed
24
    const InvalidationLevel& AbstractProcessor::getInvalidationLevel() const {
25
26
27
        return _invalidationLevel;
    }

schultezub's avatar
schultezub committed
28
29
30
31
32
33
34
35
36
37
    void AbstractProcessor::applyInvalidationLevel(InvalidationLevel::NamedLevels nl) {
        _invalidationLevel.setLevel(nl);
    }

    void AbstractProcessor::onNotify(const PropertyObserverArgs& poa) {
        _invalidationLevel.setLevel(poa._invalidationLevel);

        // If processor is no longer valid, notify observers
        if (! _invalidationLevel.isValid()) {
            notifyObservers(ProcessorObserverArgs(this, _invalidationLevel));
38
        }
schultezub's avatar
schultezub committed
39
40
41
42
    }

    PropertyCollection& AbstractProcessor::getPropertyCollection() {
        return _properties;
43
    }
schultezub's avatar
schultezub committed
44
}