ViSP
2.9.0
|
#include <vpRequest.h>
Public Member Functions | |
vpRequest () | |
virtual | ~vpRequest () |
void | addParameter (char *params) |
void | addParameter (std::string ¶ms) |
void | addParameter (std::vector< std::string > &listOfparams) |
template<typename T > | |
void | addParameterObject (T *params, const int &sizeOfObject=sizeof(T)) |
virtual void | decode ()=0 |
void | clear () |
virtual void | encode ()=0 |
std::string & | operator[] (const unsigned int &i) |
const std::string & | operator[] (const unsigned int &i) const |
std::string | getId () |
void | setId (const char *id) |
unsigned int | size () |
Protected Attributes | |
std::string | request_id |
std::vector< std::string > | listOfParams |
This the request that will transit on the network.
Exemple request decoding an image on a specific form. First parameter : Height of the image. Second parameter : Width of the image. Thirs parameter : Bitmap of the image (not compress).
Here is the header of the vpRequestImage class.
Here is the definition of the vpRequestImage class.
Definition at line 134 of file vpRequest.h.
vpRequest::vpRequest | ( | ) |
Definition at line 44 of file vpRequest.cpp.
|
virtual |
Definition at line 48 of file vpRequest.cpp.
void vpRequest::addParameter | ( | char * | params | ) |
Add a message as parameter of the request.
params | : Array of characters representing the message to add. |
Definition at line 58 of file vpRequest.cpp.
References listOfParams.
void vpRequest::addParameter | ( | std::string & | params | ) |
Add a message as parameter of the request.
params | : std::string representing the message to add. |
Definition at line 71 of file vpRequest.cpp.
References listOfParams.
void vpRequest::addParameter | ( | std::vector< std::string > & | listOfparams | ) |
Add messages as parameters of the request. Each message corresponds to one parameter.
listOfparams | : Array of std::string representing the messages to add. |
Definition at line 84 of file vpRequest.cpp.
void vpRequest::addParameterObject | ( | T * | params, |
const int & | sizeOfObject = sizeof(T) |
||
) |
Add an object as parameter of the request.
params | : Object to add. |
sizeOfObject | : Size of the object. |
Definition at line 228 of file vpRequest.h.
|
inline |
Clear the parameters of the request.
Definition at line 160 of file vpRequest.h.
|
pure virtual |
Decode the parameters of the request (Funtion that has to be redifined).
|
pure virtual |
Encode the parameters of the request (Funtion that has to be redifined).
Referenced by vpNetwork::sendAndEncodeRequest(), and vpNetwork::sendAndEncodeRequestTo().
|
inline |
Get the ID of the request.
Definition at line 190 of file vpRequest.h.
Referenced by vpNetwork::addDecodingRequest(), and vpNetwork::sendRequestTo().
|
inline |
Accessor on the parameters.
Definition at line 174 of file vpRequest.h.
|
inline |
Accessor on the parameters (const).
Definition at line 181 of file vpRequest.h.
|
inline |
Change the ID of the request.
id | : new ID. |
Definition at line 199 of file vpRequest.h.
|
inline |
Get the number of parameters.
Definition at line 206 of file vpRequest.h.
Referenced by vpNetwork::sendRequestTo().
|
protected |
Definition at line 138 of file vpRequest.h.
Referenced by addParameter().
|
protected |
Definition at line 137 of file vpRequest.h.