Ariles
include
ariles2
ariles.h
Go to the documentation of this file.
1
/**
2
@file
3
@author Alexander Sherikov
4
5
@copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
6
(see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7
8
@copyright 2017-2020 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
9
(see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
10
11
@brief
12
*/
13
14
#pragma once
15
16
#ifndef ARILES2_INCLUDED
17
# define ARILES2_INCLUDED
18
#endif
19
20
#ifndef ARILES2_DISABLE
21
# define ARILES2_ENABLED
22
#endif
23
24
25
#include "
internal/helpers.h
"
26
27
#include "
visitors/process.h
"
28
#include "
visitors/defaults.h
"
29
#include "
visitors/prewrite.h
"
30
#include "
visitors/finalize.h
"
31
#include "
visitors/count.h
"
32
#include "
visitors/read.h
"
33
#include "
visitors/write.h
"
34
#include "
visitors/config.h
"
35
36
// These defines are always necessary
37
#define ARILES2_TYPED_ENTRY_(v, entry, type) ARILES2_TYPED_NAMED_ENTRY(v, type, entry##_, entry)
38
#define ARILES2_TYPED_ENTRY(v, entry, type) ARILES2_TYPED_NAMED_ENTRY(v, type, entry, entry)
39
40
41
#ifdef ARILES2_ENABLED
42
# define ARILES2_INITIALIZE <ariles2/members/all.h>
43
44
# define ARILES2_PARENT(v, entry) ARILES2_PARENT_##v(v, entry)
45
# define ARILES2_NAMED_ENTRY(v, entry, name) ARILES2_NAMED_ENTRY_##v(v, entry, name)
46
47
# define ARILES2_ENTRY_(v, entry) ARILES2_NAMED_ENTRY(v, entry##_, entry)
48
# define ARILES2_ENTRY(v, entry) ARILES2_NAMED_ENTRY(v, entry, entry)
49
50
// ----------------------------
51
52
# include "
adapters/basic.h
"
53
54
# ifndef ARILES2_DEFAULT_VISITORS
55
# define ARILES2_DEFAULT_VISITORS \
56
ARILES2_VISITOR(count) \
57
ARILES2_VISITOR(finalize) \
58
ARILES2_VISITOR(prewrite) \
59
ARILES2_VISITOR(defaults) \
60
ARILES2_VISITOR(read) \
61
ARILES2_VISITOR(write)
62
# endif
63
64
namespace
ariles2
65
{
66
class
ARILES2_VISIBILITY_ATTRIBUTE
DefaultBase
:
public
ariles2::Ariles
67
# define ARILES2_VISITOR(visitor) , public ariles2::visitor::Base
68
ARILES2_DEFAULT_VISITORS
69
# undef ARILES2_VISITOR
70
{
71
protected
:
72
DefaultBase
()
73
{
74
}
75
~DefaultBase
()
76
{
77
}
78
79
public
:
80
# define ARILES2_VISITOR(visitor) ARILES2_BASE_METHODS_##visitor
81
ARILES2_DEFAULT_VISITORS
82
# undef ARILES2_VISITOR
83
};
84
}
// namespace ariles2
85
86
#else
87
88
# define ARILES2_DISABLED
89
# define ARILES2_INITIALIZE <ariles2/members/variables.h>
90
91
namespace
ariles2
92
{
93
// Some classes may inherit from this
94
class
ARILES2_VISIBILITY_ATTRIBUTE
DefaultBase
95
{
96
protected
:
97
/**
98
* @brief Protected destructor: prevent destruction of derived
99
* classes via base pointer.
100
*/
101
~DefaultBase()
102
{
103
}
104
DefaultBase()
105
{
106
}
107
108
public
:
109
};
110
}
// namespace ariles2
111
112
#endif
ariles2
Definition:
basic.h:16
defaults.h
ariles2::DefaultBase::~DefaultBase
~DefaultBase()
Definition:
ariles.h:75
finalize.h
ariles2::DefaultBase::DefaultBase
DefaultBase()
Definition:
ariles.h:72
process.h
ariles2::Ariles
Definition:
helpers.h:153
count.h
helpers.h
ariles2::DefaultBase
Definition:
ariles.h:66
ARILES2_VISIBILITY_ATTRIBUTE
#define ARILES2_VISIBILITY_ATTRIBUTE
Definition:
helpers.h:138
prewrite.h
ARILES2_DEFAULT_VISITORS
#define ARILES2_DEFAULT_VISITORS
Definition:
ariles.h:55
basic.h
config.h
write.h
read.h
Generated by
1.8.17