Changeset 6067 in ntrip
- Timestamp:
- Sep 7, 2014, 10:10:02 AM (10 years ago)
- Location:
- trunk/BNC/src/PPP_free
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_free/bncpppclient.cpp
r6065 r6067 55 55 // Constructor 56 56 //////////////////////////////////////////////////////////////////////////// 57 bncPPPclient::bncPPPclient(QByteArray staID, t_pppOptions* opt) : bncEphUser(false) {57 bncPPPclient::bncPPPclient(QByteArray staID, const t_pppOptions* opt) : bncEphUser(false) { 58 58 59 59 _opt = opt; -
trunk/BNC/src/PPP_free/bncpppclient.h
r6066 r6067 40 40 class bncPPPclient : public bncEphUser { 41 41 public: 42 bncPPPclient(QByteArray staID, t_pppOptions* opt);42 bncPPPclient(QByteArray staID, const t_pppOptions* opt); 43 43 ~bncPPPclient(); 44 44 void putNewObs(const t_obs& pp); -
trunk/BNC/src/PPP_free/pppClient.cpp
r6051 r6067 58 58 // Global variable holding thread-specific pointers 59 59 ////////////////////////////////////////////////////////////////////////////// 60 t_pppClient* CLIENT = 0;60 t_pppClient* PPP_CLIENT = 0; 61 61 62 62 // Static function returning thread-specific pointer 63 63 ////////////////////////////////////////////////////////////////////////////// 64 64 t_pppClient* t_pppClient::instance() { 65 return CLIENT;65 return PPP_CLIENT; 66 66 } 67 67 … … 69 69 ////////////////////////////////////////////////////////////////////////////// 70 70 t_pppClient::t_pppClient(const t_pppOptions* opt) { 71 _opt = new t_pppOptions(*opt); 72 _log = new ostringstream(); 73 CLIENT = this; 71 _opt = new t_pppOptions(*opt); 72 _log = new ostringstream(); 73 _client = new bncPPPclient(QByteArray(_opt->_roverName.c_str()), _opt); 74 PPP_CLIENT = this; 74 75 } 75 76 … … 79 80 delete _log; 80 81 delete _opt; 82 delete _client; 81 83 } 82 84 -
trunk/BNC/src/PPP_free/pppClient.h
r6051 r6067 7 7 #include "ephemeris.h" 8 8 #include "pppOptions.h" 9 10 class bncAntex; 9 #include "bncpppclient.h" 11 10 12 11 namespace BNC_PPP { … … 23 22 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output); 24 23 24 static t_pppClient* instance(); 25 25 std::ostringstream& log() {return *_log;} 26 const t_pppOptions* opt() const {return _opt;}27 28 static t_pppClient* instance();29 26 30 27 private: 31 std::ostringstream* _log; 32 t_pppOptions* _opt; 28 std::ostringstream* _log; 29 t_pppOptions* _opt; 30 bncPPPclient* _client; 33 31 }; 34 32 35 33 }; // namespace BNC_PPP 36 34 37 #define PPP_CLIENT (BNC_PPP::t_pppClient::instance()) 38 #define LOG (BNC_PPP::t_pppClient::instance()->log()) 39 #define OPT (BNC_PPP::t_pppClient::instance()->opt()) 35 #define LOG (BNC_PPP::t_pppClient::instance()->log()) 40 36 41 37 #endif
Note:
See TracChangeset
for help on using the changeset viewer.