X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=codegen%2Fcodegen-stubhead.hxx;h=d55f3231e29be93a9d10b2024bff19ab2d9a7678;hp=8445551f5b17a43132d40d2d575390649651f46d;hb=a63e08b83794273da3840e0b8bf15bf0085fe3c4;hpb=25924caeef56c6e09e73216885912ac525ebec9f diff --git a/codegen/codegen-stubhead.hxx b/codegen/codegen-stubhead.hxx index 8445551..d55f323 100644 --- a/codegen/codegen-stubhead.hxx +++ b/codegen/codegen-stubhead.hxx @@ -1,3 +1,22 @@ +/* +The software in this package is distributed under the GNU General +Public License version 2 (with a special exception described below). + +A copy of GNU General Public License (GPL) is included in this distribution, +in the file COPYING.GPL. + +As a special exception, if other files instantiate templates or use macros +or inline functions from this file, or you compile this file and link it +with other works to produce a work based on this file, this file +does not by itself cause the resulting work to be covered +by the GNU General Public License. + +However the source code for this file must still be made available +in accordance with section (3) of the GNU General Public License. + +This exception does not invalidate any other reasons why a work based +on this file might be covered by the GNU General Public License. +*/ #ifndef MINIMALISTIC_STUB_HXX #define MINIMALISTIC_STUB_HXX @@ -12,11 +31,41 @@ #include #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