Patronum
|
The Controller class provide control functionality for your service. More...
#include <PController.h>
Public Member Functions | |
Controller () | |
Controller This is base constructor of the controller. | |
~Controller () override | |
bool | send (int argc, char **argv) |
send This method send request to service. | |
bool | send () |
send - This method send request to service. | |
bool | sendStop () |
sendStop This method send stop command to service; | |
QuasarAppUtils::Help::Section | help () const |
help This method return help of the Controller. | |
Protected Member Functions | |
void | handleError (PatronumError error) override |
handleError - override this method if you want track errors the default implementation print error message. | |
void | handleFeatures (const QList< Feature > &features) override |
handleFeatures - Override this method if you want create a custom reaction of get service features. default implementation print help of available command of your service. | |
void | handleResponce (const QVariantMap &responce) override |
handleResponce - Override this method if you want create a custom reaction of get responce from service. Default inplementation print responce to console. | |
void | finished () override |
finished This method invoked when controler receive from service the Command::CloseConnection command This implementation invoke he exit method of the QCoreApplication and finished application. If do not want to stop application after receive Command::CloseConnection then override this method. | |
QList< Feature > | features () |
features - This method return current features of connected service. | |
![]() | |
IController ()=default | |
virtual | ~IController ()=default |
The Controller class provide control functionality for your service.
Definition at line 56 of file PController.h.
Patronum::Controller::Controller | ( | ) |
Controller This is base constructor of the controller.
Definition at line 20 of file PController.cpp.
|
override |
Definition at line 24 of file PController.cpp.
|
protected |
features - This method return current features of connected service.
Definition at line 172 of file PController.cpp.
|
overrideprotectedvirtual |
finished This method invoked when controler receive from service the Command::CloseConnection command This implementation invoke he exit method of the QCoreApplication and finished application. If do not want to stop application after receive Command::CloseConnection then override this method.
Implements Patronum::IController.
Definition at line 167 of file PController.cpp.
|
overrideprotectedvirtual |
handleError - override this method if you want track errors the default implementation print error message.
error | - error id see PatronumError |
Implements Patronum::IController.
Definition at line 123 of file PController.cpp.
|
overrideprotectedvirtual |
handleFeatures - Override this method if you want create a custom reaction of get service features. default implementation print help of available command of your service.
features | - List of features. |
Implements Patronum::IController.
Definition at line 127 of file PController.cpp.
|
overrideprotectedvirtual |
handleResponce - Override this method if you want create a custom reaction of get responce from service. Default inplementation print responce to console.
responce | - Responce from service. |
Implements Patronum::IController.
Definition at line 151 of file PController.cpp.
QuasarAppUtils::Help::Section Patronum::Controller::help | ( | ) | const |
help This method return help of the Controller.
Definition at line 109 of file PController.cpp.
bool Patronum::Controller::send | ( | ) |
send - This method send request to service.
Definition at line 36 of file PController.cpp.
bool Patronum::Controller::send | ( | int | argc, |
char ** | argv | ||
) |
send This method send request to service.
argc | This is count of arguments. |
argv | This is arguments list. |
Definition at line 28 of file PController.cpp.
bool Patronum::Controller::sendStop | ( | ) |
sendStop This method send stop command to service;
Definition at line 94 of file PController.cpp.