An interface for a buffer. A buffer can be viewed as an object holding an array of octets and a position counter, which determines how many octets have already been sent or received. The IDL interface definition for Buffer is incomplete and must be extended by the specific language mappings. For example, the C++ mapping defines the following additional functions:
Octet* data()
: Returns a C++
pointer to the first element of the array of octets, which
represents the buffer's contents.Octet* rest()
: Similar to data()
, this
operation returns a C++ pointer, but to the n-th element of the
array of octets with n being the value of the position
counter.readonly attribute unsigned long length;
The buffer length.
attribute unsigned long pos;
The position counter. Note that the buffer's length and the position counter don't depend on each other. There are no restrictions on the values permitted for the counter. This implies that it's even legal to set the counter to values beyond the buffer's length.
void advance(in unsigned long delta);
Increment the position counter.
delta
- The value to add to the position counter.
boolean is_full();
Checks if the buffer is full. The buffer is considered full if its length is equal to the position counter's value.
TRUE
if the buffer is
full, FALSE
otherwise.
unsigned long rest_length();
Returns the rest length of the buffer. The rest length is the length minus the position counter's value. If the value of the position counter exceeds the buffer's length, the return value is undefined.
Generated by the ORBacus IDL-to-HTML translator (non-commercial)