-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from jwillemsen/jwi-bitmaskbitbound
Add initial support for specifying a bit_bound for a bit_mask
- Loading branch information
Showing
9 changed files
with
103 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
// generated from <%= ridl_template_path %> | ||
/// @copydoc <%= doc_scoped_name %> | ||
enum <%= cxxname %>Bit : uint32_t | ||
enum <%= cxxname %>Bit : <%= bitbound.cxx_member_type %> | ||
{ | ||
<%= bitvalues.collect {|e| "/// @copydoc #{doc_scoped_name}::#{e.name}\n #{e.cxxname} = #{e.value}" }.join(",\n ") %> | ||
};// <%= cxxname %>Bit | ||
using <%= cxxname %> = uint32_t; | ||
using <%= cxxname %> = <%= bitbound.cxx_member_type %>; | ||
|
||
% visit_template('typecode') if generate_typecode_support? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @file bitmask_bitbound_65.idl | ||
* @author Johnny Willemsen | ||
* | ||
* ridlc shall reject use of a bitmask with a bit_bound annotation with value 65 | ||
* | ||
* @copyright Copyright (c) Remedy IT Expertise BV | ||
*/ | ||
|
||
@bit_bound(65) | ||
bitmask MyBitMask { | ||
flag0, | ||
flag1, | ||
flag2 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @file bitmask_bitbound_missingvalue.idl | ||
* @author Johnny Willemsen | ||
* | ||
* ridlc shall reject use of a bitmask with a bit_bound annotation with no value | ||
* | ||
* @copyright Copyright (c) Remedy IT Expertise BV | ||
*/ | ||
|
||
@bit_bound() | ||
bitmask MyBitMask { | ||
flag0, | ||
flag1, | ||
flag2 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @file bitmask_bitbound_negative.idl | ||
* @author Johnny Willemsen | ||
* | ||
* ridlc shall reject use of a bitmask with a negative bit_bound value | ||
* | ||
* @copyright Copyright (c) Remedy IT Expertise BV | ||
*/ | ||
|
||
@bit_bound(-1) | ||
bitmask MyBitMask { | ||
flag0, | ||
flag1, | ||
flag2 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @file bitmask_bitbound_zero.idl | ||
* @author Johnny Willemsen | ||
* | ||
* ridlc shall reject use of a bitmask with a bit_bound annotation with value zero | ||
* | ||
* @copyright Copyright (c) Remedy IT Expertise BV | ||
*/ | ||
|
||
@bit_bound(0) | ||
bitmask MyBitMask { | ||
flag0, | ||
flag1, | ||
flag2 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @file bitmask_nobitfields.idl | ||
* @author Johnny Willemsen | ||
* | ||
* ridlc shall reject use of a bitmask with no bitfields | ||
* | ||
* @copyright Copyright (c) Remedy IT Expertise BV | ||
*/ | ||
|
||
bitmask MyBitMask { | ||
}; |