Skip to content

Commit

Permalink
Merge branch 'master' into jwi-overridecore
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillemsen authored Jun 17, 2024
2 parents 050abc4 + cca21bd commit a7795a3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions ridlbe/c++11/templates/cli/hdr/struct_idl_traits_def.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ struct formatter<<%= scoped_cxxtype %>, OStrm_>
<< "object}"
% end
% else
% unless _m.optional? || _m.external?
<< "<%= _sep %><%= _m.cxxname %>=" << IDL::traits<<%= _m.scoped_cxxtype %>>::write(val_.<%= _m.cxxname %> ())
% else
% if _m.optional?
<< "<%= _sep %><%= _m.cxxname %>="; if (val_.<%= _m.cxxname() %> ().has_value ()) { os_ << IDL::traits<<%= _m.scoped_cxxtype %>>::write(val_.<%= _m.cxxname %> ().value ()); } else { os_ << "std::nullopt"; } os_
% elsif _m.external?
%# TODO
%# << "<%= _sep %><%= _m.cxxname %>=" << (val_.<%= _m.cxxname() %> ().has_value () ? IDL::traits<<%= _m.scoped_cxxtype %>>::write(val_.<%= _m.cxxname %> ().value ()) : "<empty>")
% else
<< "<%= _sep %><%= _m.cxxname %>=" << IDL::traits<<%= _m.scoped_cxxtype %>>::write(val_.<%= _m.cxxname %> ())
% end
% end
% _sep = ',' unless _sep
Expand Down
1 change: 0 additions & 1 deletion ridlbe/c++11/writers/stubproxysource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def initialize(output = STDOUT, opts = {})

@default_pre_includes = []
@default_post_includes = [
'tao/x11/base/tao_corba.h',
'tao/x11/corba.h',
'tao/x11/anytypecode/typecode_impl.h',
'tao/x11/anytypecode/typecode.h'
Expand Down
1 change: 0 additions & 1 deletion ridlbe/c++11/writers/stubsource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def initialize(output = STDOUT, opts = {})
if params[:gen_any_ops] && !params[:gen_anytypecode_source]
@default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h'
end
@default_post_includes << 'tao/x11/base/tao_corba.h' unless params[:gen_stub_proxy_source]
@default_post_includes << 'tao/x11/anytypecode/typecode.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source]
@default_post_includes << 'tao/x11/anytypecode/typecode_impl.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source]
end
Expand Down
3 changes: 3 additions & 0 deletions tests/idl4/optional/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ int main (int /*argc*/, char* /*argv*/[])
bar mybar;

TAOX11_TEST_INFO << "mybar: " << mybar << std::endl;
mybar.z(6);
TAOX11_TEST_INFO << "mybar: " << mybar << std::endl;

return retval;
}
3 changes: 2 additions & 1 deletion tests/idl4/optional/test.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
struct bar
{
short x;
string y;
@optional short z;
long z_long;
@optional short a;
@optional string opt_string;
string y;
};

0 comments on commit a7795a3

Please sign in to comment.