Savarese Software Research Corporation
service_main.h File Reference

This header defines the service_main utility function template. More...

Include dependency graph for service_main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct   utility::ServiceFactory< service_type, options_type, false >
struct   utility::ServiceFactory< service_type, options_type, true >
struct   utility::ServiceMainOptionsProcessor

Namespaces

namespace   utility
 

The utility namespace contains utility classes.


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 >
SSRC_UNIQUE_PTR< service_type >  utility::new_service (const options_type &options)
template<typename service_type , typename options_type , typename init_type >
SSRC_UNIQUE_PTR< service_type >  utility::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  utility::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.


Savarese Software Research Corporation
Copyright © 2006-2010 Savarese Software Research Corporation. All rights reserved.