forked from DOCGroup/ACE_TAO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respond to Review and Fix Typedefs in Union Disc
- Loading branch information
1 parent
f78f458
commit 1d95cca
Showing
4 changed files
with
72 additions
and
40 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
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 |
---|---|---|
@@ -1,21 +1,51 @@ | ||
union WcharUnion switch (wchar) { | ||
typedef wchar wchar_t; | ||
const wchar wchar_const = L'u'; | ||
union WcharUnion switch (wchar_t) { | ||
/* TODO: https://github.com/DOCGroup/ACE_TAO/issues/1284 | ||
case L'\u0': | ||
boolean b; | ||
*/ | ||
case L'i': | ||
int32 i32; | ||
case L'u': | ||
case wchar_const: | ||
uint32 u32; | ||
default: | ||
string str; | ||
/* TODO: https://github.com/DOCGroup/ACE_TAO/issues/1284 | ||
case L'\uffff': | ||
string s; | ||
*/ | ||
}; | ||
|
||
union OctetUnion switch (octet) { | ||
case 1: | ||
boolean b; | ||
case 8: | ||
int8 i8; | ||
case 16: | ||
int8 i16; | ||
case 32: | ||
int32 i32; | ||
default: | ||
string str; | ||
typedef octet octet_t; | ||
const octet octet_const = 1; | ||
union OctetUnion switch (octet_t) { | ||
case 0: | ||
octet a; | ||
case octet_const: | ||
octet b; | ||
case 255: | ||
octet c; | ||
}; | ||
|
||
typedef uint8 uint8_t; | ||
const uint8 uint8_const = 1; | ||
union Uint8Union switch (uint8_t) { | ||
case 0: | ||
uint8 a; | ||
case uint8_const: | ||
uint8 b; | ||
case 255: | ||
uint8 c; | ||
}; | ||
|
||
typedef int8 int8_t; | ||
const int8 int8_const = 1; | ||
union Int8Union switch (int8_t) { | ||
case -128: | ||
int8 a; | ||
case 0: | ||
int8 b; | ||
case int8_const: | ||
int8 c; | ||
case 127: | ||
int8 d; | ||
}; |