summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/cdisplay.h
blob: 71084424347c13783ec615e4aab125d8432179d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
 * @module cdisplay
 * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348)
 * @brief  Abstract template class for displays
 * @date   26.05.2009
 */

#ifndef CDISPLAY_H
#define CDISPLAY_H 1

/**
 * @class CDisplay
 *
 * Abstract template class for displays
 */
template <class T>
class CDisplay
{
  public:
    /**
     * @method CDisplay
     * @brief  Default ctor
     * @param  name  name of display
     * @return -
     * @globalvars none
     * @exception  none
     * @pre  none
     * @post none
     */
    CDisplay(std::string name)
      : m_name(name)
    {}

    /**
     * @method ~CDisplay
     * @brief  Default dtor
     * @param  -
     * @return -
     * @globalvars none
     * @exception  none
     * @pre  none
     * @post none
     */
    virtual ~CDisplay()
    {}

    /**
     * @method getName
     * @brief  returns name of display
     * @param  -
     * @return name of display
     * @globalvars none
     * @exception  none
     * @pre  none
     * @post none
     */
    virtual const std::string& getName()
    {
      return m_name;
    }

    /**
     * @method display
     * @brief  prints value to display
     * @param  value  value to display
     * @return -
     * @globalvars none
     * @exception  none
     * @pre  none
     * @post none
     */
    virtual void display(const T &value) = 0;

  protected:
    /* members */
    /** name of display */
    std::string m_name;
};

#endif

/* vim: set et sw=2 ts=2: */