|
| Procedure (const std::string &name, parameterDeclaration_t paramType,...) |
| Constructor for notificaiton with parameters as va_list. More...
|
|
| Procedure (const std::string &name, parameterDeclaration_t paramType, jsontype_t returntype,...) |
| Constructor for method with parameters as va_list. More...
|
|
bool | ValdiateParameters (const Json::Value ¶meters) const |
| This method is validating the incoming parameters for each procedure. More...
|
|
const parameterNameList_t & | GetParameters () const |
|
procedure_t | GetProcedureType () const |
|
const std::string & | GetProcedureName () const |
|
jsontype_t | GetReturnType () const |
|
parameterDeclaration_t | GetParameterDeclarationType () const |
|
void | SetProcedureName (const std::string &name) |
|
void | SetProcedureType (procedure_t type) |
|
void | SetReturnType (jsontype_t type) |
|
void | SetParameterDeclarationType (parameterDeclaration_t type) |
|
void | AddParameter (const std::string &name, jsontype_t type) |
| AddParameter. More...
|
|
bool | ValidateNamedParameters (const Json::Value ¶meters) const |
|
bool | ValidatePositionalParameters (const Json::Value ¶meters) const |
|
|
bool | ValidateSingleParameter (jsontype_t expectedType, const Json::Value &value) const |
|
|
std::string | procedureName |
| Each Procedure should have a name.
|
|
parameterNameList_t | parametersName |
| This map represents all necessary Parameters of each Procedure. More...
|
|
parameterPositionList_t | parametersPosition |
| This vector holds all parametertypes by position.
|
|
procedure_t | procedureType |
| defines whether the procedure is a method or a notification
|
|
jsontype_t | returntype |
| this field is only valid if procedure is of type method (not notification).
|
|
parameterDeclaration_t | paramDeclaration |
| paramDeclaration this field defines if procedure uses named or positional parameters.
|
|
Definition at line 26 of file procedure.h.
◆ Procedure() [1/2]
Procedure |
( |
const std::string & |
name, |
|
|
parameterDeclaration_t |
paramType, |
|
|
|
... |
|
) |
| |
Constructor for notificaiton with parameters as va_list.
The last parameter must be NULL. If no parameters are passed, parameters either do not exist, or cannot be checked for type compliance by the library.
- Parameters
-
◆ Procedure() [2/2]
Procedure |
( |
const std::string & |
name, |
|
|
parameterDeclaration_t |
paramType, |
|
|
jsontype_t |
returntype, |
|
|
|
... |
|
) |
| |
Constructor for method with parameters as va_list.
The last parameter must be NULL. If no parameters are passed, parameters either do not exist, or cannot be checked for type compliance by the library.
- Parameters
-
◆ AddParameter()
void AddParameter |
( |
const std::string & |
name, |
|
|
jsontype_t |
type |
|
) |
| |
AddParameter.
- Parameters
-
name | describes the name of the parameter. In case of an positional parameters, this value can be anything. |
type | describes the defined type for this parameter. |
◆ ValdiateParameters()
bool ValdiateParameters |
( |
const Json::Value & |
parameters | ) |
const |
This method is validating the incoming parameters for each procedure.
- Parameters
-
parameters | - should contain the parameter-object of an valid json-rpc 2.0 request |
- See also
- http://groups.google.com/group/json-rpc/web/json-rpc-2-0
- Returns
- true on successful validation false otherwise.
If the valid parameters are of Type JSON_ARRAY or JSON_OBJECT, they can only be checked for name and not for their structure.
◆ parametersName
parameterNameList_t parametersName |
|
private |
This map represents all necessary Parameters of each Procedure.
The string represents the name of each parameter and JsonType the type it should have.
Definition at line 94 of file procedure.h.