Skip to content

Commit

Permalink
Merge pull request #403 from jwillemsen/jwi-bitmask
Browse files Browse the repository at this point in the history
Generate bitmask in implied IDL
  • Loading branch information
jwillemsen committed Aug 7, 2023
2 parents 7ffbf45 + ead4918 commit 770fcce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ridlbe/ccmx11/facets/dds/templates/idl/dds/bitmask.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

// generated from <%= ridl_template_path %>
/// @copydoc <%= doc_scoped_name %>
@bit_bound(<%= bitbound_bits %>)
bitmask <%= unescaped_name %> {
<%= bitvalues.collect {|e| "/// @copydoc #{e.doc_scoped_name}\n #{e.name}" }.join(",\n ") %>
};

5 changes: 5 additions & 0 deletions ridlbe/ccmx11/facets/dds/writers/ddsidl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def visit_enum(node)
visitor(EnumVisitor).visit_enum(node)
end

def visit_bitmask(node)
check_namespace_begin
visitor(BitMaskVisitor).visit_bitmask(node)
end

def declare_union(node)
check_namespace_begin
visitor(UnionVisitor).visit_fwd(node)
Expand Down
1 change: 1 addition & 0 deletions ridlbe/ccmx11/visitors/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module CCMX11
AttributeVisitor = Cxx11::AttributeVisitor
SequenceVisitor = Cxx11::SequenceVisitor
EnumVisitor = Cxx11::EnumVisitor
BitmaskVisitor = Cxx11::BitmaskVisitor
ArrayVisitor = Cxx11::ArrayVisitor
TypedefVisitor = Cxx11::TypedefVisitor
UnionVisitor = Cxx11::UnionVisitor
Expand Down

0 comments on commit 770fcce

Please sign in to comment.