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.

76 lines
2.1 KiB

7 years ago
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
7 years ago
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __BASICENGINE_H_INCL__
  2. #define __BASICENGINE_H_INCL__
  3. #include "basicObject.h"
  4. #include "basicMutex.h"
  5. /**
  6. * TODO: Add class description
  7. *
  8. * @author Gagua
  9. */
  10. class basicEngine: public basicObject {
  11. private:
  12. basicMutex m_mWMProtector;
  13. uint8_t m_bWM;
  14. public:
  15. // Constructor
  16. basicEngine();
  17. // Destructor
  18. virtual ~basicEngine();
  19. // Copy constructor
  20. // TODO: Uncomment the copy constructor when you need it.
  21. //basicEngine(const basicEngine& src);
  22. // Assignment operator
  23. // TODO: Uncomment the assignment operator when you need it.
  24. //basicEngine& operator=(const basicEngine& src);
  25. //
  26. //virtual networkClientHandler * attachNewClient( int SocketID ){ return 0; };
  27. //virtual bool detachClient( networkClientHandler *ptr ){ return false; };
  28. //
  29. //virtual bool start(){ return false; };
  30. //virtual bool stop( bool force = true ){ return false; };
  31. virtual bool startService(){ return false; };
  32. virtual bool stopService(){ return true; };
  33. void setWM( uint8_t s ){
  34. m_mWMProtector.lock();
  35. m_bWM = s;
  36. m_mWMProtector.unlock();
  37. };
  38. uint8_t getWM( void ){
  39. uint8_t s;
  40. m_mWMProtector.lock();
  41. s = m_bWM;
  42. m_mWMProtector.unlock();
  43. return s;
  44. };
  45. };
  46. // Constructor implementation
  47. inline basicEngine::basicEngine():basicObject(){};
  48. // Destructor implementation
  49. inline basicEngine::~basicEngine(){};
  50. // TODO: Uncomment the copy constructor when you need it.
  51. //inline basicEngine::basicEngine(const basicEngine& src)
  52. //{
  53. // // TODO: copy
  54. //}
  55. // TODO: Uncomment the assignment operator when you need it.
  56. //inline basicEngine& basicEngine::operator=(const basicEngine& rhs)
  57. //{
  58. // if (this == &rhs) {
  59. // return *this;
  60. // }
  61. //
  62. // // TODO: assignment
  63. //
  64. // return *this;
  65. //}
  66. #endif // __BASICENGINE_H_INCL__