CVC3
statistics.cpp
Go to the documentation of this file.
1 /*****************************************************************************/
2 /*!
3  * \file statistics.cpp
4  * \brief Description: Implementation of Statistics class
5  *
6  * Author: Sergey Berezin
7  *
8  * Created: Thu Jun 5 17:49:01 2003
9  *
10  * <hr>
11  * License to use, copy, modify, sell and/or distribute this software
12  * and its documentation for any purpose is hereby granted without
13  * royalty, subject to the terms and conditions defined in the \ref
14  * LICENSE file provided with this distribution.
15  *
16  * <hr>
17  *
18  */
19 /*****************************************************************************/
20 
21 #include "statistics.h"
22 
23 using namespace std;
24 
25 namespace CVC3 {
26 
27 ////////////////////////////////////////////////////////////////////////
28 // Class Statistics
29 ////////////////////////////////////////////////////////////////////////
30 
31 // Print all the collected data
32 ostream& Statistics::printAll(ostream& os) const {
33  // Flags
34  os << endl
35  << "********************************" << endl
36  << "********* Statistics ***********" << endl
37  << "********************************" << endl;
38 
39  StatFlagMap::const_iterator i = d_flags.begin(), iend = d_flags.end();
40  if(i!=iend) {
41  os << endl << "************ Flags *************" << endl << endl;
42  for(; i != iend; ++i)
43  os << (*i).first << " = " << (*i).second << endl;
44  }
45  StatCounterMap::const_iterator
46  j = d_counters.begin(), jend = d_counters.end();
47  if(j!=jend) {
48  os << endl << "*********** Counters ***********" << endl << endl;
49  for(; j != jend; ++j)
50  os << (*j).first << " = " << (*j).second << endl;
51  }
52  os << endl
53  << "********************************" << endl
54  << "****** End of Statistics *******" << endl
55  << "********************************" << endl;
56  return os;
57 }
58 
59 } // end of namespace CVC3
60