Statistic.h

Go to the documentation of this file.
00001 //===-- Statistic.h ---------------------------------------------*- C++ -*-===//
00002 //
00003 //                     The KLEE Symbolic Virtual Machine
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef KLEE_STATISTIC_H
00011 #define KLEE_STATISTIC_H
00012 
00013 #include "llvm/Support/DataTypes.h"
00014 #include <string>
00015 
00016 namespace klee {
00017   class Statistic;
00018   class StatisticManager;
00019   class StatisticRecord;
00020 
00027   class Statistic {
00028     friend class StatisticManager;
00029     friend class StatisticRecord;
00030 
00031   private:
00032     unsigned id;
00033     const std::string name;
00034     const std::string shortName;
00035 
00036   public:
00037     Statistic(const std::string &_name, 
00038               const std::string &_shortName);
00039     ~Statistic();
00040 
00042     unsigned getID() { return id; }
00043 
00045     const std::string &getName() const { return name; }
00046 
00049     const std::string &getShortName() const { return shortName; }
00050 
00052     uint64_t getValue() const;
00053 
00055     operator uint64_t () const { return getValue(); }
00056 
00058     Statistic &operator ++() { return (*this += 1); }
00059 
00061     Statistic &operator +=(const uint64_t addend);
00062   };
00063 }
00064 
00065 #endif
00066 

Generated on Fri Jun 5 03:31:31 2009 for klee by  doxygen 1.5.8