|
winss
|
A template for a service. More...
#include <service.hpp>
Public Member Functions | |
| ServiceTmpl () | |
| The default service template constructor. More... | |
| ServiceTmpl (const std::string &name) | |
| Initializes the service with the name and directory. More... | |
| ServiceTmpl (const ServiceTmpl &)=delete | |
| No copy. More... | |
| ServiceTmpl (ServiceTmpl &&s) | |
| Creates a new service and moves it from an old one. More... | |
| virtual const std::string & | GetName () const |
| Gets the name of the service. More... | |
| virtual bool | IsFlagged () const |
| Gets if the service is flagged or not. More... | |
| virtual void | Reset () |
| Resets the service. More... | |
| virtual void | Check () |
| Checks the service is running. More... | |
| virtual bool | Close (bool ignore_flagged) |
| Close the service. More... | |
| ServiceTmpl & | operator= (const ServiceTmpl &)=delete |
| No copy. More... | |
| ServiceTmpl & | operator= (ServiceTmpl &&s) |
| Moves the service object to this object. More... | |
Static Public Attributes | |
| static constexpr const char | kLogDir [4] = "log" |
| The log definition. More... | |
Protected Member Functions | |
| winss::ServicePipes | CreatePipes () |
| Creates pipes for redirecting STDIN and STDOUT. More... | |
Protected Attributes | |
| std::string | name |
| The name of the service. More... | |
| TServiceProcess | main |
| The main supervisor. More... | |
| TServiceProcess | log |
| The log supervisor. More... | |
| bool | flagged = false |
| Flagged for removal. More... | |
A template for a service.
Models a service directory and has knowledge about redirecting logs for service directories which include a log definition.
| TServiceProcess | The service process implementation type. |
|
inline |
The default service template constructor.
Referenced by winss::ServiceTmpl< TServiceProcess >::ServiceTmpl().
|
inlineexplicit |
Initializes the service with the name and directory.
| name | The name of the service. |
References winss::ServiceTmpl< TServiceProcess >::ServiceTmpl().
|
delete |
No copy.
|
inline |
Creates a new service and moves it from an old one.
| s | The previous service. |
|
inlinevirtual |
Checks the service is running.
References winss::ServiceTmpl< TServiceProcess >::CreatePipes(), FILESYSTEM, and winss::ServiceTmpl< TServiceProcess >::name.
|
inlinevirtual |
Close the service.
| [in] | ignore_flagged | Will force close the service. |
References winss::ServiceTmpl< TServiceProcess >::flagged, and winss::ServiceTmpl< TServiceProcess >::operator=().
|
inlineprotected |
Creates pipes for redirecting STDIN and STDOUT.
References WINDOWS.
Referenced by winss::ServiceTmpl< TServiceProcess >::Check().
|
inlinevirtual |
Gets the name of the service.
References winss::ServiceTmpl< TServiceProcess >::name.
|
inlinevirtual |
Gets if the service is flagged or not.
References winss::ServiceTmpl< TServiceProcess >::flagged.
|
delete |
No copy.
Referenced by winss::ServiceTmpl< TServiceProcess >::Close().
|
inline |
Moves the service object to this object.
| s | The previous service. |
|
inlinevirtual |
Resets the service.
|
protected |
Flagged for removal.
Referenced by winss::ServiceTmpl< TServiceProcess >::Close(), and winss::ServiceTmpl< TServiceProcess >::IsFlagged().
|
static |
The log definition.
|
protected |
The log supervisor.
|
protected |
The main supervisor.
|
protected |
The name of the service.
Referenced by winss::ServiceTmpl< TServiceProcess >::Check(), and winss::ServiceTmpl< TServiceProcess >::GetName().
1.8.11