* Forward declare the LogSink global

* Change GetSink() to return a const pointer.

Originally committed to SVN as r4405.
This commit is contained in:
Amar Takhar 2010-06-02 23:45:51 +00:00
parent 6c13d8f250
commit fc9e01c68a

View file

@ -47,6 +47,7 @@
namespace agi {
namespace log {
class LogSink;
/// Severity levels
enum Severity {
@ -61,6 +62,8 @@ enum Severity {
/// Set in common/log.cpp, keep this ordered the same as Severity.
extern const char *Severity_ID;
/// Global log sink.
extern LogSink *log;
/// Container to hold a single message
struct SinkMessage {
@ -126,11 +129,10 @@ public:
void Unsubscribe(const int &id);
/// @brief @get the complete (current) log.
/// @param[out] out Reference to a sink.
void GetSink(Sink *s);
/// @return Const pointer to internal sink.
const Sink* GetSink() { return sink; }
};
/// An emitter to produce human readable output for a log sink.
class Emitter {
/// ID for this emitter