moved data members to top

This commit is contained in:
Erik Frojdh
2020-04-20 14:51:48 +02:00
parent 095ced153c
commit bc389f4825

View File

@ -10,8 +10,17 @@ class ServerInterface;
#include <future> #include <future>
class ClientInterface : private virtual slsDetectorDefs { class ClientInterface : private virtual slsDetectorDefs {
private:
enum numberMode { DEC, HEX }; enum numberMode { DEC, HEX };
detectorType myDetectorType;
std::unique_ptr<sls::ServerSocket> server;
std::unique_ptr<Implementation> receiver;
std::unique_ptr<std::thread> tcpThread;
int ret{OK};
int fnum{-1};
int lockedByClient{0};
int portNumber{0};
std::atomic<bool> killTcpThread{false};
public: public:
virtual ~ClientInterface(); virtual ~ClientInterface();
@ -49,7 +58,6 @@ class ClientInterface : private virtual slsDetectorDefs {
void verifyLock(); void verifyLock();
void verifyIdle(sls::ServerInterface &socket); void verifyIdle(sls::ServerInterface &socket);
int exec_command(sls::ServerInterface &socket); int exec_command(sls::ServerInterface &socket);
int exit_server(sls::ServerInterface &socket); int exit_server(sls::ServerInterface &socket);
int lock_receiver(sls::ServerInterface &socket); int lock_receiver(sls::ServerInterface &socket);
@ -144,7 +152,6 @@ class ClientInterface : private virtual slsDetectorDefs {
int get_additional_json_parameter(sls::ServerInterface &socket); int get_additional_json_parameter(sls::ServerInterface &socket);
int get_progress(sls::ServerInterface &socket); int get_progress(sls::ServerInterface &socket);
Implementation *impl() { Implementation *impl() {
if (receiver != nullptr) { if (receiver != nullptr) {
return receiver.get(); return receiver.get();
@ -154,19 +161,9 @@ class ClientInterface : private virtual slsDetectorDefs {
} }
} }
detectorType myDetectorType;
std::unique_ptr<Implementation> receiver{nullptr};
int (ClientInterface::*flist[NUM_REC_FUNCTIONS])( int (ClientInterface::*flist[NUM_REC_FUNCTIONS])(
sls::ServerInterface &socket); sls::ServerInterface &socket);
int ret{OK};
int fnum{-1};
int lockedByClient{0};
int portNumber{0};
std::atomic<bool> killTcpThread{false};
std::unique_ptr<std::thread> tcpThread;
//***callback parameters*** //***callback parameters***
int (*startAcquisitionCallBack)(std::string, std::string, uint64_t, uint32_t, int (*startAcquisitionCallBack)(std::string, std::string, uint64_t, uint32_t,
@ -179,6 +176,6 @@ class ClientInterface : private virtual slsDetectorDefs {
void *) = nullptr; void *) = nullptr;
void *pRawDataReady{nullptr}; void *pRawDataReady{nullptr};
protected:
std::unique_ptr<sls::ServerSocket> server{nullptr};
}; };