2 * Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
6 * This type differs from the standard REAL in that it is modelled using
7 * the fixed machine type (double), so it can hold only values of
8 * limited precision. There is no explicit type (i.e., NativeReal_t).
9 * Use of this type is normally enabled by -fnative-types.
11 #ifndef ASN_TYPE_NativeReal_H
12 #define ASN_TYPE_NativeReal_H
14 #include <asn_application.h>
20 typedef struct asn_NativeReal_specifics_s {
21 unsigned float_size; /* sizeof(float) or sizeof(double) */
22 } asn_NativeReal_specifics_t;
24 extern asn_TYPE_descriptor_t asn_DEF_NativeReal;
25 extern asn_TYPE_operation_t asn_OP_NativeReal;
27 size_t NativeReal__float_size(const asn_TYPE_descriptor_t *td);
28 double NativeReal__get_double(const asn_TYPE_descriptor_t *td,
30 ssize_t NativeReal__set(const asn_TYPE_descriptor_t *td, void **sptr,
33 asn_struct_free_f NativeReal_free;
35 #if !defined(ASN_DISABLE_PRINT_SUPPORT)
36 asn_struct_print_f NativeReal_print;
37 #endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
39 asn_struct_compare_f NativeReal_compare;
41 #define NativeReal_constraint asn_generic_no_constraint
43 #if !defined(ASN_DISABLE_BER_SUPPORT)
44 ber_type_decoder_f NativeReal_decode_ber;
45 der_type_encoder_f NativeReal_encode_der;
46 #endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
48 #if !defined(ASN_DISABLE_XER_SUPPORT)
49 xer_type_decoder_f NativeReal_decode_xer;
50 xer_type_encoder_f NativeReal_encode_xer;
51 #endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
53 #if !defined(ASN_DISABLE_JER_SUPPORT)
54 jer_type_encoder_f NativeReal_encode_jer;
55 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
57 #if !defined(ASN_DISABLE_OER_SUPPORT)
58 oer_type_decoder_f NativeReal_decode_oer;
59 oer_type_encoder_f NativeReal_encode_oer;
60 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
62 #if !defined(ASN_DISABLE_UPER_SUPPORT)
63 per_type_decoder_f NativeReal_decode_uper;
64 per_type_encoder_f NativeReal_encode_uper;
65 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
66 #if !defined(ASN_DISABLE_APER_SUPPORT)
67 per_type_decoder_f NativeReal_decode_aper;
68 per_type_encoder_f NativeReal_encode_aper;
69 #endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
71 #if !defined(ASN_DISABLE_RFILL_SUPPORT)
72 asn_random_fill_f NativeReal_random_fill;
73 #endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */
79 #endif /* ASN_TYPE_NativeReal_H */