| Commit | Line | Data |
|---|---|---|
| 19facd85 TJ |
1 | /* |
| 2 | The software in this package is distributed under the GNU General | |
| 3 | Public License version 2 (with a special exception described below). | |
| 4 | ||
| 5 | A copy of GNU General Public License (GPL) is included in this distribution, | |
| 6 | in the file COPYING.GPL. | |
| 7 | ||
| 8 | As a special exception, if other files instantiate templates or use macros | |
| 9 | or inline functions from this file, or you compile this file and link it | |
| 10 | with other works to produce a work based on this file, this file | |
| 11 | does not by itself cause the resulting work to be covered | |
| 12 | by the GNU General Public License. | |
| 13 | ||
| 14 | However the source code for this file must still be made available | |
| 15 | in accordance with section (3) of the GNU General Public License. | |
| 16 | ||
| 17 | This exception does not invalidate any other reasons why a work based | |
| 18 | on this file might be covered by the GNU General Public License. | |
| 19 | */ | |
| fdc716c2 JT |
20 | #ifndef MINIMALISTIC_STUB_HXX |
| 21 | #define MINIMALISTIC_STUB_HXX | |
| 22 | ||
| 23 | #include <boost/archive/binary_oarchive.hpp> | |
| 24 | #include <boost/archive/binary_iarchive.hpp> | |
| 25 | #include <boost/archive/xml_oarchive.hpp> | |
| 26 | #include <boost/archive/xml_iarchive.hpp> | |
| 27 | #include <boost/serialization/serialization.hpp> | |
| fdc716c2 JT |
28 | |
| 29 | #include <string> | |
| 30 | #include <t2n_exception.hxx> | |
| 31 | #include <command.hxx> | |
| 32 | ||
| 33 | #ifdef __GCCXML__ | |
| 0a8803cc GE |
34 | // used during parsing run with gccxml |
| 35 | ||
| 36 | /** @brief mark a function to export it via libt2n | |
| 37 | @par Example | |
| 38 | @code | |
| 57ed2535 | 39 | LIBT2N_EXPORT std::string testfunc(const std::string &str) |
| 0a8803cc GE |
40 | { |
| 41 | // your code here | |
| 42 | } | |
| 43 | @endcode | |
| 44 | */ | |
| fdc716c2 | 45 | #define LIBT2N_EXPORT __attribute((gccxml("libt2n-default"))) |
| 0a8803cc GE |
46 | |
| 47 | ||
| 48 | /** @brief tell libt2n about a default argument | |
| 57ed2535 GE |
49 | @param type type of the default argument |
| 50 | @param value default value | |
| 0a8803cc GE |
51 | @par Example |
| 52 | @code | |
| 53 | LIBT2N_EXPORT std::string testfunc(LIBT2N_DEFAULT_ARG(const std::string str&,"hello world")) | |
| 54 | { | |
| 55 | // your code here | |
| 56 | } | |
| 57 | @endcode | |
| 57ed2535 GE |
58 | @remarks Codegen gets default arguments via this define (gccxml-attribute) because gccxml |
| 59 | does not correctly output them (e.g. the namespace is ambiguous) | |
| 0a8803cc | 60 | */ |
| 57ed2535 | 61 | #define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value |
| 0a8803cc | 62 | |
| fdc716c2 | 63 | #else |
| 0a8803cc GE |
64 | // used during regular compile |
| 65 | ||
| fdc716c2 | 66 | #define LIBT2N_EXPORT |
| 57ed2535 | 67 | #define LIBT2N_DEFAULT_ARG(type,value) type = value |
| 0a8803cc | 68 | |
| fdc716c2 | 69 | #endif |
| e035276b JT |
70 | |
| 71 | #endif |