statistics.cpp

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /*!
00003  * \file statistics.cpp
00004  * \brief Description: Implementation of Statistics class
00005  * 
00006  * Author: Sergey Berezin
00007  * 
00008  * Created: Thu Jun  5 17:49:01 2003
00009  *
00010  * <hr>
00011  * License to use, copy, modify, sell and/or distribute this software
00012  * and its documentation for any purpose is hereby granted without
00013  * royalty, subject to the terms and conditions defined in the \ref
00014  * LICENSE file provided with this distribution.
00015  * 
00016  * <hr>
00017  * 
00018  */
00019 /*****************************************************************************/
00020 
00021 #include "statistics.h"
00022 
00023 using namespace std;
00024 
00025 namespace CVC3 {
00026   
00027 ////////////////////////////////////////////////////////////////////////
00028 // Class Statistics
00029 ////////////////////////////////////////////////////////////////////////
00030 
00031 // Print all the collected data
00032 ostream& Statistics::printAll(ostream& os) const {
00033   // Flags
00034   os << endl
00035      << "********************************" << endl
00036      << "********* Statistics ***********" << endl
00037      << "********************************" << endl;
00038 
00039   StatFlagMap::const_iterator i = d_flags.begin(), iend = d_flags.end();
00040   if(i!=iend) {
00041     os << endl << "************ Flags *************" << endl << endl;
00042     for(; i != iend; ++i)
00043       os << (*i).first << " = " << (*i).second << endl;
00044   }
00045   StatCounterMap::const_iterator 
00046     j = d_counters.begin(), jend = d_counters.end();
00047   if(j!=jend) {
00048     os << endl << "*********** Counters ***********" << endl << endl;
00049     for(; j != jend; ++j)
00050       os << (*j).first << " = " << (*j).second << endl;
00051   }
00052   os << endl
00053      << "********************************" << endl
00054      << "****** End of Statistics *******" << endl
00055      << "********************************" << endl;
00056   return os;
00057 }
00058 
00059 } // end of namespace CVC3
00060 

Generated on Tue Jul 3 14:33:38 2007 for CVC3 by  doxygen 1.5.1