Skip to content

Commit

Permalink
Separate header visitor
Browse files Browse the repository at this point in the history
    * ridlbe/c++11/templates/cli/src/header.erb:
      Added.

    * ridlbe/c++11/templates/cli/src/pre.erb:
    * ridlbe/c++11/visitors/pre_post.rb:
    * ridlbe/c++11/writers/stubproxysource.rb:
    * ridlbe/c++11/writers/stubsource.rb:
  • Loading branch information
jwillemsen committed Apr 9, 2024
1 parent 6f3169d commit 182e7fa
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions ridlbe/c++11/templates/cli/src/header.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* **** Code generated by the RIDL Compiler ****
* RIDL has been developed by:
* Remedy IT Expertise BV
* The Netherlands
* https://www.remedy.nl
*/
8 changes: 0 additions & 8 deletions ridlbe/c++11/templates/cli/src/pre.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/**
* **** Code generated by the RIDL Compiler ****
* RIDL has been developed by:
* Remedy IT Expertise BV
* The Netherlands
* https://www.remedy.nl
*/

% pre_includes.each do |incfile|
#include "<%= incfile %>"
% end
Expand Down
6 changes: 6 additions & 0 deletions ridlbe/c++11/visitors/pre_post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@ def visit
visit_template(:post)
end
end

class HeaderVisitor < VisitorBase
def visit
visit_template(:header)
end
end
end
end
1 change: 1 addition & 0 deletions ridlbe/c++11/writers/stubproxysource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def post_visit(_parser)
properties[:pre_includes] = @default_pre_includes
properties[:post_includes] = @default_post_includes
properties[:includes] = @includes
visitor(HeaderVisitor).visit
visitor(IncludeStubProxyDefineVisitor).visit
visitor(PreVisitor).visit
end
Expand Down
1 change: 1 addition & 0 deletions ridlbe/c++11/writers/stubsource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def post_visit(_parser)
properties[:pre_includes] = @default_pre_includes
properties[:post_includes] = @default_post_includes
properties[:includes] = @includes
visitor(HeaderVisitor).visit
visitor(IncludeStubProxyDefineVisitor).visit unless params[:gen_client_proxy_source]
visitor(PreVisitor).visit
end
Expand Down

0 comments on commit 182e7fa

Please sign in to comment.