Download | Plain Text | No Line Numbers


  1. /**
  2.  * @module cdisplay
  3.  * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348)
  4.  * @brief Abstract template class for displays
  5.  * @date 10.05.2009
  6.  */
  7.  
  8. #ifndef CDISPLAY_H
  9. #define CDISPLAY_H 1
  10.  
  11. /**
  12.  * @class CDisplayT
  13.  *
  14.  * Abstract template class for displays
  15.  */
  16. template <class T>
  17. class CDisplayT
  18. {
  19. public:
  20. /**
  21.   * @method CDisplayT
  22.   * @brief Default ctor
  23.   * @param name name of display
  24.   * @return -
  25.   * @globalvars none
  26.   * @exception none
  27.   * @conditions none
  28.   */
  29. CDisplayT(std::string name)
  30. : m_name(name)
  31. {}
  32.  
  33. /**
  34.   * @method ~CDisplayT
  35.   * @brief Default dtor
  36.   * @param -
  37.   * @return -
  38.   * @globalvars none
  39.   * @exception none
  40.   * @conditions none
  41.   */
  42. virtual ~CDisplayT()
  43. {}
  44.  
  45. /**
  46.   * @method getName
  47.   * @brief returns name of display
  48.   * @param -
  49.   * @return name of display
  50.   * @globalvars none
  51.   * @exception none
  52.   * @conditions none
  53.   */
  54. virtual const std::string& getName()
  55. {
  56. return m_name;
  57. }
  58.  
  59. /**
  60.   * @method display
  61.   * @brief prints value to display
  62.   * @param value value to display
  63.   * @return -
  64.   * @globalvars none
  65.   * @exception none
  66.   * @conditions none
  67.   */
  68. virtual void display(const T &value) = 0;
  69.  
  70. protected:
  71. /* members */
  72. /** name of display */
  73. std::string m_name;
  74. };
  75.  
  76. /**
  77.  * @class CDisplay
  78.  *
  79.  * Memory definition for CCPU
  80.  */
  81. typedef CDisplayT<CDat> CDisplay;
  82.  
  83. #endif
  84.  
  85. /* vim: set et sw=2 ts=2: */
  86.