removing multiSlsDetectorCommand and using namespace std

This commit is contained in:
Erik Frojdh
2019-01-17 14:45:51 +01:00
parent c05829031f
commit b07492be6f
5 changed files with 24 additions and 79 deletions

View File

@ -4,7 +4,7 @@
#include "detectorData.h"
#include "logger.h"
#include "multiSlsDetectorClient.h"
#include "multiSlsDetectorCommand.h"
#include "slsDetectorCommand.h"
#include "slsDetector.h"
#include "sls_detector_exceptions.h"
#include "utilities.h"

View File

@ -6,7 +6,7 @@
#include "container_utils.h"
#include "string_utils.h"
#include "multiSlsDetector.h"
#include "multiSlsDetectorCommand.h"
#include "slsDetectorCommand.h"
#include "sls_detector_exceptions.h"
#include <cstdlib>
@ -87,7 +87,7 @@ class multiSlsDetectorClient {
}
// call multi detector command line
multiSlsDetectorCommand myCmd(detPtr);
slsDetectorCommand myCmd(detPtr);
std::string answer = myCmd.executeLine(parser.n_arguments()+1, parser.argv().data(), action_, parser.detector_id());
if (parser.multi_id()!=0)

View File

@ -1,51 +0,0 @@
#ifndef MULTI_SLS_DETECTOR_COMMAND_H
#define MULTI_SLS_DETECTOR_COMMAND_H
#include "slsDetector.h"
#include "multiSlsDetector.h"
#include "slsDetectorCommand.h"
/** @short This class handles the command line I/Os, help etc. of the text clients */
class multiSlsDetectorCommand : public slsDetectorCommand {
public:
explicit multiSlsDetectorCommand(multiSlsDetector *det) : slsDetectorCommand(det) {myDet=det;};
/* /\** */
/* executes a set of string arguments according to a given format. It is used to read/write configuration file, dump and retrieve detector settings and for the command line interface command parsing */
/* \param narg number of arguments */
/* \param args array of string arguments */
/* \param action can be PUT_ACTION or GET_ACTION (from text client even READOUT_ACTION for acquisition) */
/* \returns answer string */
/* *\/ */
std::string executeLine(int narg, char *args[], int action, int id=-1) override {
return slsDetectorCommand::executeLine(narg,args,action, id);
};
/**
* calls executeLine with PUT_ACTION
*/
std::string putCommand(int narg, char *args[], int pos=-1){\
return executeLine(narg, args,slsDetectorDefs::PUT_ACTION,pos);\
};
/**
* calls executeLine with GET_ACTION
*/
std::string getCommand(int narg, char *args[], int pos=-1){\
return executeLine(narg, args,slsDetectorDefs::GET_ACTION,pos);\
};
private:
multiSlsDetector *myDet;
};
#endif