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

abstractprocessor.h 1.44 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef PROCESSOR_H__
#define PROCESSOR_H__

#include "tgt/logmanager.h"
#include "core/datastructures/datacontainer.h"

namespace TUMVis {

    /**
     * Abstract base class for TUMVis Processors.
     * 
     * \sa AbstractPipeline
     */
    class AbstractProcessor {
    public:
        /**
         * Creates a AbstractProcessor.
         */
        AbstractProcessor();

        /**
         * Virtual Destructor
         **/
        virtual ~AbstractProcessor();


        /**
         * Execute this processor.
         **/
        virtual void process() = 0;

        /**
         * Adds the given DataHandle \a data, accessible by the key \name, to this DataContainer.
         * Already existing DataHandles with the same key will be removed from this DataContainer.
         *
         * \param   name    Key for accessing the DataHandle within this DataContainer
         * \param   data    DataHandle to add.
         **/
        virtual void addDataHandle(const std::string& name, const DataHandle* dh);

        /**
         * Returns the local DataContainer of this Processor.
         * \returns Processor::_data
         **/
        const DataContainer& getDataContainer() const;

    protected:
        DataContainer _data;                    ///< DataContainer containing local working set of data for this Processor

        static const std::string loggerCat_;
    };

}

#endif // PROCESSOR_H__