/[libvob]/libvob/src/stats/Stats.cxx
ViewVC logotype

Diff of /libvob/src/stats/Stats.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Wed Jun 18 09:44:38 2003 UTC revision 1.3 by tjl, Mon Jun 23 14:53:19 2003 UTC
# Line 24  Stats.cxx Line 24  Stats.cxx
24   * Written by Tuomas J. Lukka   * Written by Tuomas J. Lukka
25   */   */
26    
27    #include <boost/format.hpp>
28    
29  #include <vob/Debug.hxx>  #include <vob/Debug.hxx>
30  #include <vob/stats/Stats.hxx>  #include <vob/stats/Stats.hxx>
31    
32  namespace Vob {  namespace Vob {
33  namespace Stats {  namespace Stats {
34      DBGVAR(dbg, "Stats");      DBGVAR(dbg, "Stats");
35        using boost::format;
36    
37      Statistics::Statistics() {      Statistics::Statistics() {
38          first = 0;          first = 0;
# Line 43  namespace Stats { Line 46  namespace Stats {
46      }      }
47    
48      void Statistics::triggered(Collector *c) {      void Statistics::triggered(Collector *c) {
49            DBG(dbg) << format("Triggered: %x %d %x %x\n")
50                            % c % c->onList % first % c->next;
51          if(!c->onList) {          if(!c->onList) {
52              // XXX Asserts              // XXX Asserts
53              c->next = first;              c->next = first;
# Line 52  namespace Stats { Line 57  namespace Stats {
57      }      }
58            
59      void Statistics::toBeDeleted(Collector *c) {      void Statistics::toBeDeleted(Collector *c) {
60            DBG(dbg) << format("ToBeDeleted: %x %x\n") % first % c;
61          if(c->onList) {          if(c->onList) {
62              if(first == c)              if(first == c)
63                  first = c->next;                  first = c->next;
# Line 67  namespace Stats { Line 73  namespace Stats {
73          }          }
74      }      }
75      void Statistics::clear() {      void Statistics::clear() {
76            DBG(dbg) << format("Clear: %x\n") % first;
77          for(Collector *i = first; i != 0; i = i->next) {          for(Collector *i = first; i != 0; i = i->next) {
78              i->clear();              i->clear();
79          }          }
# Line 77  namespace Stats { Line 84  namespace Stats {
84          first = 0;          first = 0;
85      }      }
86      void Statistics::call(void *u) {      void Statistics::call(void *u) {
87            DBG(dbg) << format("Call: %x\n") % first;
88          for(Collector *i = first; i != 0; i = i->next) {          for(Collector *i = first; i != 0; i = i->next) {
89                DBG(dbg) << format("Calling: %x") % i;
90              i->call(u);              i->call(u);
91          }          }
92      }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26