X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=codegen%2Fcodegen-stubhead.hxx;fp=codegen%2Fcodegen-stubhead.hxx;h=171d3990f6c5166401cbb274f4ced5404bbb34b6;hp=34493d24d025b21537a41280f2672a274561d899;hb=57ed25354d81e2820c1c078766b350d2d098e222;hpb=0a8803ccb67ea3c31cbd2405c617da3dda47f4ef diff --git a/codegen/codegen-stubhead.hxx b/codegen/codegen-stubhead.hxx index 34493d2..171d399 100644 --- a/codegen/codegen-stubhead.hxx +++ b/codegen/codegen-stubhead.hxx @@ -17,7 +17,7 @@ /** @brief mark a function to export it via libt2n @par Example @code - LIBT2N_EXPORT std::string testfunc(std::string str) + LIBT2N_EXPORT std::string testfunc(const std::string &str) { // your code here } @@ -27,8 +27,8 @@ /** @brief tell libt2n about a default argument - @param _type type of the default argument - @param _value default value + @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")) @@ -36,14 +36,16 @@ // 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 +#define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value #else // used during regular compile #define LIBT2N_EXPORT -#define LIBT2N_DEFAULT_ARG(_type,_value) _type = _value +#define LIBT2N_DEFAULT_ARG(type,value) type = value #endif