Lunchbox  1.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pluginVisitor.h
1 
2 /* Copyright (c) 2013, Stefan.Eilemann@epfl.ch
3  *
4  * This file is part of Lunchbox <https://github.com/Eyescale/Lunchbox>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef LUNCHBOX_PLUGINVISITOR_H
21 #define LUNCHBOX_PLUGINVISITOR_H
22 
23 #include <lunchbox/visitorResult.h> // enum
24 
25 namespace lunchbox
26 {
31 template< class P, class I > class PluginVisitorT
32 {
33 public:
35  virtual ~PluginVisitorT(){}
36 
38  virtual VisitorResult visit( P& /*plugin*/ ) { return TRAVERSE_CONTINUE; }
39 
41  virtual VisitorResult visit( P& /*plugin*/, I& /*compressorInfo*/ )
42  { return TRAVERSE_CONTINUE; }
43 };
44 }
45 #endif // LUNCHBOX_PLUGINVISITOR_H
continue the traversal
Definition: visitorResult.h:31
Visitor for all plugins and compressors of a Plugin or PluginRegistry.
Definition: pluginVisitor.h:31
VisitorResult
The result code from any visit operation.
Definition: visitorResult.h:29
virtual VisitorResult visit(P &)
Visit a plugin.
Definition: pluginVisitor.h:38
virtual ~PluginVisitorT()
Desctruct this visitor.
Definition: pluginVisitor.h:35
virtual VisitorResult visit(P &, I &)
Visit a compressor of a plugin.
Definition: pluginVisitor.h:41
PluginVisitorT()
Construct a new visitor.
Definition: pluginVisitor.h:34