Skip to content

Commit

Permalink
Compile namespace fixes
Browse files Browse the repository at this point in the history
    * ridlbe/c++11/templates/cli/hdr/ami/interface_amic_traits.erb:
    * ridlbe/c++11/templates/cli/prx/interface_pre.erb:
    * ridlbe/c++11/writers/amistubheader.rb:
    * ridlbe/c++11/writers/amistubsource.rb:
  • Loading branch information
jwillemsen committed Aug 18, 2023
1 parent f265193 commit 70f35d1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
41 changes: 19 additions & 22 deletions ridlbe/c++11/templates/cli/hdr/ami/interface_amic_traits.erb
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@

// generated from <%= ridl_template_path %>
namespace IDL
template <typename OStrm_>
struct formatter<<%= amic_scoped_cxxtype %>, OStrm_>
{
template <typename OStrm_>
struct formatter<<%= amic_scoped_cxxtype %>, OStrm_>
inline OStrm_& operator ()(OStrm_& os_, <%= amic_scoped_cxx_in_type %> val_)
{
inline OStrm_& operator ()(OStrm_& os_, <%= amic_scoped_cxx_in_type %> val_)
{
os_ << IDL::traits<TAOX11_CORBA::Object>::_dump (std::move (val_), "<%= formatted_cxxname %>", true);
return os_;
}
};

template <typename OStrm_, typename Fmt>
inline OStrm_& operator <<(OStrm_& os, TAOX11_CORBA::amic_traits <<%= scoped_cxxtype %>>::__Writer<Fmt> w)
{
using writer_t = TAOX11_CORBA::amic_traits <<%= scoped_cxxtype %>>::__Writer<Fmt>;
using formatter_t = typename std::conditional<
std::is_same<
typename writer_t::formatter_t,
std::false_type>::value,
IDL::formatter<<%= amic_scoped_cxxtype %>, OStrm_>,
typename writer_t::formatter_t>::type;
return TAOX11_CORBA::amic_traits <<%= scoped_cxxtype %>>::write_on (os, w.val_, formatter_t ());
os_ << IDL::traits<TAOX11_CORBA::Object>::_dump (std::move (val_), "<%= formatted_cxxname %>", true);
return os_;
}
} // namespace IDL
};

template <typename OStrm_, typename Fmt>
inline OStrm_& operator <<(OStrm_& os, TAOX11_CORBA::amic_traits <<%= scoped_cxxtype %>>::__Writer<Fmt> w)
{
using writer_t = TAOX11_CORBA::amic_traits <<%= scoped_cxxtype %>>::__Writer<Fmt>;
using formatter_t = typename std::conditional<
std::is_same<
typename writer_t::formatter_t,
std::false_type>::value,
IDL::formatter<<%= amic_scoped_cxxtype %>, OStrm_>,
typename writer_t::formatter_t>::type;
return TAOX11_CORBA::amic_traits <<%= scoped_cxxtype %>>::write_on (os, w.val_, formatter_t ());
}
4 changes: 2 additions & 2 deletions ridlbe/c++11/templates/cli/prx/interface_pre.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class <%= stub_export_macro %><%= proxy_cxxname %>
% if is_derived?
% if !has_concrete_base?
: public virtual <%= proxy_root_base %>
: public virtual <%= proxy_root_base %>
% _first = false
% else
% _first = true
Expand All @@ -13,7 +13,7 @@ class <%= stub_export_macro %><%= proxy_cxxname %>
% _first = false
% end
% else
: public virtual <%= proxy_root_base %>
: public virtual <%= proxy_root_base %>
% end
{
public:
Expand Down
4 changes: 2 additions & 2 deletions ridlbe/c++11/writers/amistubheader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,14 @@ def initialize(output = STDOUT, opts = {})
def pre_visit(_parser)
println
printiln('// generated from AmiStubHeaderAmicTraitsWriter#pre_visit')
printiln('namespace TAOX11_NAMESPACE')
printiln('namespace TAOX11_NAMESPACE::IDL')
printiln('{')
inc_nest
end

def post_visit(_parser)
dec_nest
printiln('} // namespace TAOX11_NAMESPACE')
printiln('} // namespace TAOX11_NAMESPACE::IDL')
end

def enter_interface(node)
Expand Down
4 changes: 2 additions & 2 deletions ridlbe/c++11/writers/amistubsource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -846,13 +846,13 @@ def pre_visit(parser)
super
println
printiln('// generated from AmiStubSourceSArgTraitsWriter#pre_visit')
println('namespace TAOX11_NAMESPACE {')
println('namespace TAOX11_NAMESPACE::PS {')
gen_exceptionholder_traits
end

def post_visit(parser)
println
println('} // namespace TAOX11_NAMESPACE')
println('} // namespace TAOX11_NAMESPACE::PS')
super
end

Expand Down

0 comments on commit 70f35d1

Please sign in to comment.