A generic octet sequence type.
typedef sequence < octet > Binary;
struct Decimal { BCD::Binary value; };
A floating-point decimal type.
The Binary
representation of floating-point values is
designed to support easy conversion to and from strings, while at the
same time minimising the size of the binary representation for GIOP.
A number is converted to the binary representation using the following algorithm.
13 * 16 + 9 = 217
.
Any program receiving a binary value which is not formed according to the above specification should raise a CORBA::DATA_CONVERSION system exception.
Note: a struct is used because it allows overloaded methods to be defined in C++ and Java for decimal manipulation. It also guarantees that a distinct type is generated for the Java IDL language mapping.
struct Money { BCD::Binary value; };
A floating-point decimal (money) type. Uses the same representation
as Decimal
but may be used where a semantic distinction is
required.
Note: a struct is used because it allows overloaded methods to be defined in C++ and Java for money manipulation. It also guarantees that a distinct type is generated for the Java IDL language mapping.