summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-02-16 07:59:36 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-02-16 17:24:52 -0300
commit8c9f9660f04d1c5e462f6a815329bffa90327618 (patch)
tree9f2e3f046511fddb6eca94a46a994bb37a1d7e11
parentc4f21744c7148f7cbb593f8bfe3cdd524abd912b (diff)
Added the "--drop-type-entries=<entries>" command line option.sb-0.6.6
The documentation was updates on this and older things. Reviewed by Bruno Ara├║jo <bruno.araujo@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--CMakeLists.txt2
-rw-r--r--data/generatorrunner.114
-rw-r--r--doc/commandlineoptions.rst8
-rw-r--r--main.cpp4
4 files changed, 20 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 926012d2..d6615e74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project(generatorrunner)
cmake_minimum_required(VERSION 2.6)
find_package(Qt4 4.5.0 REQUIRED)
-find_package(ApiExtractor 0.9.5 REQUIRED)
+find_package(ApiExtractor 0.10.0 REQUIRED)
option(BUILD_TESTS "Build tests." TRUE)
option(INSTALL_TESTS "Install tests" FALSE)
diff --git a/data/generatorrunner.1 b/data/generatorrunner.1
index 072d373a..045b55ad 100644
--- a/data/generatorrunner.1
+++ b/data/generatorrunner.1
@@ -2,14 +2,13 @@
.SH NAME
generatorrunner - plugin-based binding source code generator
.SH SYNOPSIS
-.B generatorrunner \-\-generatorSet=<plugin name> [options] header-file typesystem-file
-.B ...
+.B generatorrunner \-\-generator-set=<plugin name> [options] header-file typesystem-file
.SH DESCRIPTION
.B generatorrunner
is a utility that uses the information taken from APIExtractor
related to the provided C++ headers and typesystem files and execute
generators using this information. Generators are plugins and you need
-to specify one using the \-\-generatorSet parameter. At the moment there
+to specify one using the \-\-generator-set parameter. At the moment there
are two generators available:
.B qtdoc
@@ -18,7 +17,7 @@ are two generators available:
documentation syntax, using the XML files created by the documentation tool
.B (qdoc3).
Can be called supplying
-.B \-\-generatorSet=qtdoc
+.B \-\-generator-set=qtdoc
to
.B generatorrunner
or by calling the convenience executable
@@ -33,12 +32,15 @@ architecture and current limitations, refer to http://www.pyside.org/home-bindin
.SH OPTIONS
.SS "General options"
+.IP \-\-api-version=<version>
+Specify the supported api version used to generate the bindings.
.IP \-\-debug-level=[sparse|medium|full]
The amount of messages displayed.
.IP \-\-documentation-only
Only generates the documentation.
-.TP
-.BI \-\-help \fR,\fP \-h \fR,\fP -?
+.IP \-\-drop-type-entries="<TypeEntry0>[;TypeEntry1;...]"
+Semicolon separated list of type system entries (classes, namespaces, global functions and enums) to be dropped from generation.
+.IP \-\-help \fR,\fP \-h \fR,\fP -?
Prints the usage message.
.IP \-\-project-file=<file>
Text file containing a description of the binding project. Replaces and overrides command line arguments.
diff --git a/doc/commandlineoptions.rst b/doc/commandlineoptions.rst
index 0761982d..7cc829de 100644
--- a/doc/commandlineoptions.rst
+++ b/doc/commandlineoptions.rst
@@ -16,7 +16,7 @@ Options
.. _api-version:
-``--api-version``
+``--api-version=<version>``
Specify the supported api version used to generate the bindings.
.. _debug-level:
@@ -29,6 +29,12 @@ Options
``--documentation-only``
Do not generate any code, just the documentation.
+.. _drop-type-entries:
+
+``--drop-type-entries="<TypeEntry0>[;TypeEntry1;...]"``
+ Semicolon separated list of type system entries (classes, namespaces,
+ global functions and enums) to be dropped from generation.
+
.. _generation-set:
``--generation-set``
diff --git a/main.cpp b/main.cpp
index 1e4e65fe..804faf7d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -181,6 +181,7 @@ void printUsage(const GeneratorList& generators)
generalOptions.insert("version", "Output version information and exit");
generalOptions.insert("generator-set=<\"generator module\">", "generator-set to be used. e.g. qtdoc");
generalOptions.insert("api-version=<\"version\">", "Specify the supported api version used to generate the bindings");
+ generalOptions.insert("drop-type-entries=\"<TypeEntry0>[;TypeEntry1;...]\"", "Semicolon separated list of type system entries (classes, namespaces, global functions and enums) to be dropped from generation.");
printOptions(s, generalOptions);
foreach (Generator* generator, generators) {
@@ -296,6 +297,9 @@ int main(int argc, char *argv[])
if (args.contains("api-version"))
extractor.setApiVersion(args["api-version"].toDouble());
+ if (args.contains("drop-type-entries"))
+ extractor.setDropTypeEntries(args["drop-type-entries"]);
+
if (args.contains("typesystem-paths"))
extractor.addTypesystemSearchPath(args.value("typesystem-paths").split(PATH_SPLITTER));
if (!args.value("include-paths").isEmpty())