Switch time() calls to monotonic clock calls (#7597)
[libt2n] / codegen / codegen-stubhead.hxx
... / ...
CommitLineData
1/*
2The software in this package is distributed under the GNU General
3Public License version 2 (with a special exception described below).
4
5A copy of GNU General Public License (GPL) is included in this distribution,
6in the file COPYING.GPL.
7
8As a special exception, if other files instantiate templates or use macros
9or inline functions from this file, or you compile this file and link it
10with other works to produce a work based on this file, this file
11does not by itself cause the resulting work to be covered
12by the GNU General Public License.
13
14However the source code for this file must still be made available
15in accordance with section (3) of the GNU General Public License.
16
17This exception does not invalidate any other reasons why a work based
18on this file might be covered by the GNU General Public License.
19*/
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>
28
29#include <string>
30#include <t2n_exception.hxx>
31#include <command.hxx>
32
33#ifdef __GCCXML__
34// used during parsing run with gccxml
35
36/** @brief mark a function to export it via libt2n
37 @par Example
38 @code
39 LIBT2N_EXPORT std::string testfunc(const std::string &str)
40 {
41 // your code here
42 }
43 @endcode
44*/
45#define LIBT2N_EXPORT __attribute((gccxml("libt2n-default")))
46
47
48/** @brief tell libt2n about a default argument
49 @param type type of the default argument
50 @param value default value
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
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)
60*/
61#define LIBT2N_DEFAULT_ARG(type,value) __attribute((gccxml("libt2n-default-arg",#value))) type = value
62
63#else
64// used during regular compile
65
66#define LIBT2N_EXPORT
67#define LIBT2N_DEFAULT_ARG(type,value) type = value
68
69#endif
70
71#endif