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.

77 lines
2.3 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Dr.Frucht Systems Ltd.
  3. // Copyright � 2000-2016. All Rights Reserved.
  4. // Version 2.0 3/31/2016
  5. // Last modification: 3/31/2016
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: basicNCursesEngine.h
  9. // AUTHOR: gagua
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of basicNCursesEngine.h
  13. //----------------------------------------------------------------------------
  14. //
  15. #ifndef __BASICNCURSESENGINE_H_INCL__
  16. #define __BASICNCURSESENGINE_H_INCL__
  17. #include "../../cli/cliClass.h"
  18. #include "basicThread.h"
  19. typedef std::vector< WindowCLI *> WIN_POOL;
  20. typedef std::vector< WindowCLI *>::iterator WIN_ITERATOR;
  21. /**
  22. * TODO: Add class description
  23. *
  24. * @author gagua
  25. */
  26. class basicNCursesEngine: public basicThread {
  27. public:
  28. // Method to fetch singleton instance.
  29. static basicNCursesEngine* getInstance();
  30. // Destructor
  31. ~basicNCursesEngine();
  32. bool attachWindow( WindowCLI *wnd );
  33. protected:
  34. // Constructor - protected so users cannot call it.
  35. basicNCursesEngine();
  36. void m_fThreadProc( void );
  37. private:
  38. // private static member referencing the single instance of the object
  39. // TODO: Replace basicNCursesEngine with the type of object you want to
  40. // return the single instance of
  41. WIN_POOL m_vWindowPool;
  42. static basicNCursesEngine* _instance;
  43. WINDOW *m_pCursesWin;
  44. CDKSCREEN *m_pCDKScreen;
  45. // Copy constructor
  46. // Declared but not defined to prevent auto-generated
  47. // copy constructor. Refer to "Effective C++" by Meyers
  48. //basicNCursesEngine(const basicNCursesEngine& src);
  49. // Assignment operator
  50. // Declared but not defined to prevent auto-generated
  51. // assignment operator. Refer to "Effective C++" by Meyers
  52. //basicNCursesEngine& operator=(const basicNCursesEngine& src);
  53. };
  54. // TODO: Uncomment the copy constructor when you need it.
  55. //inline basicNCursesEngine::basicNCursesEngine(const basicNCursesEngine& src)
  56. //{
  57. // // TODO: copy
  58. //}
  59. // TODO: Uncomment the assignment operator when you need it.
  60. //inline basicNCursesEngine& basicNCursesEngine::operator=(const basicNCursesEngine& rhs)
  61. //{
  62. // if (this == &rhs) {
  63. // return *this;
  64. // }
  65. //
  66. // // TODO: assignment
  67. //
  68. // return *this;
  69. //}
  70. #endif // __BASICNCURSESENGINE_H_INCL__