libt2n: (tomj) disable recently added unit test: it won't work as is
[libt2n] / codegen / codegen-stubhead.hxx
index 8445551..171d399 100644 (file)
 #include <command.hxx>
 
 #ifdef __GCCXML__
+// used during parsing run with gccxml
+
+/** @brief mark a function to export it via libt2n
+    @par Example
+    @code
+    LIBT2N_EXPORT std::string testfunc(const std::string &str)
+    {
+        // your code here
+    }
+    @endcode
+*/
 #define LIBT2N_EXPORT __attribute((gccxml("libt2n-default")))
-#define LIBT2N_EXPORT_GROUP(group) __attribute((gccxml("libt2n-"#group)))
+
+
+/** @brief tell libt2n about a default argument
+    @param type type of the default argument
+    @param value default value
+    @par Example
+    @code
+    LIBT2N_EXPORT std::string testfunc(LIBT2N_DEFAULT_ARG(const std::string str&,"hello world"))
+    {
+        // your code here
+    }
+    @endcode
+    @remarks Codegen gets default arguments via this define (gccxml-attribute) because gccxml
+             does not correctly output them (e.g. the namespace is ambiguous)
+*/
+#define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value
+
 #else
+// used during regular compile
+
 #define LIBT2N_EXPORT
-#define LIBT2N_EXPORT_GROUP(group)
+#define LIBT2N_DEFAULT_ARG(type,value) type = value
+
 #endif
 
 #endif