42 #include <visp3/core/vpConfig.h> 43 #include <visp3/core/vpDebug.h> 44 #include <visp3/core/vpException.h> 45 #include <visp3/core/vpImageException.h> 141 void addParameter(
char *params);
142 void addParameter(std::string ¶ms);
143 void addParameter(std::vector<std::string> &listOfparams);
144 template <
typename T>
void addParameterObject(T *params,
const int &sizeOfObject =
sizeof(T));
151 virtual void decode() = 0;
156 void clear() { listOfParams.clear(); }
163 virtual void encode() = 0;
170 inline std::string &
operator[](
const unsigned int &i) {
return listOfParams[i]; }
177 inline const std::string &
operator[](
const unsigned int &i)
const {
return listOfParams[i]; }
186 std::string
getId() {
return request_id; }
195 void setId(
const char *
id) { request_id = id; }
202 unsigned int size() {
return (
unsigned int)listOfParams.size(); }
223 if (sizeOfObject != 0) {
224 char *tempS =
new char[sizeOfObject];
225 memcpy((
void *)tempS, (
void *)params, sizeOfObject);
226 std::string returnVal(tempS, (
size_t)sizeOfObject);
228 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)