Nebula
Loading...
Searching...
No Matches
consolehandler.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
14#include "core/refcounted.h"
15#include "util/array.h"
16#include "util/string.h"
17
18//------------------------------------------------------------------------------
19namespace IO
20{
22{
24public:
28 virtual ~ConsoleHandler();
30 virtual void Open();
32 virtual void Close();
34 bool IsOpen() const;
36 virtual void Update();
38 virtual void Print(const Util::String& s);
40 virtual void Error(const Util::String& s);
42 virtual void Warning(const Util::String& s);
44 virtual void Confirm(const Util::String& s);
46 virtual void DebugOut(const Util::String& s);
48 virtual bool HasInput();
50 virtual Util::String GetInput();
51
52private:
53 bool isOpen;
54};
55
56//------------------------------------------------------------------------------
59inline
60bool
62{
63 return this->isOpen;
64}
65
66} // namespace IO
67//------------------------------------------------------------------------------
The common base class of Nebula.
Definition refcounted.h:38
Base class for all console handlers.
Definition consolehandler.h:22
__DeclareClass(ConsoleHandler)
virtual void Print(const Util::String &s)
called by console to output data
Definition consolehandler.cc:68
virtual void Close()
called by console when removed
Definition consolehandler.cc:49
virtual void DebugOut(const Util::String &s)
called by console to output debug string
Definition consolehandler.cc:104
virtual ~ConsoleHandler()
destructor
Definition consolehandler.cc:27
virtual void Update()
called by Console::Update()
Definition consolehandler.cc:59
virtual void Warning(const Util::String &s)
called by console to output warning
Definition consolehandler.cc:86
virtual void Open()
called by console when attached
Definition consolehandler.cc:39
virtual void Confirm(const Util::String &s)
called by console to display a confirmation message box
Definition consolehandler.cc:95
bool isOpen
Definition consolehandler.h:53
virtual bool HasInput()
return true if input is available
Definition consolehandler.cc:113
virtual Util::String GetInput()
read available input
Definition consolehandler.cc:122
ConsoleHandler()
constructor
Definition consolehandler.cc:18
virtual void Error(const Util::String &s)
called by console with serious error
Definition consolehandler.cc:77
bool IsOpen() const
return true if currently open
Definition consolehandler.h:61
Instances of wrapped stream classes.
Definition orientation.cc:10
Nebula's universal string class.
Definition string.h:50