summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-06 02:54:36 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-06 02:54:36 -0300
commit2a3d7860dbc11458425e162cd69ee399e9025251 (patch)
tree84c5b21b644c4cf8806a8eee07b4ed81922c92b4 /src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
parent4d1b3191d94fcc70472552b1bb554984a9cb0288 (diff)
eolian-cxx: Rewrite to accomodate new features of the C++ binding
Diffstat (limited to 'src/lib/eolian_cxx/grammar/implementation_include_directive.hpp')
-rw-r--r--src/lib/eolian_cxx/grammar/implementation_include_directive.hpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp b/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
new file mode 100644
index 0000000000..01f89cf74d
--- /dev/null
+++ b/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
@@ -0,0 +1,39 @@
1#ifndef EOLIAN_CXX_IMPLEMENTATION_INCLUDE_DIRECTIVE_HH
2#define EOLIAN_CXX_IMPLEMENTATION_INCLUDE_DIRECTIVE_HH
3
4#include "grammar/generator.hpp"
5#include "grammar/klass_def.hpp"
6
7#include "grammar/string.hpp"
8#include "grammar/indentation.hpp"
9#include "grammar/list.hpp"
10#include "grammar/alternative.hpp"
11#include "grammar/type.hpp"
12#include "grammar/parameter.hpp"
13#include "grammar/function_declaration.hpp"
14
15namespace efl { namespace eolian { namespace grammar {
16
17struct implementation_include_directive_generator
18{
19 template <typename OutputIterator, typename Context>
20 bool generate(OutputIterator sink, attributes::klass_def const& cls, Context const& ctx) const
21 {
22 return as_generator("#include \"" << string << ".impl.hh\"\n")
23 .generate(sink, std::string(eolian_class_file_get(get_klass(get_klass_name(cls)))), add_lower_case_context(ctx));
24 }
25};
26
27template <>
28struct is_eager_generator<implementation_include_directive_generator> : std::true_type {};
29
30namespace type_traits {
31template <>
32struct attributes_needed<implementation_include_directive_generator> : std::integral_constant<int, 1> {};
33}
34
35implementation_include_directive_generator const implementation_include_directive;
36
37} } }
38
39#endif