~libecbufr-dev/libecbufr/trunk

« back to all changes in this revision

Viewing changes to Bindings/python/ecbufr/cvalue.pxd

  • Committer: vanh.souvanlasy at canada
  • Date: 2019-11-05 21:50:59 UTC
  • Revision ID: vanh.souvanlasy@canada.ca-20191105215059-0a0yolehj3jcmm67
add python bindings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# file: cvalue.pxd
 
2
 
 
3
from ecbufr.caf cimport BufrAF
 
4
 
 
5
cdef extern from "bufr_value.h":
 
6
 
 
7
   ctypedef enum   ValueType:
 
8
      pass
 
9
 
 
10
   ctypedef struct BufrValue:
 
11
      ValueType      type
 
12
      BufrAF         *af
 
13
 
 
14
   BufrValue     *bufr_create_value         ( ValueType type )
 
15
   void           bufr_free_value           ( BufrValue * )
 
16
 
 
17
   BufrValue     *bufr_create_value         ( ValueType type )
 
18
   BufrValue     *bufr_duplicate_value      ( const BufrValue *dup )
 
19
   void           bufr_free_value           ( BufrValue * )
 
20
   void           bufr_copy_value           ( BufrValue *dest, const BufrValue *src )
 
21
   int            bufr_compare_value        ( const BufrValue *bv1, const BufrValue *bv2, double epsilon )
 
22
   int            bufr_between_values       ( const BufrValue *bv1, const BufrValue *bv, const BufrValue *bv2 )
 
23
 
 
24
   int            bufr_value_set_string     ( BufrValue *bv, const char *str, int len )
 
25
   int            bufr_value_set_double     ( BufrValue *bv, double val )
 
26
   int            bufr_value_set_float      ( BufrValue *bv, float val )
 
27
   int            bufr_value_set_int32      ( BufrValue *bv, int  val )
 
28
   int            bufr_value_set_int64      ( BufrValue *bv, long  val )
 
29
 
 
30
   const char    *bufr_value_get_string     ( const BufrValue *bv, int *len )
 
31
   double         bufr_value_get_double     ( const BufrValue *bv )
 
32
   long           bufr_value_get_int64      ( const BufrValue *bv )
 
33
   float          bufr_value_get_float      ( const BufrValue *bv )
 
34
   int            bufr_value_get_int32      ( const BufrValue *bv )
 
35
 
 
36
   int            bufr_print_value          ( char *str, const BufrValue * )
 
37
   int            bufr_print_scaled_value   ( char *outstr, const BufrValue *bv, int scale )
 
38
 
 
39
   unsigned long  bufr_missing_ivalue       ( int nbits )
 
40
   unsigned long  bufr_negative_ivalue      ( long value, int nbits )
 
41
   long           bufr_cvt_ivalue           ( unsigned long value, int nbits )
 
42
 
 
43
   int            bufr_value_is_missing     ( BufrValue *bv )
 
44
   int            bufr_is_missing_float     ( float )
 
45
   int            bufr_is_missing_double    ( double )
 
46
   int            bufr_is_missing_int       ( int i )
 
47
   int            bufr_is_missing_string    ( const char *, int )
 
48
   double         bufr_missing_double       ( )
 
49
   float          bufr_missing_float        ( )
 
50
   int            bufr_missing_int          ( )
 
51
   void           bufr_missing_string       ( char *, int )
 
52
 
 
53
   double         bufr_get_max_double       ( )
 
54
   float          bufr_get_max_float        ( )