ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
909 B

  1. #ifndef CPPCMS_SERVICE_H
  2. #define CPPCMS_SERVICE_H
  3. #include "defs.h"
  4. #include "noncopyable.h"
  5. #include "hold_ptr.h"
  6. #include "callback0.h"
  7. namespace cppcms {
  8. namespace impl {
  9. class service;
  10. }
  11. class applications_pool;
  12. class thread_pool;
  13. namespace locale {
  14. class pool;
  15. }
  16. class cppcms_config;
  17. class CPPCMS_API service : public util::noncopyable
  18. {
  19. public:
  20. service(int argc,char *argv[]);
  21. ~service();
  22. void run();
  23. void shutdown();
  24. cppcms::applications_pool &applications_pool();
  25. cppcms::thread_pool &thread_pool();
  26. cppcms::cppcms_config const &settings();
  27. cppcms::locale::pool const &locale_pool();
  28. cppcms::impl::service &impl();
  29. void post(util::callback0 const &handler);
  30. int threads_no();
  31. int procs_no();
  32. private:
  33. void stop();
  34. void start_acceptor();
  35. void setup_exit_handling();
  36. bool prefork();
  37. util::hold_ptr<impl::service> impl_;
  38. };
  39. } //
  40. #endif