2 The software in this package is distributed under the GNU General
3 Public License version 2 (with a special exception described below).
5 A copy of GNU General Public License (GPL) is included in this distribution,
6 in the file COPYING.GPL.
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.
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.
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.
20 #ifndef MINIMALISTIC_STUB_HXX
21 #define MINIMALISTIC_STUB_HXX
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>
30 #include <t2n_exception.hxx>
31 #include <command.hxx>
34 // used during parsing run with gccxml
36 /** @brief mark a function to export it via libt2n
39 LIBT2N_EXPORT std::string testfunc(const std::string &str)
45 #define LIBT2N_EXPORT __attribute((gccxml("libt2n-default")))
48 /** @brief tell libt2n about a default argument
49 @param type type of the default argument
50 @param value default value
53 LIBT2N_EXPORT std::string testfunc(LIBT2N_DEFAULT_ARG(const std::string str&,"hello world"))
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)
61 #define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value
64 // used during regular compile
67 #define LIBT2N_DEFAULT_ARG(type,value) type = value