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.

84 lines
2.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. {
  28. public:
  29. // Method to fetch singleton instance.
  30. static basicNCursesEngine * getInstance();
  31. // Destructor
  32. ~basicNCursesEngine();
  33. bool attachWindow(WindowCLI * wnd);
  34. protected:
  35. // Constructor - protected so users cannot call it.
  36. basicNCursesEngine();
  37. void m_fThreadProc(void);
  38. private:
  39. // private static member referencing the single instance of the object
  40. // TODO: Replace basicNCursesEngine with the type of object you want to
  41. // return the single instance of
  42. WIN_POOL m_vWindowPool;
  43. static basicNCursesEngine * _instance;
  44. WINDOW * m_pCursesWin;
  45. CDKSCREEN * m_pCDKScreen;
  46. // Copy constructor
  47. // Declared but not defined to prevent auto-generated
  48. // copy constructor. Refer to "Effective C++" by Meyers
  49. // basicNCursesEngine(const basicNCursesEngine& src);
  50. // Assignment operator
  51. // Declared but not defined to prevent auto-generated
  52. // assignment operator. Refer to "Effective C++" by Meyers
  53. // basicNCursesEngine& operator=(const basicNCursesEngine& src);
  54. };
  55. // TODO: Uncomment the copy constructor when you need it.
  56. // inline basicNCursesEngine::basicNCursesEngine(const basicNCursesEngine& src)
  57. //{
  58. // // TODO: copy
  59. //}
  60. // TODO: Uncomment the assignment operator when you need it.
  61. // inline basicNCursesEngine& basicNCursesEngine::operator=(const basicNCursesEngine& rhs)
  62. //{
  63. // if (this == &rhs) {
  64. // return *this;
  65. // }
  66. //
  67. // // TODO: assignment
  68. //
  69. // return *this;
  70. //}
  71. #endif // __BASICNCURSESENGINE_H_INCL__