00001 // -*- C++ -*- 00002 // 00003 // Level.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef ThePEG_Level_H 00010 #define ThePEG_Level_H 00011 // This is the declaration of the Level class. 00012 00013 #include "ThePEG/Config/ThePEG.h" 00014 00015 namespace ThePEG { 00016 00026 template <typename T = int> 00027 class Level { 00028 00029 public: 00030 00033 Level(T & newLevel) : theLevel(++newLevel) {} 00034 00036 ~Level() { --theLevel; } 00037 00038 private: 00039 00042 T & theLevel; 00043 00047 Level(); 00048 00052 Level(const Level &); 00053 00057 Level & operator=(const Level &); 00058 00059 }; 00060 00061 } 00062 00063 #endif /* ThePEG_Level_H */