|
Ada has a particularly rich type system where there is a potentially infinite number of integer or floating point types. In order to ensure interoperability and proper serialization and deserialization of data, the following mapping was defined:
Boolean
type is used to represent boolean parameters values.YAMI.Parameters.YAMI_Integer
, which is derived from Interfaces.C.int
, is used for integer values. The representation and range of this type is supposed to match the int
type of the C++ compiler that is used to compile the core library.YAMI.Parameters.YAMI_Long_Long_Integer
, which is derived from the standard type Interfaces.Integer_64
, is used for long values.YAMI.Parameters.YAMI_Long_Float
, which is derived from the standard type Interfaces.C.double
, is used for double float values.String
type is used for string values.Ada.Streams.Stream_Element_Array
is used for binary values.Separately defined numeric types have the price of higher verbosity of the code, but at the same time allow to clearly separate distinct data domains.