-
Notifications
You must be signed in to change notification settings - Fork 380
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
IDLv4 Explicitly-named Integer Types #840
Changes from all commits
8f4fcb1
c7a6292
ce28b30
d004d8d
9d2523a
7549f0b
85a1e61
a4c5b22
56a61b9
e994776
2afc6a2
737b919
2280b39
7471fc9
800cec4
65962ee
71f7ce0
b489eef
2ed7fe7
70b28ba
354b698
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,18 @@ class ACE_Export ACE_OutputCDR | |
ACE_CDR::WChar val_; | ||
}; | ||
|
||
struct ACE_Export from_int8 | ||
{ | ||
explicit from_int8 (ACE_CDR::Int8 val); | ||
ACE_CDR::Int8 val_; | ||
}; | ||
|
||
struct ACE_Export from_uint8 | ||
{ | ||
explicit from_uint8 (ACE_CDR::UInt8 val); | ||
ACE_CDR::UInt8 val_; | ||
}; | ||
|
||
struct ACE_Export from_string | ||
{ | ||
from_string (ACE_CDR::Char* s, | ||
|
@@ -260,6 +272,8 @@ class ACE_Export ACE_OutputCDR | |
ACE_CDR::Boolean write_double (const ACE_CDR::Double &x); | ||
ACE_CDR::Boolean write_longdouble (const ACE_CDR::LongDouble &x); | ||
ACE_CDR::Boolean write_fixed (const ACE_CDR::Fixed &x); | ||
ACE_CDR::Boolean write_int8 (ACE_CDR::Int8 x); | ||
ACE_CDR::Boolean write_uint8 (ACE_CDR::UInt8 x); | ||
|
||
/// For string we offer methods that accept a precomputed length. | ||
ACE_CDR::Boolean write_string (const ACE_CDR::Char *x); | ||
|
@@ -306,6 +320,8 @@ class ACE_Export ACE_OutputCDR | |
ACE_CDR::ULong length); | ||
ACE_CDR::Boolean write_longdouble_array (const ACE_CDR::LongDouble* x, | ||
ACE_CDR::ULong length); | ||
ACE_CDR::Boolean write_int8_array (const ACE_CDR::Int8 *x, ACE_CDR::ULong length); | ||
ACE_CDR::Boolean write_uint8_array (const ACE_CDR::UInt8 *x, ACE_CDR::ULong length); | ||
|
||
/// Write an octet array contained inside a MB, this can be optimized | ||
/// to minimize copies. | ||
|
@@ -791,6 +807,18 @@ class ACE_Export ACE_InputCDR | |
ACE_CDR::Octet &ref_; | ||
}; | ||
|
||
struct ACE_Export to_int8 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really required, isn't int8_t a distinct type itself? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
{ | ||
explicit to_int8 (ACE_CDR::Int8 &ref); | ||
ACE_CDR::Int8 &ref_; | ||
}; | ||
|
||
struct ACE_Export to_uint8 | ||
{ | ||
explicit to_uint8 (ACE_CDR::UInt8 &ref); | ||
ACE_CDR::UInt8 &ref_; | ||
}; | ||
|
||
struct ACE_Export to_string | ||
{ | ||
/** | ||
|
@@ -857,6 +885,8 @@ class ACE_Export ACE_InputCDR | |
ACE_CDR::Boolean read_double (ACE_CDR::Double &x); | ||
ACE_CDR::Boolean read_longdouble (ACE_CDR::LongDouble &x); | ||
ACE_CDR::Boolean read_fixed (ACE_CDR::Fixed &x); | ||
ACE_CDR::Boolean read_int8 (ACE_CDR::Int8 &x); | ||
ACE_CDR::Boolean read_uint8 (ACE_CDR::UInt8 &x); | ||
|
||
ACE_CDR::Boolean read_string (ACE_CDR::Char *&x); | ||
ACE_CDR::Boolean read_string (ACE_CString &x); | ||
|
@@ -899,6 +929,8 @@ class ACE_Export ACE_InputCDR | |
ACE_CDR::ULong length); | ||
ACE_CDR::Boolean read_longdouble_array (ACE_CDR::LongDouble* x, | ||
ACE_CDR::ULong length); | ||
ACE_CDR::Boolean read_int8_array (ACE_CDR::Int8 *x, ACE_CDR::ULong length); | ||
ACE_CDR::Boolean read_uint8_array (ACE_CDR::UInt8 *x, ACE_CDR::ULong length); | ||
//@} | ||
|
||
/** | ||
|
@@ -1413,6 +1445,8 @@ extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, | |
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, | ||
const std::wstring& x); | ||
#endif | ||
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_uint8 x); | ||
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_int8 x); | ||
|
||
// Not used by CORBA or TAO | ||
extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, | ||
|
@@ -1468,6 +1502,8 @@ extern ACE_Export ACE_CDR::Boolean operator<< (ACE_InputCDR &os, | |
extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, | ||
std::wstring& x); | ||
#endif | ||
extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &os, ACE_InputCDR::to_uint8 x); | ||
extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &os, ACE_InputCDR::to_int8 x); | ||
|
||
ACE_END_VERSIONED_NAMESPACE_DECL | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should convert these to
constexpr
at some pointThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should, but I'd like that to be later because I don't want to make this harder to backport than it already is.