RTI Connext C# API  6.1.2
LongDouble Struct Reference

IDL 128-bit floating-point type. More...

Inherits IFormattable, IConvertible, IEquatable< LongDouble >, and IComparable< LongDouble >.

Public Member Functions

 LongDouble (int[] ints)
 Creates a LongDouble from its 32 bytes, as 4 ints More...
 
 LongDouble (decimal value)
 Creates a LongDouble from a decimal More...
 
 LongDouble (double value)
 Creates a LongDouble from a double More...
 
 LongDouble (int value)
 Creates a LongDouble from an int More...
 
int[] GetBits ()
 Gets the bits in an array of 4 integers More...
 
decimal ToDecimal ()
 Converts from LongDouble to decimal More...
 
override string ToString ()
 Returns ToDecimal().ToString(). More...
 
bool Equals (LongDouble other)
 Compares with another LongDouble More...
 
int CompareTo (LongDouble other)
 Compares the result of converting ToDecimal(). More...
 

Static Public Member Functions

static operator decimal (LongDouble value)
 Converts from LongDouble to decimal More...
 
static operator LongDouble (decimal value)
 Converts from decimal to LongDouble More...
 

Properties

int Int0 [get, set]
 Bytes 1 to 4 of this long double More...
 
int Int1 [get, set]
 Bytes 5 to 8 of this long double More...
 
int Int2 [get, set]
 Bytes 9 to 12 of this long double More...
 
int Int3 [get, set]
 Bytes 13 to 16 of this long double More...
 

Detailed Description

IDL 128-bit floating-point type.

This type is used by DDS to represent the IDL long double type and can be used among platforms for which there isn't a standard definition for a 128-bit floating-point type.

LongDouble can be converted to and from decimal, but this doesn't ensure interoperability with C, C++ or other applications for which a long double can have different representations. If a distributed system uses different long double representations, the applications are responsible for manually interpreting the individual bytes (provided as Int0 to Int3).

Constructor & Destructor Documentation

◆ LongDouble() [1/4]

LongDouble ( int[]  ints)

Creates a LongDouble from its 32 bytes, as 4 ints

◆ LongDouble() [2/4]

LongDouble ( decimal  value)

Creates a LongDouble from a decimal

◆ LongDouble() [3/4]

LongDouble ( double  value)

Creates a LongDouble from a double

◆ LongDouble() [4/4]

LongDouble ( int  value)

Creates a LongDouble from an int

Member Function Documentation

◆ CompareTo()

int CompareTo ( LongDouble  other)

Compares the result of converting ToDecimal().

◆ Equals()

bool Equals ( LongDouble  other)

Compares with another LongDouble

◆ GetBits()

int [] GetBits ( )

Gets the bits in an array of 4 integers

◆ operator decimal()

static operator decimal ( LongDouble  value)
explicitstatic

Converts from LongDouble to decimal

Note that the encoding of this LongDouble is not guaranteed to be compatible with a .NET decimal type.

◆ operator LongDouble()

static operator LongDouble ( decimal  value)
explicitstatic

Converts from decimal to LongDouble

◆ ToDecimal()

decimal ToDecimal ( )

Converts from LongDouble to decimal

Note that the encoding of this LongDouble is not guaranteed to be compatible with a .NET decimal type.

◆ ToString()

override string ToString ( )

Property Documentation

◆ Int0

int Int0
getset

Bytes 1 to 4 of this long double

◆ Int1

int Int1
getset

Bytes 5 to 8 of this long double

◆ Int2

int Int2
getset

Bytes 9 to 12 of this long double

◆ Int3

int Int3
getset

Bytes 13 to 16 of this long double