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

Last change on this file since 5779 was 5741, checked in by mervart, 10 years ago
File size: 1.0 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 = MAXPRN_GPS + MAXPRN_GLONASS;
11
12 t_prn() : _system('G'), _number(0) {}
13 t_prn(char system, int number) : _system(system), _number(number) {}
14
15 ~t_prn() {};
16
17 void set(char system, int number) {_system = system; _number = number;}
18
19 char system() const {return _system;}
20 int number() const {return _number;}
21 int toInt() const;
22 std::string toString() const;
23
24 bool operator==(const t_prn& prn2) const {
25 if (_system == prn2._system && _number == prn2._number) {
26 return true;
27 }
28 else {
29 return false;
30 }
31 }
32
33 operator unsigned() const;
34
35 friend std::istream& operator >> (std::istream& in, t_prn& prn);
36
37 private:
38 void setValue(const std::string& str);
39 void setValue(char system, unsigned prn);
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.