Skip to content

Commit

Permalink
Merge pull request #315 from jwillemsen/jwi-bitmaskcdrtest
Browse files Browse the repository at this point in the history
Add bitmask CDR support with test
  • Loading branch information
jwillemsen authored Aug 17, 2023
2 parents 8481afb + 3c2c5cd commit 91f52a0
Show file tree
Hide file tree
Showing 50 changed files with 675 additions and 415 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ namespace TAOX11_NAMESPACE
object_traits<<%= amic_scoped_cxxtype %>>::narrow (object_traits<TAOX11_NAMESPACE::CORBA::Object>::ref_type);
% end
% end
} // namespace CORBA

namespace CORBA
{
template<>
struct amic_traits <<%= scoped_cxxtype %>> :
public IDL::common_byval_traits <CORBA::object_reference <<%= amic_scoped_cxxtype %>>>,
Expand Down
19 changes: 5 additions & 14 deletions ridlbe/c++11/templates/cli/prx/array_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,12 @@
// MD5 : <%= alias_md5 %>
#if !defined (_ALIAS_<%= alias_md5 %>_ARG_TRAITS_)
#define _ALIAS_<%= alias_md5 %>_ARG_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

Expand Down
19 changes: 5 additions & 14 deletions ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
% _traits_incl_guard_ = scoped_cxxname.to_include_guard
# if !defined (_<%= _traits_incl_guard_ %>_TRAITS_)
# define _<%= _traits_incl_guard_ %>_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};
# endif // !_<%= _traits_incl_guard_ %>_TRAITS_

TAO_BEGIN_VERSIONED_NAMESPACE_DECL
Expand Down
21 changes: 21 additions & 0 deletions ridlbe/c++11/templates/cli/prx/bitset_cdr.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

// generated from <%= ridl_template_path %>
% _traits_incl_guard_ = scoped_cxxname.to_include_guard
# if !defined (_<%= _traits_incl_guard_ %>_TRAITS_)
# define _<%= _traits_incl_guard_ %>_TRAITS_
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
};
# endif // !_<%= _traits_incl_guard_ %>_TRAITS_

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

/// @name CDR streaming operator specializations for <%= scoped_cxxname %>
//@{
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&);
//@}

TAO_END_VERSIONED_NAMESPACE_DECL
19 changes: 5 additions & 14 deletions ridlbe/c++11/templates/cli/prx/enum_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
% _traits_incl_guard_ = scoped_cxxname.to_include_guard
# if !defined (_<%= _traits_incl_guard_ %>_TRAITS_)
# define _<%= _traits_incl_guard_ %>_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};
# endif // !_<%= _traits_incl_guard_ %>_TRAITS_

TAO_BEGIN_VERSIONED_NAMESPACE_DECL
Expand Down
35 changes: 9 additions & 26 deletions ridlbe/c++11/templates/cli/prx/interface_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
% _traits_incl_guard_ = scoped_proxy_cxxname.to_include_guard
#if !defined (_<%= _traits_incl_guard_ %>_ARG_TRAITS_)
#define _<%= _traits_incl_guard_ %>_ARG_TRAITS_
namespace TAOX11_NAMESPACE
/// Arg traits specializations.
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxx_traits_type %>::ref_type, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
// Arg traits specializations.
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxx_traits_type %>::ref_type,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};
#endif // !_<%= _traits_incl_guard_ %>_ARG_TRAITS_

% _cdr_incl_guard_ = scoped_cxxname.to_include_guard
Expand All @@ -31,21 +22,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
% if is_abstract?
%# Abstract interfaces
%#
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (
TAO_OutputCDR &,
<%= scoped_cxx_in_type %>);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (
TAO_InputCDR &,
<%= scoped_cxx_out_type %>);
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, <%= scoped_cxx_in_type %>);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxx_out_type %>);
% else
%# Remote interfaces
%#
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (
TAO_OutputCDR &strm,
<%= scoped_cxx_in_type %> _tao_objref);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (
TAO_InputCDR &strm,
<%= scoped_cxx_out_type %> _tao_objref);
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &strm, <%= scoped_cxx_in_type %> _tao_objref);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, <%= scoped_cxx_out_type %> _tao_objref);
% end
//@}

Expand Down
17 changes: 7 additions & 10 deletions ridlbe/c++11/templates/cli/prx/interface_object_ref_traits.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
#if !defined (_INTF_<%= _intf_traits_decl_incl_guard_ %>_OBJ_REF_TRAITS_)
#define _INTF_<%= _intf_traits_decl_incl_guard_ %>_OBJ_REF_TRAITS_
% unless is_abstract?
namespace TAO
template<>
struct TAO::Objref_Traits<<%= scoped_proxy_cxxname %>>
{
template<>
struct Objref_Traits<<%= scoped_proxy_cxxname %>>
{
static <%= scoped_proxy_cxxname %>_ptr duplicate (<%= scoped_proxy_cxxname %>_ptr p);
static void release (<%= scoped_proxy_cxxname %>_ptr p);
static <%= scoped_proxy_cxxname %>_ptr nil ();
static ::TAO_CORBA::Boolean marshal (const <%= scoped_proxy_cxxname %>_ptr p, TAO_OutputCDR & cdr);
};
} // namespace TAO
static <%= scoped_proxy_cxxname %>_ptr duplicate (<%= scoped_proxy_cxxname %>_ptr p);
static void release (<%= scoped_proxy_cxxname %>_ptr p);
static <%= scoped_proxy_cxxname %>_ptr nil ();
static ::TAO_CORBA::Boolean marshal (const <%= scoped_proxy_cxxname %>_ptr p, TAO_OutputCDR & cdr);
};
% end
#endif // !_INTF_<%= _intf_traits_decl_incl_guard_ %>_OBJ_REF_TRAITS_
TAO_END_VERSIONED_NAMESPACE_DECL
23 changes: 5 additions & 18 deletions ridlbe/c++11/templates/cli/prx/map_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,12 @@
// MD5 : <%= alias_md5 %>
#if !defined (_ALIAS_<%= alias_md5 %>_ARG_TRAITS_)
#define _ALIAS_<%= alias_md5 %>_ARG_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
% if generate_anyinsert_adapter?
Any_Insert_Policy_AnyInsert_Adapter>
% else
Any_Insert_Policy_Stream>
% end
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

