source: ntrip/trunk/BNC/src/t_prn.h@ 6138

Last change on this file since 6138 was 6014, checked in by mervart, 10 years ago
File size: 1.1 KB
Line 
1#ifndef PRN_H
2#define PRN_H
3
4#include <string>
5
6class t_prn {
7 public:
8 static const unsigned MAXPRN_GPS = 32;
9 static const unsigned MAXPRN_GLONASS = 26;
10 static const unsigned MAXPRN_GALILEO = 30;
11 static const unsigned MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO;
12
13 t_prn() : _system('G'), _number(0) {}
14 t_prn(char system, int number) : _system(system), _number(number) {}
15
16 ~t_prn() {};
17
18 void set(char system, int number) {_system = system; _number = number;}
19 void set(const std::string& str);
20
21 char system() const {return _system;}
22 int number() const {return _number;}
23 int toInt() const;
24 std::string toString() const;
25
26 bool operator==(const t_prn& prn2) const {
27 if (_system == prn2._system && _number == prn2._number) {
28 return true;
29 }
30 else {
31 return false;
32 }
33 }
34
35 operator unsigned() const;
36
37 friend std::istream& operator >> (std::istream& in, t_prn& prn);
38
39 private:
40 char _system;
41 int _number;
42};
43
44std::istream& operator >> (std::istream& in, t_prn& prn);
45
46#endif
Note: See TracBrowser for help on using the repository browser.