WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
MosUFile.h
1#ifndef _WINC_MOSUFILE
2#define _WINC_MOSUFILE
3
4#include <WXP/Date.h>
5#include <WXP/Filename.h>
6#include <WXP/MosUData.h>
7#include <WXP/WmoParse.h>
8
9namespace WXP {
10 class MosUFile {
11 int type;
12 int model;
13 WmoParse parse;
14 Date date;
15 Date pdate;
16 bool opened;
17 int pos;
18 int off;
19 int line;
20
21 public:
22 MosUFile();
23 MosUFile( const char *filename, int type );
24 MosUFile( const char *filename );
25 MosUFile( Filename &filename, int type );
26 MosUFile( Filename &filename );
27 ~MosUFile();
28 int init();
29 int setModel( int mod );
30 int setModel( const char *str );
31 const char*getModel();
32 int open( const char *filename, int type );
33 int open( const char *filename );
34 int open( Filename &filename, int type );
35 int open( Filename &filename );
36 int rewind( );
37 int close( );
39 inline bool isOpen(){ return opened; };
40 int getDate( Date &rdate );
41 int read( MosUData &data );
42 int decodeNGM( const char *str, MosUData &data );
43 int decodeETA( const char *str, MosUData &data );
44 int decodeNAM( const char *str, MosUData &data );
46 inline const char *getWmo(){
47 return parse.getHeader(); };
48
49 static const char*getModel( int mod );
50 /*
51 MOS types
52 */
53 enum Model {
54 NONE,
55 NGM,
56 ETA,
57 NAM,
58 };
59 enum Type {
60 UNK,
61 WMO,
62 BUFR,
63 CDF
64 };
65 };
66}
67#endif
This class stores date and time information.
Definition Date.h:8
This class creates filenames.
Definition Filename.h:11
This class stores MOS data.
Definition MosUData.h:9
This class reads MOS data files.
Definition MosUFile.h:10
bool isOpen()
Definition MosUFile.h:39
int decodeETA(const char *str, MosUData &data)
Definition MosUFile.cc:343
MosUFile()
Definition MosUFile.cc:31
int decodeNGM(const char *str, MosUData &data)
Definition MosUFile.cc:333
int rewind()
Definition MosUFile.cc:170
int open(const char *filename, int type)
Definition MosUFile.cc:69
int read(MosUData &data)
Definition MosUFile.cc:210
const char * getModel()
Definition MosUFile.cc:163
int setModel(int mod)
Definition MosUFile.cc:121
int close()
Definition MosUFile.cc:181
const char * getWmo()
Definition MosUFile.h:46
~MosUFile()
Definition MosUFile.cc:191
int getDate(Date &rdate)
Definition MosUFile.cc:201
int decodeNAM(const char *str, MosUData &data)
Definition MosUFile.cc:409
This class parses text files.
Definition WmoParse.h:10
const char * getHeader()
Definition WmoParse.cc:183
All WXP classes fall under the WXP namespace.
Definition Angle.h:4