Download | Plain Text | No Line Numbers


  1. /**
  2.  * @module displays
  3.  * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348)
  4.  * @brief Implementations of CDisplay
  5.  * @date 26.05.2009
  6.  */
  7.  
  8. #ifndef DISPLAYS_H
  9. #define DISPLAYS_H 1
  10.  
  11. #include <iomanip>
  12. #include "cdisplay.h"
  13.  
  14. /**
  15.  * @class CDisplayWDEZ
  16.  *
  17.  * Implementation of CDisplay
  18.  * Prints T to stdout as decimal
  19.  */
  20. template <class T>
  21. class CDisplayWDEZ
  22. : public CDisplay<T>
  23. {
  24. public:
  25. CDisplayWDEZ()
  26. : CDisplay<T>("wdez")
  27. {}
  28.  
  29. /**
  30.   * @method display
  31.   * @brief prints value to display
  32.   * @param value value to display
  33.   * @return -
  34.   * @globalvars none
  35.   * @exception none
  36.   * @pre none
  37.   * @post none
  38.   */
  39. void display(const T &value)
  40. {
  41. std::cout << std::dec << value << std::endl;
  42. }
  43. };
  44.  
  45. /*============================================================================*/
  46.  
  47. /**
  48.  * @class CDisplayWHEX
  49.  *
  50.  * Implementation of CDisplay
  51.  * Prints T to stdout as decimal
  52.  */
  53. template <class T>
  54. class CDisplayWHEX
  55. : public CDisplay<T>
  56. {
  57. public:
  58. CDisplayWHEX()
  59. : CDisplay<T>("whex")
  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. void display(const T &value)
  73. {
  74. std::cout << std::hex << value << std::endl;
  75. }
  76. };
  77.  
  78. #endif
  79.  
  80. /* vim: set et sw=2 ts=2: */
  81.