interface.hpp 1.58 KB
Newer Older
1
/*!
2
 *\file interface.hpp
3 4 5 6
 */



7 8
#ifndef INTERFACE_HPP
#define INTERFACE_HPP
9

10 11 12

class Interface;

13
#include "resource.hpp"
14 15 16


/*!
17 18 19
 *\brief  This is an interface, used by the terminal and graphical interfaces.
 *
 *Interface defines functions implemented in their inherited classes. It gives functions which can be used by others parts of ViTE (for example the Parser and the Data Structure). Thus, it hides which kind of interface is used: a console interface (where messages are displayed in the terminal) or a graphical interface (where messages are displayed in a dialog box).
20 21 22 23 24 25
*/
class Interface{

 public:

    /*!
26
     * \arg string : the string to be displayed.
27
     * \brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialog box for the Interface_graphic. Then, it killed the application.
28
     */
29
    virtual void error(const std::string) const =0;
30
;
31 32 33

    /*!
      \arg string : the string to be displayed.
34
      \brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialog box for the Interface_graphic. Then the program go on, but with an indeterminated behaviour.
35
    */
36
    virtual void warning(const std::string) const =0;
37

38 39 40 41
    /*!
      \arg string : the string to be displayed.
      \brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialog box for the Interface_graphic. Then the program go on normally.
    */
42
    virtual void information(const std::string) const =0;
43

44 45 46 47

};

#endif