Ariles
methods.h
Go to the documentation of this file.
1 /**
2  @file
3  @author Alexander Sherikov
4  @copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
5  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
6  @copyright 2017-2020 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
7  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
8 */
9 
10 
11 #ifdef ARILES2_ENABLED
12 # define ARILES2_TYPED_NAMED_ENTRY(v, type, entry, name) ARILES2_NAMED_ENTRY(v, entry, name)
13 
14 public:
15 // -----
16 // generic (templated) visitors
17 # ifndef ARILES_DOXYGEN_PROCESSING
18 # ifdef ARILES2_ENTRIES
19 # include "visit_generic_parent.h"
20 
21 // clang-format off
23 // clang-format on
24 
25 # endif
26 # endif
27 // -----
28 
29 
30 // -----
31 // Define node name
32 # ifndef ARILES2_DEFAULT_ID
33 # define ARILES2_DEFAULT_ID ""
34 # endif
35 
36  const std::string &
37  arilesDefaultID() const override
38 {
39  static const std::string name(ARILES2_DEFAULT_ID);
40  return (name);
41 }
42 // -----
43 
44 
45 // -----
46 // visitor-specific methods
47 # ifndef ARILES2_VISITORS
48 # define ARILES2_VISITORS ARILES2_DEFAULT_VISITORS
49 # endif
50 
51 # define ARILES2_VISITOR(visitor) ARILES2_METHODS_##visitor
52 ARILES2_VISITORS
53 # undef ARILES2_VISITOR
54 
55 # ifdef ARILES2_ENTRIES
56 # define ARILES2_VISITOR(visitor) ARILES2_VISIT_##visitor
57 ARILES2_VISITORS
58 # undef ARILES2_VISITOR
59 # endif
60 
61 # undef ARILES2_VISITORS
62 // -----
63 
64 
65 # undef ARILES2_TYPED_NAMED_ENTRY
66 #endif // ARILES2_ENABLED
67 
68 #undef ARILES2_DEFAULT_ID
#define ARILES2_DEFAULT_ID
#define ARILES2_VISIT_generic_parent