Skip to content

Commit

Permalink
Merge pull request #411 from jwillemsen/jwi-exfcdrfom
Browse files Browse the repository at this point in the history
Reproduce and fix problem in ExF CORBA4CCM code generation
  • Loading branch information
jwillemsen authored Sep 18, 2023
2 parents bc214d7 + 7e4c537 commit 3eb7281
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void
}
else
{
if (!(this->_exf_rh_output () << <%= cdr_to_fmt % 'this->val_' %>))
if (!(this->_exf_rh_output () << <%= cdr_from_fmt % 'this->val_' %>))
{
throw TAO_CORBA::MARSHAL();
}
Expand All @@ -45,7 +45,7 @@ void
{
TAO_InputCDR & _tao_in = *srvreq.incoming ();

if (!((_tao_in >> <%= cdr_from_fmt % 'this->val_' %>)))
if (!((_tao_in >> <%= cdr_to_fmt % 'this->val_' %>)))
{
throw TAO_CORBA::MARSHAL();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void
% _in_args = in_arguments.dup
% while !_in_args.empty?
% _arg = _in_args.shift
(_tao_in >> <%= _arg.cdr_from_fmt % "this->#{_arg.cxxname}" %>)<% unless _in_args.empty? %> &&<% end %>
(_tao_in >> <%= _arg.cdr_to_fmt % "this->#{_arg.cxxname}" %>)<% unless _in_args.empty? %> &&<% end %>
% end
))
{
Expand Down Expand Up @@ -76,11 +76,11 @@ void
if (!(
% _out_args = out_arguments.dup
% unless is_oneway? || is_void?
(this->_exf_rh_output () << <%= cdr_to_fmt % 'this->retval' %>)<% unless _out_args.empty? %> &&<% end %>
(this->_exf_rh_output () << <%= cdr_from_fmt % 'this->retval' %>)<% unless _out_args.empty? %> &&<% end %>
% end
% while !_out_args.empty?
% _arg = _out_args.shift
(this->_exf_rh_output () << <%= _arg.cdr_to_fmt % "this->#{_arg.cxxname}" %>)<% unless _out_args.empty? %> &&<% end %>
(this->_exf_rh_output () << <%= _arg.cdr_from_fmt % "this->#{_arg.cxxname}" %>)<% unless _out_args.empty? %> &&<% end %>
% end
))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,70 @@ namespace Hello_Receiver_Impl
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::op_B[_in_l_s_in_l]
}

bool
do_my_B_exec_i::op_C (
int32_t in_c,
bool in_b,
bool& out_b,
bool& inout_b)
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::op_C[_in_c_in_b_out_b_inout_b]
X11_UNUSED_ARG(in_c);
X11_UNUSED_ARG(in_b);
X11_UNUSED_ARG(out_b);
X11_UNUSED_ARG(inout_b);
return {};
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::op_C[_in_c_in_b_out_b_inout_b]
}

bool
do_my_B_exec_i::op_D (
int32_t in_c,
uint8_t in_b,
uint8_t& out_b,
uint8_t& inout_b)
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::op_D[_in_c_in_b_out_b_inout_b]
X11_UNUSED_ARG(in_c);
X11_UNUSED_ARG(in_b);
X11_UNUSED_ARG(out_b);
X11_UNUSED_ARG(inout_b);
return {};
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::op_D[_in_c_in_b_out_b_inout_b]
}

bool
do_my_B_exec_i::op_E (
int32_t in_c,
char in_b,
char& out_b,
char& inout_b)
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::op_E[_in_c_in_b_out_b_inout_b]
X11_UNUSED_ARG(in_c);
X11_UNUSED_ARG(in_b);
X11_UNUSED_ARG(out_b);
X11_UNUSED_ARG(inout_b);
return {};
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::op_E[_in_c_in_b_out_b_inout_b]
}

bool
do_my_B_exec_i::op_F (
int32_t in_c,
wchar_t in_b,
wchar_t& out_b,
wchar_t& inout_b)
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::op_F[_in_c_in_b_out_b_inout_b]
X11_UNUSED_ARG(in_c);
X11_UNUSED_ARG(in_b);
X11_UNUSED_ARG(out_b);
X11_UNUSED_ARG(inout_b);
return {};
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::op_F[_in_c_in_b_out_b_inout_b]
}

int32_t
do_my_B_exec_i::op_A (
int32_t in_l)
Expand All @@ -73,6 +137,40 @@ namespace Hello_Receiver_Impl
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::op_A[_in_l]
}

bool
do_my_B_exec_i::at_D ()
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::at_D[getter]
return this->at_D_;
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::at_D[getter]
}

void
do_my_B_exec_i::at_D (
bool at_D)
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::at_D[setter]
this->at_D_ = at_D;
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::at_D[setter]
}

int32_t
do_my_B_exec_i::at_E ()
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::at_E[getter]
return this->at_E_;
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::at_E[getter]
}

void
do_my_B_exec_i::at_E (
int32_t at_E)
{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i::at_E[setter]
this->at_E_ = at_E;
//@@{__RIDL_REGEN_MARKER__} - END : Hello_Receiver_Impl::do_my_B_exec_i::at_E[setter]
}

/**
* Component Executor Implementation Class : Receiver_exec_i
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,47 @@ namespace Hello_Receiver_Impl
int32_t in_l,
const ::Hello::S1& s_in_l) override;

bool
op_C (
int32_t in_c,
bool in_b,
bool& out_b,
bool& inout_b) override;

bool
op_D (
int32_t in_c,
uint8_t in_b,
uint8_t& out_b,
uint8_t& inout_b) override;

bool
op_E (
int32_t in_c,
char in_b,
char& out_b,
char& inout_b) override;

bool
op_F (
int32_t in_c,
wchar_t in_b,
wchar_t& out_b,
wchar_t& inout_b) override;

int32_t
op_A (
int32_t in_l) override;
//@}

/** @name Attributes from ::Hello::CCM_B */
//@{
bool at_D () override;
void at_D (bool at_D) override;
int32_t at_E () override;
void at_E (int32_t at_E) override;
//@}

/** @name User defined public operations. */
//@{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i[user_public_ops]
Expand All @@ -73,6 +109,14 @@ namespace Hello_Receiver_Impl
/// Context for component instance. Used for all middleware communication.
IDL::traits<::Hello::CCM_Receiver_Context>::ref_type context_;

/** @name Members to store attribute values from ::Hello::CCM_B */
//@{
/// Class member storing value of at_D attribute
bool at_D_{};
/// Class member storing value of at_E attribute
int32_t at_E_{};
//@}

/** @name User defined members. */
//@{
//@@{__RIDL_REGEN_MARKER__} - BEGIN : Hello_Receiver_Impl::do_my_B_exec_i[user_members]
Expand Down
7 changes: 6 additions & 1 deletion exf/tests/apc/ext-sync-complex/data2/hello2.idl
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@

module Hello
{

// Sender/Receiver interface
interface B:A
{
long op_B (in long in_l, in S1 s_in_l);
boolean op_C (in long in_c, in boolean in_b, out boolean out_b, inout boolean inout_b);
boolean op_D (in long in_c, in octet in_b, out octet out_b, inout octet inout_b);
boolean op_E (in long in_c, in char in_b, out char out_b, inout char inout_b);
boolean op_F (in long in_c, in wchar in_b, out wchar out_b, inout wchar inout_b);
attribute boolean at_D;
attribute long at_E;
};
};

Expand Down

0 comments on commit 3eb7281

Please sign in to comment.