Expand Down
23 changes: 5 additions & 18 deletions ridlbe/c++11/templates/cli/prx/sequence_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,12 @@
// MD5 : <%= alias_md5 %>
#if !defined (_ALIAS_<%= alias_md5 %>_ARG_TRAITS_)
#define _ALIAS_<%= alias_md5 %>_ARG_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %><% if generate_anyinsert_adapter? %>Any_Insert_Policy_AnyInsert_Adapter<% else %>Any_Insert_Policy_Stream<% end %><% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
% if generate_anyinsert_adapter?
Any_Insert_Policy_AnyInsert_Adapter>
% else
Any_Insert_Policy_Stream>
% end
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

Expand Down
28 changes: 7 additions & 21 deletions ridlbe/c++11/templates/cli/prx/string_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,19 @@
// MD5 : <%= alias_md5 %>
#if !defined (_ALIAS_<%= alias_md5 %>_ARG_TRAITS_)
#define _ALIAS_<%= alias_md5 %>_ARG_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %><% if generate_anyinsert_adapter? %>Any_Insert_Policy_AnyInsert_Adapter<% else %>Any_Insert_Policy_Stream<% end %><% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
% if generate_anyinsert_adapter?
Any_Insert_Policy_AnyInsert_Adapter>
% else
Any_Insert_Policy_Stream>
% end
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

#define _ALIAS_<%= scoped_cxxname.scope_to_cxxname %>_CDR_OPS_IMPL_

// CDR streaming methods for <%= scoped_cxxname %>
/// CDR streaming methods for <%= scoped_cxxname %>
<%= stub_export_macro %>bool _cdr_in_<%= scoped_cxxname.scope_to_cxxname %> (TAO_OutputCDR &, const IDL::traits<<%= scoped_cxxtype %>>::value_type&);
<%= stub_export_macro %>bool _cdr_out_<%= scoped_cxxname.scope_to_cxxname %> (TAO_InputCDR &, IDL::traits<<%= scoped_cxxtype %>>::value_type&);
#define _ALIAS_<%= scoped_cxxname.scope_to_cxxname %>_CDR_OPS_IMPL_

/// @name CDR streaming operator specializations for <%= scoped_cxxname %>
//@{
Expand Down
19 changes: 5 additions & 14 deletions ridlbe/c++11/templates/cli/prx/struct_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
% _traits_incl_guard_ = scoped_cxxname.to_include_guard
# if !defined (_<%= _traits_incl_guard_ %>_TRAITS_)
# define _<%= _traits_incl_guard_ %>_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};
# endif // !_<%= _traits_incl_guard_ %>_TRAITS_

TAO_BEGIN_VERSIONED_NAMESPACE_DECL
Expand Down
19 changes: 5 additions & 14 deletions ridlbe/c++11/templates/cli/prx/union_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
% _traits_incl_guard_ = scoped_cxxname.to_include_guard
# if !defined (_<%= _traits_incl_guard_ %>_TRAITS_)
# define _<%= _traits_incl_guard_ %>_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<<%= scoped_cxxtype %>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
<%= scoped_cxxtype %>,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};
# endif // !_<%= _traits_incl_guard_ %>_TRAITS_

TAO_BEGIN_VERSIONED_NAMESPACE_DECL
Expand Down
27 changes: 7 additions & 20 deletions ridlbe/c++11/templates/cli/prx/value_cdr.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
% _traits_incl_guard_ = scoped_cxxname.to_include_guard
# if !defined (_CDR_<%= _traits_incl_guard_ %>_TRAITS_)
# define _CDR_<%= _traits_incl_guard_ %>_TRAITS_
namespace TAOX11_NAMESPACE
/// Argument traits specializations for <%= name %>
template<>
class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<TAOX11_CORBA::valuetype_reference<<%= scoped_cxxtype %>>, <% if generate_any_support? %>Any_Insert_Policy_Stream<% else %>Any_Insert_Policy_Noop<% end %>>
{
/// Argument traits specializations for <%= name %>
template<>
class Arg_Traits<<%= scoped_cxxtype %>>
: public Basic_Arg_Traits_T<
TAOX11_CORBA::valuetype_reference<<%= scoped_cxxtype %>>,
% if generate_any_support?
Any_Insert_Policy_Stream>
% else
Any_Insert_Policy_Noop>
% end
{
};
} // namespace TAOX11_NAMESPACE
};
# endif // !_CDR_<%= _traits_incl_guard_ %>_TRAITS_

# if !defined (_VALUETYPE_<%= _traits_incl_guard_ %>_CDR_OPS_)
Expand All @@ -27,12 +18,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL

/// @name CDR streaming operator specializations for <%= scoped_cxxname %>
//@{
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (
TAO_OutputCDR &,
<%= scoped_cxx_in_type %>);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (
TAO_InputCDR &,
<%= scoped_cxx_out_type %>);
<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, <%= scoped_cxx_in_type %>);
<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxx_out_type %>);
//@}

TAO_END_VERSIONED_NAMESPACE_DECL
Expand Down
Loading

0 comments on commit 91f52a0

Please sign in to comment.