From fbc0227d563ab48474b03a6043be176a0b95ed6f Mon Sep 17 00:00:00 2001 From: Andreas Volz Date: Sat, 28 Mar 2009 23:01:26 +0100 Subject: [PATCH] use extern variable --- tools/generate_adaptor.cpp | 17 +++-------------- tools/generate_proxy.cpp | 17 +++-------------- tools/generator_utils.cpp | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 28 deletions(-) diff --git a/tools/generate_adaptor.cpp b/tools/generate_adaptor.cpp index cac6bfc..ce62b37 100644 --- a/tools/generate_adaptor.cpp +++ b/tools/generate_adaptor.cpp @@ -7,20 +7,9 @@ using namespace std; using namespace DBus; -static const char *tab = " "; - -static const char *header = "\n\ -/*\n\ - * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n\ - */\n\ -\n\ -"; - -static const char *dbus_includes = "\n\ -#include \n\ -#include \n\n\ -\n\ -"; +extern const char *tab; +extern const char *header; +extern const char *dbus_includes; /*! Generate adaptor code for a XML introspection */ diff --git a/tools/generate_proxy.cpp b/tools/generate_proxy.cpp index 64da9fa..743ba30 100644 --- a/tools/generate_proxy.cpp +++ b/tools/generate_proxy.cpp @@ -7,20 +7,9 @@ using namespace std; using namespace DBus; -static const char *tab = " "; - -static const char *header = "\n\ -/*\n\ - * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n\ - */\n\ -\n\ -"; - -static const char *dbus_includes = "\n\ -#include \n\ -#include \n\n\ -\n\ -"; +extern const char *tab; +extern const char *header; +extern const char *dbus_includes; /*! Generate proxy code for a XML introspection */ diff --git a/tools/generator_utils.cpp b/tools/generator_utils.cpp index 4ebeb98..e033d5a 100644 --- a/tools/generator_utils.cpp +++ b/tools/generator_utils.cpp @@ -4,6 +4,21 @@ using namespace std; +const char *tab = " "; + +const char *header = "\n\ +/*\n\ + * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!\n\ + */\n\ +\n\ +"; + +const char *dbus_includes = "\n\ +#include \n\ +#include \n\n\ +\n\ +"; + const char *atomic_type_to_string(char t) { static struct { char type; const char *name; } atos[] =