forked from mia/Aegisub
* Forward declare the LogSink global
* Change GetSink() to return a const pointer. Originally committed to SVN as r4405.
This commit is contained in:
parent
6c13d8f250
commit
fc9e01c68a
1 changed files with 5 additions and 3 deletions
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
namespace agi {
|
namespace agi {
|
||||||
namespace log {
|
namespace log {
|
||||||
|
class LogSink;
|
||||||
|
|
||||||
/// Severity levels
|
/// Severity levels
|
||||||
enum Severity {
|
enum Severity {
|
||||||
|
@ -61,6 +62,8 @@ enum Severity {
|
||||||
/// Set in common/log.cpp, keep this ordered the same as Severity.
|
/// Set in common/log.cpp, keep this ordered the same as Severity.
|
||||||
extern const char *Severity_ID;
|
extern const char *Severity_ID;
|
||||||
|
|
||||||
|
/// Global log sink.
|
||||||
|
extern LogSink *log;
|
||||||
|
|
||||||
/// Container to hold a single message
|
/// Container to hold a single message
|
||||||
struct SinkMessage {
|
struct SinkMessage {
|
||||||
|
@ -126,11 +129,10 @@ public:
|
||||||
void Unsubscribe(const int &id);
|
void Unsubscribe(const int &id);
|
||||||
|
|
||||||
/// @brief @get the complete (current) log.
|
/// @brief @get the complete (current) log.
|
||||||
/// @param[out] out Reference to a sink.
|
/// @return Const pointer to internal sink.
|
||||||
void GetSink(Sink *s);
|
const Sink* GetSink() { return sink; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// An emitter to produce human readable output for a log sink.
|
/// An emitter to produce human readable output for a log sink.
|
||||||
class Emitter {
|
class Emitter {
|
||||||
/// ID for this emitter
|
/// ID for this emitter
|
||||||
|
|
Loading…
Reference in a new issue