GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Version.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef ADF_Version
24 #define ADF_Version
25 #define ADF_VERSION_H ADF_Version
26 
27 #ifndef ADF_ADFConfig
28 #include "ADFConfig.h"
29 #endif
30 
31 namespace ADF
32 {
33 
35 
38 class Version
39 {
40 private:
41  UShort_t fMajor; // major number of the revision
42  UShort_t fMinor; // minor number of the revision
43 
44 public:
45  Version();
46  Version(UShort_t,UShort_t);
47  ~Version();
48 
49  std::string GetString() const;
50 
52  Version(const Version &);
53 
55  Bool_t operator==(const Version &) const;
56 
57  void SetMajor(UShort_t maj) { fMajor = maj; }
58  void SetMinor(UShort_t min) { fMinor = min; }
59 
60  UShort_t GetMajor() const { return fMajor; }
61  UShort_t GetMinor() const { return fMinor; }
62 
64 
70  void operator () (UShort_t maj, UShort_t min)
71  { fMajor = maj; fMinor = min; }
72 };
73 
74 } // namespace ADF
75 #endif
76 
77 
78 
79 
80 
Base class for version numbers.
Definition: Version.h:38
void SetMajor(UShort_t maj)
Definition: Version.h:57
std::string GetString() const
Definition: Version.cpp:44
to set informations about the ADF configuration
UShort_t GetMinor() const
Definition: Version.h:61
void SetMinor(UShort_t min)
Definition: Version.h:58
Bool_t operator==(const Version &) const
to compare two bersions, must have the same minor and major
Definition: Version.cpp:39
void operator()(UShort_t maj, UShort_t min)
to change both values
Definition: Version.h:70
UShort_t GetMajor() const
Definition: Version.h:60