25 #ifndef MATCH_TRACE_H_
26 #define MATCH_TRACE_H_
100 #ifndef __SYNTHESIS__
101 explicit Tracer(std::ostream* o = NULL)
110 #ifndef __SYNTHESIS__
118 #ifndef __SYNTHESIS__
119 : ostr_(other.ostr_),
120 trace_level_(other.trace_level_),
121 cur_level_(other.cur_level_),
127 #ifndef __SYNTHESIS__
129 trace_level_ = other.trace_level_;
130 cur_level_ = other.cur_level_;
131 fatal_ = other.fatal_;
135 #ifndef __SYNTHESIS__
136 template <
typename T_MSG>
137 Tracer& operator<<(T_MSG t) {
138 if (cur_level_ <= trace_level_) {
144 Tracer& operator<<(std::ostream& (*f)(std::ostream&)) {
145 if (cur_level_ <= trace_level_) {
159 return FlushBuffer();
163 if (cur_level_ <= trace_level_) {
164 (*ostr_) << std::endl;
171 template <
typename T_MSG>
172 Tracer& operator<<(T_MSG t) {
176 int GetTraceLevel() {
177 #ifndef __SYNTHESIS__
184 void SetTraceLevel(
int l) {
185 #ifndef __SYNTHESIS__
189 void SetCurrentLevel(
int l) {
190 #ifndef __SYNTHESIS__
195 #ifndef __SYNTHESIS__
Tracer class to dump simulation stats to an output stream (stdout by default).