#include <simgear/compiler.h>
#include <simgear/debug/debug_types.h>
-#include <vector>
#include <sstream>
-#include <memory> // for std::auto_ptr
-
-typedef std::vector<std::string> string_list;
// forward decls
class SGPath;
const char* file, int line, const std::string& aMessage) = 0;
};
-
-class BufferedLogCallback : public LogCallback
-{
-public:
- BufferedLogCallback(sgDebugClass c, sgDebugPriority p);
- virtual ~BufferedLogCallback();
-
- virtual void operator()(sgDebugClass c, sgDebugPriority p,
- const char* file, int line, const std::string& aMessage);
-
- /**
- * copy the buffered log data into the provided output list
- * (which will be cleared first). This method is safe to call from
- * any thread.
- */
- void threadsafeCopy(string_list& aOutput);
-private:
- class BufferedLogCallbackPrivate;
- std::auto_ptr<BufferedLogCallbackPrivate> d;
-};
-
} // of namespace simgear
/**
* must use appropriate locking.
*/
void addCallback(simgear::LogCallback* cb);
-
- // friend logstream& sglog();
-// static logstream *initGlobalLogstream();
+
+ void removeCallback(simgear::LogCallback* cb);
private:
// constructor