Fortran SFF API to data I/O streams in C++
fapid_sff_modwid2date.cc
Go to the documentation of this file.
1 
34 #define TF_FAPID_SFF_MODWID2DATE_CC_VERSION \
35  "TF_FAPID_SFF_MODWID2DATE_CC V1.0"
36 
37 #include <fapidxx/fapidsff.h>
38 #include <fapidxx/wid2container.h>
39 #include <fapidxx/error.h>
40 
61 int sff_modwid2date__(char *wid2line, integer *year, integer
62  *month, integer *day, ftnlen wid2line_len)
63 {
64  fapidxx::WID2container wid2c(wid2line, wid2line_len);
65  libtime::TAbsoluteTime date(wid2c.wid2.date);
66  wid2c.wid2.date=libtime::TAbsoluteTime((*year),
67  (*month),
68  (*day));
69  wid2c.wid2.date+=libtime::TRelativeTime(0,date.hour(),
70  date.minute(),
71  date.second(),
72  date.milsec(),
73  date.micsec());
74  wid2c.encode(wid2line, wid2line_len);
75  return 0;
76 } /* sff_modwid2date__ */
77 
78 /* ----- END OF fapid_sff_modwid2date.cc ----- */
This is the interface usually expected by Fortran programs linking to libsff.a (prototypes) ...
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)
int sff_modwid2date__(char *wid2line, integer *year, integer *month, integer *day, ftnlen wid2line_len)
modify date of first sample in WID2 line
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