path: root/src/lib/eolian_cxx/Eolian_Cxx.hh
diff options
authorLauro Moura <>2017-12-06 21:03:55 -0300
committerFelipe Magno de Almeida <>2017-12-20 19:57:17 -0200
commit46b202b86ce1912653bfcae2db2dac045af9bb2b (patch)
tree37e0256e4d3046bb24c555b472791f81b4f6d28f /src/lib/eolian_cxx/Eolian_Cxx.hh
parent0609c68e34940e40e0caae1bb9dfc48d4eaa306e (diff)
eolian-mono: Add documentation generation support
This commit adds the "documentation" generator, which gets the documentation_def attribute of the given item and generates xml comments to be exported by MCS. For items requiring some customization of the generated comments (e.g. functions and its parameters), the helpers to generate the preamble (summary), body (paragraphs) and epilogue (currently just the @since tag) were added. Currently we do not support converting Eolian references into xmldoc references. As we explicitly generate Get/Set methods for properties, for now the generator tries to get the get/set specific documentation first. If it is not present, fallback to the common docs. Later this could be changed to generate the common one as paragraphs of the Get/Set. Also some generated code like the wrappers for calling C# methods from C can be private. This will cleanup the introspection results and warnings when generating documentation. Due to this visibility change, the binbuf tests had to be changed to add redirect calls to the native methods instead of directly calling the DllImport'd methods.
Diffstat (limited to 'src/lib/eolian_cxx/Eolian_Cxx.hh')
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/Eolian_Cxx.hh b/src/lib/eolian_cxx/Eolian_Cxx.hh
index 5a8ea813c7..ec5062fee3 100644
--- a/src/lib/eolian_cxx/Eolian_Cxx.hh
+++ b/src/lib/eolian_cxx/Eolian_Cxx.hh
@@ -24,6 +24,24 @@ struct eolian_init
24 } 24 }
25}; 25};
26 26
27struct eolian_state
29 Eolian *value;
30 eolian_state()
31 {
32 value = ::eolian_new();
33 }
34 ~eolian_state()
35 {
36 ::eolian_free(value);
37 }
39 inline Eolian_Unit const* as_unit() const
40 {
41 return (Eolian_Unit const*)value;
42 }
27} } 45} }
28 46
29#endif // EOLIAN_CXX_LIB_HH 47#endif // EOLIAN_CXX_LIB_HH