Skip to content

Commit

Permalink
Changed define generation
Browse files Browse the repository at this point in the history
    * ridlbe/c++11/templates/cli/hdr/post.erb:
    * ridlbe/c++11/templates/cli/src/pre.erb:
    * ridlbe/c++11/writers/stubproxysource.rb:
    * ridlbe/c++11/writers/stubsource.rb:
  • Loading branch information
jwillemsen committed Apr 9, 2024
1 parent cd09fae commit 97e62ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ridlbe/c++11/templates/cli/hdr/post.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

// generated from <%= ridl_template_path %>
%unless no_client_proxy_hdr?
#if defined (__TAOX11_INCLUDE_STUB_PROXY__) && __has_include("<%= client_proxy_hdr %>")
#if defined (__TAOX11_INCLUDE_STUB_PROXY__)
# include "<%= client_proxy_hdr %>"
#endif
%end
Expand Down
2 changes: 0 additions & 2 deletions ridlbe/c++11/templates/cli/src/pre.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* https://www.remedy.nl
*/

#define __TAOX11_INCLUDE_STUB_PROXY__

% pre_includes.each do |incfile|
#include "<%= incfile %>"
% end
Expand Down
7 changes: 7 additions & 0 deletions ridlbe/c++11/writers/stubproxysource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

module IDL
module Cxx11
class IncludeStubProxyDefineVisitor < VisitorBase
def visit
visit_template(:include_stub_proxy_define)
end
end

class StubProxySourceBaseWriter < CxxCodeWriterBase
def initialize(output = STDOUT, opts = {})
super
Expand Down Expand Up @@ -250,6 +256,7 @@ def post_visit(_parser)
properties[:pre_includes] = @default_pre_includes
properties[:post_includes] = @default_post_includes
properties[:includes] = @includes
visitor(IncludeStubProxyDefineVisitor).visit
visitor(PreVisitor).visit
end

Expand Down
8 changes: 7 additions & 1 deletion ridlbe/c++11/writers/stubsource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

module IDL
module Cxx11
class IncludeStubProxyDefineVisitor < VisitorBase
def visit
visit_template(:include_stub_proxy_define)
end
end

class StubSourceBaseWriter < CxxCodeWriterBase
def initialize(output = STDOUT, opts = {})
super
Expand Down Expand Up @@ -213,6 +219,7 @@ def post_visit(_parser)
properties[:pre_includes] = @default_pre_includes
properties[:post_includes] = @default_post_includes
properties[:includes] = @includes
visitor(IncludeStubProxyDefineVisitor).visit unless params[:gen_client_proxy_source]
visitor(PreVisitor).visit
end

Expand Down Expand Up @@ -460,7 +467,6 @@ def enter_valuetype(node)
end
end


class StubSourceAnyOpWriter < StubSourceBaseWriter
def initialize(output = STDOUT, opts = {})
super
Expand Down

0 comments on commit 97e62ec

Please sign in to comment.