summaryrefslogtreecommitdiff
path: root/cesar/maximus
diff options
context:
space:
mode:
authorThierry Carré2013-03-22 14:13:53 +0100
committerNicolas Schodet2013-03-27 16:22:09 +0100
commitb4c02afaf40342a4ff6653d0eb0fdfa08b99fa08 (patch)
tree169e3805edb2fb75efa09436ff5a6a9d6fc20f64 /cesar/maximus
parentf5cffd8d7318e244fb4b97cd0ea27876f14c1041 (diff)
cesar/maximus: make MsgFunctionCall::send return the response
Diffstat (limited to 'cesar/maximus')
-rw-r--r--cesar/maximus/interface/msg/inc/MsgFunctionCall.h4
-rw-r--r--cesar/maximus/interface/msg/src/MsgFunctionCall.cpp8
-rw-r--r--cesar/maximus/python/boost/src/msg.cpp6
3 files changed, 11 insertions, 7 deletions
diff --git a/cesar/maximus/interface/msg/inc/MsgFunctionCall.h b/cesar/maximus/interface/msg/inc/MsgFunctionCall.h
index b956654068..c2c3fd34ae 100644
--- a/cesar/maximus/interface/msg/inc/MsgFunctionCall.h
+++ b/cesar/maximus/interface/msg/inc/MsgFunctionCall.h
@@ -132,9 +132,9 @@ public:
void send_async ();
void send_async_2 (const Station &sta);
- void send ();
+ MsgFunctionCall *send ();
- void send_2 (const Station &sta);
+ MsgFunctionCall *send_2 (const Station &sta);
bool is_param (const std::string &name) const;
diff --git a/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp b/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp
index e094735b28..a4a2d259a3 100644
--- a/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp
+++ b/cesar/maximus/interface/msg/src/MsgFunctionCall.cpp
@@ -312,11 +312,11 @@ MsgFunctionCall::send_async_2 (const Station &sta)
send_async ();
}
-void
+MsgFunctionCall *
MsgFunctionCall::send_2 (const Station &sta)
{
set_sta (sta);
- send ();
+ return send ();
}
void
@@ -339,7 +339,7 @@ MsgFunctionCall::send_async ()
clear_list_of_parameters ();
}
-void
+MsgFunctionCall *
MsgFunctionCall::send ()
{
logFunction ();
@@ -368,6 +368,8 @@ MsgFunctionCall::send ()
/* Free python dependency. */
mCallback = cb_t ();
}
+
+ return this;
}
bool
diff --git a/cesar/maximus/python/boost/src/msg.cpp b/cesar/maximus/python/boost/src/msg.cpp
index 8dd095b644..54afccfb9e 100644
--- a/cesar/maximus/python/boost/src/msg.cpp
+++ b/cesar/maximus/python/boost/src/msg.cpp
@@ -46,8 +46,10 @@ export_msg ()
bp::with_custodian_and_ward <1, 2> ())
.def ("send_async", &MsgFunctionCall::send_async)
.def ("send_async", &MsgFunctionCall::send_async_2)
- .def ("send", &MsgFunctionCall::send)
- .def ("send", &MsgFunctionCall::send_2)
+ .def ("send", &MsgFunctionCall::send,
+ boost::python::return_internal_reference <>())
+ .def ("send", &MsgFunctionCall::send_2,
+ boost::python::return_internal_reference <>())
.def ("is_param", &MsgFunctionCall::is_param)
.def ("bind_param", &MsgFunctionCall::bind_param_1)
.def ("bind_param_string", &MsgFunctionCall::bind_param_string)