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>2017-01-18 22:25:02 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:47:04 -0200
commita1f2db255b22052050baf0c04bb72146b22a6e99 (patch)
tree8499c057a7a0054f75fe3ab4719b2cc3659949d5 /src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
parent7f148feea8275d4ae3a366e5aead8170498089a6 (diff)
cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order of includes and creating forward declarations.
Diffstat (limited to 'src/lib/eolian_cxx/grammar/implementation_include_directive.hpp')
-rw-r--r--src/lib/eolian_cxx/grammar/implementation_include_directive.hpp6
1 files changed, 6 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
index dab1e0a7e9..6c2631ab80 100644
--- a/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
+++ b/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
@@ -22,6 +22,12 @@ struct implementation_include_directive_generator
22 return as_generator("#include \"" << string << ".impl.hh\"\n") 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)); 23 .generate(sink, std::string(eolian_class_file_get(get_klass(get_klass_name(cls)))), add_lower_case_context(ctx));
24 } 24 }
25 template <typename OutputIterator, typename Context>
26 bool generate(OutputIterator sink, std::string const& cls, Context const& ctx) const
27 {
28 return as_generator("#include \"" << string << ".impl.hh\"\n")
29 .generate(sink, cls, add_lower_case_context(ctx));
30 }
25}; 31};
26 32
27template <> 33template <>