Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkResourceProbe.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkResourceProbe.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-26 15:20:21 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkResourceProbe_h
00018 #define __itkResourceProbe_h
00019 
00020 #include "itkConfigure.h"
00021 #include "itkWin32Header.h"
00022 #include <string>
00023 
00024 namespace itk 
00025 {
00026  
00038 template<class ValueType, class MeanType>
00039 class ITK_EXPORT ResourceProbe
00040 {
00041 
00042 public:
00043 
00045   typedef unsigned long CountType;
00046 
00047 public:
00048 
00050   ResourceProbe(const std::string & type, const std::string & unit);
00051 
00053   virtual ~ResourceProbe();
00054 
00056   std::string GetType(void)const;
00057 
00059   std::string GetUnit(void)const;
00060 
00062   void        Start(void);
00063 
00065   void        Stop(void);
00066 
00068   CountType   GetNumberOfStarts(void) const;
00069 
00071   CountType   GetNumberOfStops(void) const;
00072 
00075   virtual ValueType   GetInstantValue(void)const = 0;
00076 
00079   ValueType    GetTotal(void)const;
00080 
00084   MeanType    GetMean(void) const;
00085 
00086 private:
00087 
00088   ValueType     m_StartValue;
00089   ValueType     m_TotalValue;
00090     
00091   CountType     m_NumberOfStarts;
00092   CountType     m_NumberOfStops;
00093 
00094   std::string   m_TypeString;
00095   std::string   m_UnitString;
00096 };
00097 
00098 } // end namespace itk
00099 
00100 #ifndef ITK_MANUAL_INSTANTIATION
00101 #include "itkResourceProbe.txx"
00102 #endif
00103 
00104 #endif //__itkResourceProbe_h
00105 

Generated at Mon Jul 12 2010 19:40:50 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000