service_main.h File Reference
This header defines the service_main utility function template. More...
#include <ssrc/wisp/service.h>#include <ssrc/wisp/utility/ServiceOptions.h>#include <ssrc/wisp/utility/ServiceMainOptions.h>#include <iostream>
Include dependency graph for service_main.h:

Go to the source code of this file.
Classes | |
| struct | ServiceFactory< service_type, options_type, false > |
| struct | ServiceFactory< service_type, options_type, true > |
| struct | ServiceMainOptionsProcessor |
Defines | |
| #define | WISP_EMPTY_INIT_CODE |
| #define | WISP_CUSTOM_SERVICE_MAIN_WITH_INIT(service_type, handler_type, options_type, options_processor_type, has_initializer, init_code) |
| #define | WISP_CUSTOM_SERVICE_MAIN(service_type, handler_type, options_type, options_processor_type, has_initializer) WISP_CUSTOM_SERVICE_MAIN_WITH_INIT(service_type, handler_type, options_type, options_processor_type, has_initializer, WISP_EMPTY_INIT_CODE) |
| #define | WISP_SERVICE_MAIN_WITH_INIT(service_type, init_code) |
| #define | WISP_SERVICE_MAIN(service_type) WISP_SERVICE_MAIN_WITH_INIT(service_type, WISP_EMPTY_INIT_CODE) |
Functions | |
| template<typename service_type , typename options_type > | |
| __BEGIN_NS_SSRC_WISP_UTILITY SSRC_UNIQUE_PTR< service_type > | new_service (const options_type &options) |
| template<typename service_type , typename options_type , typename init_type > | |
| SSRC_UNIQUE_PTR< service_type > | new_service (const options_type &options, const init_type &initializer) |
| template<typename ProtocolProcessor , template< typename PP > class EH, typename CustomOptions , typename CustomOptionsProcessor , bool has_initializer> | |
| int | service_main (int argc, char *argv[]) |
Detailed Description
This header defines the service_main utility function template.
Definition in file service_main.h.
Define Documentation
| #define WISP_CUSTOM_SERVICE_MAIN | ( | service_type, | |||
| handler_type, | |||||
| options_type, | |||||
| options_processor_type, | |||||
| has_initializer | ) | WISP_CUSTOM_SERVICE_MAIN_WITH_INIT(service_type, handler_type, options_type, options_processor_type, has_initializer, WISP_EMPTY_INIT_CODE) |
Definition at line 162 of file service_main.h.
| #define WISP_CUSTOM_SERVICE_MAIN_WITH_INIT | ( | service_type, | |||
| handler_type, | |||||
| options_type, | |||||
| options_processor_type, | |||||
| has_initializer, | |||||
| init_code | ) |
Value:
int main(int argc, char *argv[]) { \ init_code \ return NS_SSRC_WISP_UTILITY::service_main<service_type, handler_type, options_type, options_processor_type, has_initializer>(argc, argv); \ }
Definition at line 156 of file service_main.h.
| #define WISP_EMPTY_INIT_CODE |
Definition at line 154 of file service_main.h.
| #define WISP_SERVICE_MAIN | ( | service_type | ) | WISP_SERVICE_MAIN_WITH_INIT(service_type, WISP_EMPTY_INIT_CODE) |
Definition at line 172 of file service_main.h.
| #define WISP_SERVICE_MAIN_WITH_INIT | ( | service_type, | |||
| init_code | ) |
Value:
WISP_CUSTOM_SERVICE_MAIN_WITH_INIT(service_type, \ NS_SSRC_WISP_SERVICE::ServiceEventHandler, \ NS_SSRC_WISP_UTILITY::ServiceMainOptions, \ NS_SSRC_WISP_UTILITY::ServiceMainOptionsProcessor, \ false, init_code)
Definition at line 165 of file service_main.h.
Function Documentation
template<typename service_type , typename options_type , typename init_type >
| SSRC_UNIQUE_PTR<service_type> new_service | ( | const options_type & | options, | |
| const init_type & | initializer | |||
| ) | [inline] |
Definition at line 41 of file service_main.h.
template<typename service_type , typename options_type >
| __BEGIN_NS_SSRC_WISP_UTILITY SSRC_UNIQUE_PTR<service_type> new_service | ( | const options_type & | options | ) | [inline] |
Definition at line 34 of file service_main.h.
Referenced by service_main().
template<typename ProtocolProcessor , template< typename PP > class EH, typename CustomOptions , typename CustomOptionsProcessor , bool has_initializer>
| int service_main | ( | int | argc, | |
| char * | argv[] | |||
| ) | [inline] |
Definition at line 102 of file service_main.h.
References new_service(), NS_SSRC_WISP, NS_SSRC_WISP_SERVICE, EventLoop::start(), and WISP_IMPORT_T.
Copyright © 2006-2010 Savarese Software Research Corporation. All rights reserved.
Copyright © 2010 Savarese Software Research Corporation. All rights reserved