WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WmoFile.h
1#ifndef _WINC_WMOFILE
2#define _WINC_WMOFILE
3
4#include <WXP/File.h>
5#include <WXP/Socket.h>
6#include <WXP/WmoData.h>
7
8namespace WXP {
9 class WmoFile {
10 int type;
11 Socket sock;
12 File file;
13 unsigned char buf[1000];
14 int bsize;
15 int boff;
16 static const int buf_len = 1000;
17 unsigned char pbuf[5];
18 int psize;
19 bool opened;
20
21 int prod_size;
22 int prod_line;
23 int total_prods;
24 int total_bytes;
25
26 bool end;
27
28 public:
29 WmoFile();
30 ~WmoFile();
31 int init();
32 bool isOpen();
33 int open( const char *filename );
34 int close();
35 int read( unsigned char &ch );
36 int read( unsigned char *buf, int len );
37 int read( WmoData &data );
38
39 inline int getProdLine(){ return prod_line; };
40 inline int getProdSize(){ return prod_size; };
41 inline int getProdCount(){ return total_prods; };
42 inline int getByteCount(){ return total_bytes; };
43
44 enum Type {
45 UNK,
46 FILE,
47 SOCKET
48 };
49 };
50}
51#endif
This class accesses files.
Definition File.h:15
This class manages socket based network connections.
Definition Socket.h:5
This struct stores a line of WMO formated data.
Definition WmoData.h:5
This class reads in WMO formated data.
Definition WmoFile.h:9
All WXP classes fall under the WXP namespace.
Definition Angle.h:4