Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starter support for bitset #451

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ridlbe/ccmx11/facets/dds/templates/idl/dds/bitset.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

// generated from <%= ridl_template_path %>
/// @copydoc <%= doc_scoped_name %>
% annotations.each do |_a|
<%= _a.idl_stringified %>
% end
%# todo bitfield annotations and type
bitset <%= unescaped_name %><% unless base.nil? %> : <%= base.unescaped_name %><% end %> {
<%= bitfields.collect {|e| "/// @copydoc #{e.doc_scoped_name}\n bitfield<#{e.bits}> #{e.name}" }.join(",\n ") %>
};

7 changes: 6 additions & 1 deletion ridlbe/ccmx11/facets/dds/writers/ddsidl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ def visit_enum(node)

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

def visit_bitset(node)
check_namespace_begin
visitor(BitsetVisitor).visit_bitset(node)
end

def declare_union(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 @@ -27,6 +27,7 @@ module CCMX11
SequenceVisitor = Cxx11::SequenceVisitor
EnumVisitor = Cxx11::EnumVisitor
BitmaskVisitor = Cxx11::BitmaskVisitor
BitsetVisitor = Cxx11::BitsetVisitor
ArrayVisitor = Cxx11::ArrayVisitor
TypedefVisitor = Cxx11::TypedefVisitor
UnionVisitor = Cxx11::UnionVisitor
Expand Down