Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

ExecutiveProcess.hpp 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // SNF4CGP/ExecutiveProcess.hpp
  2. // Copyright (C) 2009 ARM Research Labs, LLC
  3. // See www.armresearch.com for more information.
  4. //
  5. // SNF4CGP Execuitive Process (Application Object)
  6. // The ExecutiveProcess is responsible for constructing the application, connecting
  7. // it's components, and peforming an orderly startup and shutdown.
  8. #ifndef IncludedExecutiveProcess
  9. #define IncludedExecutiveProcess
  10. #include "JobPool.hpp"
  11. #include "WorkerPool.hpp"
  12. #include "InputProcessor.hpp"
  13. #include "OutputProcessor.hpp"
  14. #include "Command.hpp"
  15. #include <string>
  16. class ExecutiveProcess { // The executive process...
  17. private:
  18. const string VersionInfo; // Knows Version and
  19. const string ConfigInfo; // Configuration.
  20. JobPool Jobs; // Keeps pointers to the apps
  21. WorkerPool Workers; // components so they can be
  22. InputProcessor Input; // created, destroyed and
  23. OutputProcessor Output; // connected together.
  24. unsigned int QuitJobNumber; // Quit job number 0 until QUIT.
  25. void initializeOutput(); // These do what they say.
  26. void initializeJobPool();
  27. void initializeWorkerPool();
  28. void shutdownWorkerPool();
  29. void shutdownJobPool();
  30. void shutdownOutput();
  31. void dispatchCommand(Command& C); // Job + Worker + Command; go!
  32. void dispatchWakeupCommand();
  33. void notifyQUIT();
  34. void notifyNOTGOOD();
  35. public:
  36. ExecutiveProcess(const string& Version, const string& Config); // Simple construction. The d'tor needs
  37. ~ExecutiveProcess(); // to deal with uncerimoneous shutdowns.
  38. void doStartup(); // The main thread calls these in sequence.
  39. void doProcessing();
  40. void doShutdown();
  41. };
  42. #endif