![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpRequest.h>
Public Member Functions | |
| vpRequest () | |
| vpRequest (const vpRequest &req) | |
| virtual | ~vpRequest () |
| vpRequest & | operator= (const vpRequest &req) |
| void | addParameter (const char *params) |
| void | addParameter (const std::string ¶ms) |
| void | addParameter (const 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 () const |
| void | setId (const char *id) |
| unsigned int | size () const |
Protected Attributes | |
| std::string | request_id |
| std::vector< std::string > | listOfParams |
This the request that will transit on the network.
Example 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 127 of file vpRequest.h.
| BEGIN_VISP_NAMESPACE vpRequest::vpRequest | ( | ) |
Definition at line 37 of file vpRequest.cpp.
References listOfParams, and request_id.
Referenced by operator=(), and vpRequest().
|
inline |
Definition at line 135 of file vpRequest.h.
References vpRequest().
|
inlinevirtual |
Definition at line 139 of file vpRequest.h.
| void vpRequest::addParameter | ( | const char * | params | ) |
Add a message as parameter of the request.
| params | : Array of characters representing the message to add. |
Definition at line 46 of file vpRequest.cpp.
References listOfParams.
| void vpRequest::addParameter | ( | const std::string & | params | ) |
Add a message as parameter of the request.
| params | : std::string representing the message to add. |
Definition at line 59 of file vpRequest.cpp.
References listOfParams.
| void vpRequest::addParameter | ( | const 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 69 of file vpRequest.cpp.
References listOfParams.
| 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.
References listOfParams.
|
inline |
Clear the parameters of the request.
Definition at line 163 of file vpRequest.h.
References listOfParams.
Referenced by check-tests.JavaParser::__init__(), gen2.PythonWrapperGenerator::__init__(), gen2.PythonWrapperGenerator::gen(), and gen_java.JavaWrapperGenerator::gen().
|
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 193 of file vpRequest.h.
References request_id.
Referenced by vpNetwork::addDecodingRequest(), and vpNetwork::sendRequestTo().
Definition at line 141 of file vpRequest.h.
References listOfParams, request_id, and vpRequest().
|
inline |
Accessor on the parameters.
Definition at line 177 of file vpRequest.h.
References listOfParams.
|
inline |
Accessor on the parameters (const).
Definition at line 184 of file vpRequest.h.
References listOfParams.
|
inline |
Change the ID of the request.
| id | : new ID. |
Definition at line 202 of file vpRequest.h.
References request_id.
|
inline |
Get the number of parameters.
Definition at line 209 of file vpRequest.h.
References listOfParams.
Referenced by vpNetwork::sendRequestTo().
|
protected |
Definition at line 131 of file vpRequest.h.
Referenced by addParameter(), addParameter(), addParameter(), addParameterObject(), clear(), operator=(), operator[](), operator[](), size(), and vpRequest().
|
protected |
Definition at line 130 of file vpRequest.h.
Referenced by getId(), operator=(), setId(), and vpRequest().