Vowpal Wabbit
error_reporting.h
Go to the documentation of this file.
1 #pragma once
2 typedef void (*trace_message_t)(void* context, const std::string&);
3 
4 // TODO: change to virtual class
5 
6 // invoke trace_listener when << endl is encountered.
7 class vw_ostream : public std::ostream
8 {
9  class vw_streambuf : public std::stringbuf
10  {
12 
13  public:
14  vw_streambuf(vw_ostream& str) : parent(str){};
15 
16  virtual int sync();
17  };
19 
20  public:
21  vw_ostream();
22 
25 };
vw_streambuf buf
vw_streambuf(vw_ostream &str)
void * trace_context
void(* trace_message_t)(void *context, const std::string &)
trace_message_t trace_listener