Ariles
Loading...
Searching...
No Matches
process.h
Go to the documentation of this file.
1/**
2 @file
3 @author Alexander Sherikov
4
5 @copyright 2017-2020 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
6 (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7
8 @brief
9*/
10
11#pragma once
12
13#include "common.h"
14
15/**
16@defgroup process Process
17
18@brief Process entries, base for @ref prewrite and @ref finalize.
19*/
20
21namespace ariles2
22{
23 namespace process
24 {
25 template <class t_Derived, class t_Parameters>
26 class Visitor : public ariles2::visitor::Base<t_Derived, t_Parameters>
27 {
28 public:
30
31
32 public:
33 template <class t_Entry>
34 void visit(t_Entry &entry, const std::string &name, const Parameters &param) const
35 {
37 this->visitMapEntry(entry, name, param);
38 }
39
40
41 template <class t_Entry>
42 void visitMapEntry(t_Entry &entry, const std::string &name, const Parameters &param) const
43 {
44 CPPUT_UNUSED_ARG(name);
47 CPPUT_TRACE_TYPE(entry);
48 apply_process(*(static_cast<t_Derived *>(this)), entry, param);
49 }
50 };
51 } // namespace process
52} // namespace ariles2
void visit(t_Entry &entry, const std::string &name, const Parameters &param) const
Definition process.h:34
void visitMapEntry(t_Entry &entry, const std::string &name, const Parameters &param) const
Definition process.h:42
#define CPPUT_UNUSED_ARG(parameter)
Definition misc.h:19
void apply_process(const t_Visitor &visitor, t_Entry &entry, const typename t_Visitor::Parameters &param)
Definition basic.h:289
#define CPPUT_TRACE_FUNCTION
Definition trace.h:126
#define CPPUT_TRACE_TYPE(type)
Definition trace.h:128
#define CPPUT_TRACE_VALUE(value)
Definition trace.h:127