ACE
6.3.3
|
Keep constants and some routines common to both Output and Input CDR streams. More...
#include <CDR_Base.h>
Classes | |
struct | Double |
class | Fixed |
struct | Float |
struct | LongDouble |
Public Types | |
enum | { OCTET_SIZE = 1, SHORT_SIZE = 2, LONG_SIZE = 4, LONGLONG_SIZE = 8, LONGDOUBLE_SIZE = 16, OCTET_ALIGN = 1, SHORT_ALIGN = 2, LONG_ALIGN = 4, LONGLONG_ALIGN = 8, LONGDOUBLE_ALIGN = 8, MAX_ALIGNMENT = 8, DEFAULT_BUFSIZE = ACE_DEFAULT_CDR_BUFSIZE, EXP_GROWTH_MAX = ACE_DEFAULT_CDR_EXP_GROWTH_MAX, LINEAR_GROWTH_CHUNK = ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK } |
enum | Byte_Order { BYTE_ORDER_BIG_ENDIAN = 0, BYTE_ORDER_LITTLE_ENDIAN = 1, BYTE_ORDER_NATIVE = ACE_CDR_BYTE_ORDER } |
Basic OMG IDL Types | |
These types are for use in the CDR classes. The cleanest way to avoid complaints from all compilers is to define them all. | |
typedef bool | Boolean |
typedef unsigned char | Octet |
typedef char | Char |
typedef ACE_WCHAR_T | WChar |
typedef ACE_INT16 | Short |
typedef ACE_UINT16 | UShort |
typedef ACE_INT32 | Long |
typedef ACE_UINT32 | ULong |
typedef ACE_UINT64 | ULongLong |
typedef long long | LongLong |
Static Public Member Functions | |
static void | swap_2 (char const *orig, char *target) |
static void | swap_4 (char const *orig, char *target) |
static void | swap_8 (char const *orig, char *target) |
static void | swap_16 (char const *orig, char *target) |
static void | swap_2_array (char const *orig, char *target, size_t length) |
static void | swap_4_array (char const *orig, char *target, size_t length) |
static void | swap_8_array (char const *orig, char *target, size_t length) |
static void | swap_16_array (char const *orig, char *target, size_t length) |
static void | mb_align (ACE_Message_Block *mb) |
static size_t | first_size (size_t minsize) |
static size_t | next_size (size_t minsize) |
static int | grow (ACE_Message_Block *mb, size_t minsize) |
static int | consolidate (ACE_Message_Block *dst, const ACE_Message_Block *src) |
static size_t | total_length (const ACE_Message_Block *begin, const ACE_Message_Block *end) |
Keep constants and some routines common to both Output and Input CDR streams.
typedef bool ACE_CDR::Boolean |
typedef char ACE_CDR::Char |
typedef ACE_INT32 ACE_CDR::Long |
typedef long long ACE_CDR::LongLong |
typedef unsigned char ACE_CDR::Octet |
typedef ACE_INT16 ACE_CDR::Short |
typedef ACE_UINT32 ACE_CDR::ULong |
typedef ACE_UINT64 ACE_CDR::ULongLong |
typedef ACE_UINT16 ACE_CDR::UShort |
typedef ACE_WCHAR_T ACE_CDR::WChar |
anonymous enum |
Enumerator | |
---|---|
OCTET_SIZE | |
SHORT_SIZE | |
LONG_SIZE | |
LONGLONG_SIZE | |
LONGDOUBLE_SIZE | |
OCTET_ALIGN | |
SHORT_ALIGN | |
LONG_ALIGN | |
LONGLONG_ALIGN | |
LONGDOUBLE_ALIGN |
|
MAX_ALIGNMENT |
Maximal CDR 1.1 alignment: "quad precision" FP (i.e. "CDR::Long double", size as above). |
DEFAULT_BUFSIZE |
The default buffer size.
|
EXP_GROWTH_MAX |
The buffer size grows exponentially until it reaches this size; afterwards it grows linearly using the next constant |
LINEAR_GROWTH_CHUNK |
Once exponential growth is ruled out the buffer size increases in chunks of this size, note that this constants have the same value right now, but it does not need to be so. |
enum ACE_CDR::Byte_Order |
Defines values for the byte_order argument to ACE_OutputCDR and ACE_InputCDR.
|
static |
Copy a message block chain into a single message block, preserving the alignment of the first message block of the original stream, not the following message blocks.
-1 | Failure |
0 | Success. |
|
inlinestatic |
Compute the size of the smallest buffer that can contain at least minsize bytes. To understand how a "best fit" is computed look at the algorithm in the code. Basically the buffers grow exponentially, up to a certain point, then the buffer size grows linearly. The advantage of this algorithm is that is rapidly grows to a large value, but does not explode at the end.
|
static |
Increase the capacity of mb to contain at least minsize bytes. If minsize is zero the size is increased by an amount at least large enough to contain any of the basic IDL types.
-1 | Failure |
0 | Success. |
|
static |
Align the message block to ACE_CDR::MAX_ALIGNMENT, set by the CORBA spec at 8 bytes.
|
inlinestatic |
Compute not the smallest, but the second smallest buffer that will fir minsize bytes.
|
inlinestatic |
|
static |
|
inlinestatic |
Do byte swapping for each basic IDL type size. There exist only routines to put byte, halfword (2 bytes), word (4 bytes), doubleword (8 bytes) and quadword (16 byte); because those are the IDL basic type sizes.
|
static |
|
inlinestatic |
|
static |
|
inlinestatic |
|
static |
|
static |