55
66make_dir "src"
77
8- var argument_processor_name
9- set_value argument_processor_name arg1
10- normalize_class_name argument_processor_name
11- convert_CamelCase_to_snake_case argument_processor_name argument_processor_name
8+ var method_name
9+ set_value method_name arg1
10+ normalize_class_name method_name
11+ convert_CamelCase_to_snake_case method_name method_name
1212
1313var class_name
1414concat class_name "WsjcppJsonRpc20Handler" arg1
@@ -34,7 +34,7 @@ var content_header
3434concat content_header "#ifndef " ifndef_header "
3535#define " ifndef_header "
3636
37- #include <wsjcpp_arguments .h>
37+ #include <wsjcpp_jsonrpc20 .h>
3838
3939class " class_name " : public WsjcppJsonRpc20HandlerBase {
4040 public:
@@ -46,45 +46,46 @@ class " class_name " : public WsjcppJsonRpc20HandlerBase {
4646
4747
4848var content_source
49- concat content_source "
49+ concat content_source "
5050#include \"" base_filename ".h\"
51+ #include <wsjcpp_core.h>
5152#include <wsjcpp_jsonrpc20.h>
5253
5354// ---------------------------------------------------------------------
5455// " class_name "
5556
5657" class_name "::" class_name "()
57- : WsjcppJsonRpc20HandlerBase(\"" argument_processor_name "\", \"TODO description\") {
58+ : WsjcppJsonRpc20HandlerBase(\"" method_name "\", \"TODO description\") {
5859 TAG = \"" class_name "\";
5960 // setAccessUnauthorized(true);
6061 // setAccessUser(true);
61- // setAccessTester(\"here example of command\" );
62- // setAccessAdmin();
63- // void setActivatedFromVersion(\"v0.0.1"); // TODO authomatic set WSJCPP_APP_VERSION
64- // void setDeprecatedFromVersion(" ");
62+ // setAccessTester(true );
63+ // setAccessAdmin(true );
64+ // void setActivatedFromVersion(\"v0.0.1\ "); // TODO authomatic set WSJCPP_APP_VERSION
65+ // void setDeprecatedFromVersion(\"\ ");
6566
6667 // description of input params
67- // requireStringParam(\"uuid\", "object uuid")
68+ // requireStringParam(\"uuid\", \ "object uuid\ ")
6869 // .addValidator(new WsjcppValidatorUUID());
69- // optionalStringParam(\"name\", "Name of object")
70+ // optionalStringParam(\"name\", \ "Name of object\ ")
7071 // .addValidator(new WsjcppValidatorStringLength(3,10));
7172
72- // requireIntegerParam(\"cost\", "Name of object")
73+ // requireIntegerParam(\"cost\", \ "Name of object\ ")
7374 // .addValidator(new WsjcppValidatorIntegerMinValue(3))
7475 // .addValidator(new WsjcppValidatorIntegerMaxValue(1000));
75- // optionalIntegerParam(\"age\", "Name of object")
76+ // optionalIntegerParam(\"age\", \ "Name of object\ ")
7677 // .addValidator(new WsjcppValidatorIntegerMinValue(0))
7778
78- // requireBooleanParam(\"public\", "True if object is public");
79- // optionalBooleanParam(\"activated\", "If object can handle");
79+ // requireBooleanParam(\"public\", \ "True if object is public\ ");
80+ // optionalBooleanParam(\"activated\", \ "If object can handle\ ");
8081}
8182
8283// ---------------------------------------------------------------------
8384
8485void " class_name "::handle(WsjcppJsonRpc20Request *pRequest) {
8586 WsjcppLog::err(TAG, \"Not implemented\");
8687 // TODO
87- pRequest->fail(WsjcppJsonRpc20Error(501, "NOT_IMPLEMENTED"));
88+ pRequest->fail(WsjcppJsonRpc20Error(501, \ "NOT_IMPLEMENTED\ "));
8889}
8990
9091"
0 commit comments