Commit | Line | Data |
---|---|---|
fdc716c2 JT |
1 | #ifndef MINIMALISTIC_STUB_HXX |
2 | #define MINIMALISTIC_STUB_HXX | |
3 | ||
4 | #include <boost/archive/binary_oarchive.hpp> | |
5 | #include <boost/archive/binary_iarchive.hpp> | |
6 | #include <boost/archive/xml_oarchive.hpp> | |
7 | #include <boost/archive/xml_iarchive.hpp> | |
8 | #include <boost/serialization/serialization.hpp> | |
fdc716c2 JT |
9 | |
10 | #include <string> | |
11 | #include <t2n_exception.hxx> | |
12 | #include <command.hxx> | |
13 | ||
14 | #ifdef __GCCXML__ | |
0a8803cc GE |
15 | // used during parsing run with gccxml |
16 | ||
17 | /** @brief mark a function to export it via libt2n | |
18 | @par Example | |
19 | @code | |
57ed2535 | 20 | LIBT2N_EXPORT std::string testfunc(const std::string &str) |
0a8803cc GE |
21 | { |
22 | // your code here | |
23 | } | |
24 | @endcode | |
25 | */ | |
fdc716c2 | 26 | #define LIBT2N_EXPORT __attribute((gccxml("libt2n-default"))) |
0a8803cc GE |
27 | |
28 | ||
29 | /** @brief tell libt2n about a default argument | |
57ed2535 GE |
30 | @param type type of the default argument |
31 | @param value default value | |
0a8803cc GE |
32 | @par Example |
33 | @code | |
34 | LIBT2N_EXPORT std::string testfunc(LIBT2N_DEFAULT_ARG(const std::string str&,"hello world")) | |
35 | { | |
36 | // your code here | |
37 | } | |
38 | @endcode | |
57ed2535 GE |
39 | @remarks Codegen gets default arguments via this define (gccxml-attribute) because gccxml |
40 | does not correctly output them (e.g. the namespace is ambiguous) | |
0a8803cc | 41 | */ |
57ed2535 | 42 | #define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value |
0a8803cc | 43 | |
fdc716c2 | 44 | #else |
0a8803cc GE |
45 | // used during regular compile |
46 | ||
fdc716c2 | 47 | #define LIBT2N_EXPORT |
57ed2535 | 48 | #define LIBT2N_DEFAULT_ARG(type,value) type = value |
0a8803cc | 49 | |
fdc716c2 | 50 | #endif |
e035276b JT |
51 | |
52 | #endif |