45 #include <visp/vpConfig.h>
46 #include <visp/vpDebug.h>
47 #include <visp/vpException.h>
48 #include <visp/vpImageException.h>
144 void addParameter(
char *params);
145 void addParameter(std::string ¶ms);
146 void addParameter(std::vector<std::string> &listOfparams);
148 void addParameterObject(T * params,
const int &sizeOfObject =
sizeof(T));
155 virtual void decode() = 0;
160 void clear(){ listOfParams.clear(); }
167 virtual void encode() = 0;
174 inline std::string&
operator[](
const unsigned int &i) {
return listOfParams[i];}
181 inline const std::string&
operator[](
const unsigned int &i)
const {
return listOfParams[i];}
190 std::string
getId(){
return request_id; }
199 void setId(
const char *
id){ request_id = id; }
206 unsigned int size(){
return (
unsigned int)listOfParams.size(); }
230 if(sizeOfObject != 0){
231 char *tempS =
new char [sizeOfObject];
232 memcpy((
void*)tempS, (
void*)params, sizeOfObject);
233 std::string returnVal(tempS, sizeOfObject);
235 listOfParams.push_back(returnVal);
This the request that will transit on the network.
std::string & operator[](const unsigned int &i)
const std::string & operator[](const unsigned int &i) const
void addParameterObject(T *params, const int &sizeOfObject=sizeof(T))
std::vector< std::string > listOfParams
void setId(const char *id)