Fortran SFF API to data I/O streams in C++
fapid_sff_modwid2time.cc
Go to the documentation of this file.
1 
34 #define TF_FAPID_SFF_MODWID2TIME_CC_VERSION \
35  "TF_FAPID_SFF_MODWID2TIME_CC V1.0"
36 
37 #include <fapidxx/fapidsff.h>
38 #include <fapidxx/wid2container.h>
39 #include <fapidxx/error.h>
40 
61 int sff_modwid2time__(char *wid2line, integer *hour, integer
62  *minute, real *second, ftnlen wid2line_len)
63 {
64  fapidxx::WID2container wid2c(wid2line, wid2line_len);
65  libtime::TAbsoluteTime date(wid2c.wid2.date);
66  wid2c.wid2.date=libtime::TAbsoluteTime(date.year(),
67  date.month(),
68  date.day());
69  wid2c.wid2.date+=libtime::TRelativeTime(0,(*hour),(*minute))
70  +libtime::double2time(double(*second));
71  wid2c.encode(wid2line, wid2line_len);
72  return 0;
73 } /* sff_modwid2time__ */
74 
75 /* ----- END OF fapid_sff_modwid2time.cc ----- */
This is the interface usually expected by Fortran programs linking to libsff.a (prototypes) ...
int sff_modwid2time__(char *wid2line, integer *hour, integer *minute, real *second, ftnlen wid2line_len)
modify time of first sample in WID2 line
long int integer
Fortran integer type.
Definition: fapidsff.h:66
sff::WID2 wid2
WID2 data.
This struct is used to pass WID2 line data within libfapidxx.
Definition: wid2container.h:62
container for WID2 data (prototypes)
exceptions and error handling macros (prototypes)
float real
Fortran real type (single precision)
Definition: fapidsff.h:73
long int ftnlen
Fortran string size type.
Definition: fapidsff.h:70
void encode(char *fstring, ftnlen slen) const
encode data into a character string depending on wasascii flag