diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-10-26 09:31:08 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-10-26 09:31:08 -0300 |
commit | ae3abca2b15794bdde313eed3f7f9391cd68f72d (patch) | |
tree | 382309fb28924ec0d52ade46674904bb458ccd22 /doc/tutorial/globalheader.rst | |
parent | 8fd38fe9fcb176441e34cad2a3094301c33080f5 (diff) |
forked boostpythongenerator project to separate the generatorrunner
so that it could be used independently; the qtdoc generator module
remained part of generatorrunner
Diffstat (limited to 'doc/tutorial/globalheader.rst')
-rw-r--r-- | doc/tutorial/globalheader.rst | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/doc/tutorial/globalheader.rst b/doc/tutorial/globalheader.rst deleted file mode 100644 index d1ac2392e..000000000 --- a/doc/tutorial/globalheader.rst +++ /dev/null @@ -1,36 +0,0 @@ -.. highlight:: cpp - -.. _gentut-globalheader: - -The Global Header -================= - -Besides the information provided by the typesystem, the generator needs to -gather more data from the library headers containing the classes to be exposed -in Python. If there is a header that include all the others (or just one, as is -the case of **libfoo**) this could be passed directly to the generator. - -If such a file is not available, or only a subset of the library is desired, or -if some flags must be defined before parsing the library headers, then a -``global.h`` file must be provided. - -The use of a ``global.h`` file is preferred if some macros must be defined -before the parser gather data from the headers. For example, if ``NULL`` is not -defined and it is used as a default paramater for some constructor or method, -the parser will not recognize it. - -The solve this create a ``global.h`` including all the desired headers and the -defined (and undefined) flags as follows: - -**foobinding/data/global.h** -:: - - #undef QT_NO_STL - #undef QT_NO_STL_WCHAR - - #ifndef NULL - #define NULL 0 - #endif - - #include <foo.h> - |