GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Version.cpp
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 #include "Version.h"
25 #endif
26 #include <sstream>
27 
28 using namespace ADF;
29 
30 Version::Version(): fMajor(0), fMinor(0) {;}
31 Version::Version(UShort_t maj, UShort_t min): fMajor(maj), fMinor(min) {;}
33 
35 {
36  fMajor = v.fMajor; fMinor = v.fMinor;
37 }
38 
39 Bool_t Version::operator==(const Version &v2) const
40 {
41  return ( fMajor == v2.GetMajor() && fMinor == v2.GetMinor() );
42 }
43 
44 std::string Version::GetString() const
45 {
46  std::ostringstream out; out << "[" << fMajor << "," << fMinor << "]";
47  return out.str();
48 }
49 
50 
51 
52 
53 
54 
55 
header file for Version.cpp
Base class for version numbers.
Definition: Version.h:38
std::string GetString() const
Definition: Version.cpp:44
UShort_t GetMinor() const
Definition: Version.h:61
Bool_t operator==(const Version &) const
to compare two bersions, must have the same minor and major
Definition: Version.cpp:39
UShort_t GetMajor() const
Definition: Version.h:60