X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=codegen%2Fcodegen-stubhead.hxx;h=34493d24d025b21537a41280f2672a274561d899;hp=5c330f3878aaa690d6d3cce239424203fe44e68f;hb=0a8803ccb67ea3c31cbd2405c617da3dda47f4ef;hpb=4ddaa0f5ce6d2f7b6a2419dad9ff83879e04df2c diff --git a/codegen/codegen-stubhead.hxx b/codegen/codegen-stubhead.hxx index 5c330f3..34493d2 100644 --- a/codegen/codegen-stubhead.hxx +++ b/codegen/codegen-stubhead.hxx @@ -6,24 +6,45 @@ #include #include #include -#include -#include #include #include #include #ifdef __GCCXML__ -#define LIBT2N_SET_DEFAULTGROUP(x) namespace { typedef __attribute((gccxml("libt2n-"#x))) int libt2n_default_group; } -/* not allowed anymore -#define LIBT2N_SET_DEFAULTGROUP(x) #define LIBT2N_EXPORT __attribute((gccxml("libt2n-"#x))) +// used during parsing run with gccxml + +/** @brief mark a function to export it via libt2n + @par Example + @code + LIBT2N_EXPORT std::string testfunc(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 +*/ +#define LIBT2N_DEFAULT_ARG(_type,_value) __attribute((gccxml("libt2n-default-arg",#_value))) _type = _value + #else -#define LIBT2N_SET_DEFAULTGROUP(x) +// used during regular compile + #define LIBT2N_EXPORT -#define LIBT2N_EXPORT_GROUP(group) +#define LIBT2N_DEFAULT_ARG(_type,_value) _type = _value + #endif #endif