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