#include <string>
+#include "RequestResponseBus.hh"
+
+using namespace plpbus_orb;
+
namespace plpbus {
class BusMessage
{
public:
- void *_dataItemSeq;
+ DataItemSequence *_dataItemSeq;
BusMessage(long type_param);
BusMessage(long type_param, const char *arg_name_param, const char *arg_string_value_param);
}
}
+void copy( const DataItemSequence& orig_seq )
+{
+ DataItemSequence new_seq;
+
+ new_seq = orig_seq;
+}
+
CORBA::Long OrbServerImpl::send_dataitem_message_and_wait_response(const DataItemSequence& req_seq_param,
DataItemSequence_out rsp_seq_param) {
- BusMessage *msg_req;
- BusMessage *msg_rsp;
- DataItemSequence *seq;
- int err_flg;
+ BusMessage *msg_req;
+ BusMessage *msg_rsp;
+ int err_flg;
- seq = NULL;
- msg_rsp = NULL;
msg_req = new BusMessageInternal(req_seq_param);
msg_rsp = new BusMessage(msg_req->get_type(&err_flg));
_listener->request_received(msg_req, msg_rsp);
- if (msg_rsp != NULL) {
- seq = (DataItemSequence *)msg_rsp->_dataItemSeq;
- }
- else {
- seq = new DataItemSequence();
- }
- rsp_seq_param._data = seq;
+ rsp_seq_param._data = new DataItemSequence(*(msg_rsp->_dataItemSeq));
+ delete(msg_req);
+ delete(msg_rsp);
return 0;
}