fixed a method generation bug with inarg

This commit is contained in:
Andreas Volz 2008-09-13 20:07:58 +02:00
parent f353aae43e
commit c1c741cb0c
3 changed files with 18 additions and 5 deletions

View file

@ -6,7 +6,8 @@ AM_CPPFLAGS = \
$(dbus_CFLAGS) \
$(xml_CFLAGS) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include
-I$(top_builddir)/include \
-Wall
if CROSS_COMPILING
libdbus_cxx_la = $(BUILD_LIBDBUS_CXX_DIR)/src/libdbus-c++-1.la

View file

@ -475,7 +475,8 @@ void generate_proxy(Xml::Document &doc, const char *filename)
if (!arg_name.length())
{
arg_name = "argin" + j;
arg_name = "argin";
arg_name += toString <uint> (j);
}
// generate extra code to wrap object
@ -561,7 +562,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
if (!arg_name.length())
{
arg_name = "argout" + i;
arg_name = "argout" + toString <uint> (i);
}
if (arg_object.length())
@ -673,7 +674,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
// use a default if no arg name given
if (!arg_name.length())
{
arg_name = "arg";
arg_name = "arg" + toString <uint> (i);
}
body << arg_name << ";" << endl;
@ -700,7 +701,7 @@ void generate_proxy(Xml::Document &doc, const char *filename)
if (!arg_name.length())
{
arg_name = "arg" + j;
arg_name = "arg" + toString <uint> (j);
}
if (arg_object.length())

View file

@ -31,6 +31,17 @@
#include <dbus-c++/dbus.h>
#include <dbus/dbus.h>
#include <sstream>
#include <iomanip>
/// create std::string from any number
template <typename T>
std::string toString (const T &thing, int w = 0, int p = 0)
{
std::ostringstream os;
os << std::setw(w) << std::setprecision(p) << thing;
return os.str();
}
#include "xml.h"