thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
Level.h
1// -*- C++ -*-
2//
3// Level.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef ThePEG_Level_H
10#define ThePEG_Level_H
11// This is the declaration of the Level class.
12
14
15namespace ThePEG {
16
26template <typename T = int>
27class Level {
28
29public:
30
33 Level(T & newLevel) : theLevel(++newLevel) {}
34
37
38private:
39
43
48
52 Level(const Level &);
53
57 Level & operator=(const Level &) = delete;
58
59};
60
61}
62
63#endif /* ThePEG_Level_H */
This is the main config header file for ThePEG.
Level is used to increment temporarily a given integer variable.
Definition: Level.h:27
~Level()
Destructor decrementing the associated integer variable.
Definition: Level.h:36
T & theLevel
A reference to the integer variable to be decremmmented when this object is destroyed.
Definition: Level.h:42
Level(const Level &)
Copy constructor is private and not implemented.
Level(T &newLevel)
Constructor taking an integer variable which is incremented.
Definition: Level.h:33
Level()
Default constructor is private and not implemented.
Level & operator=(const Level &)=delete
Assignment is private and not implemented.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28