casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
version.h
Go to the documentation of this file.
1 //# version.h: Version information for AIPS++
2 //# Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2016
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef CASA_VERSION_H
30 #define CASA_VERSION_H
31 
32 //# Includes
33 #include <iostream>
34 #include <vector>
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38 class VersionInfo {
39  public:
40 
41  static int major( ); // major version number: e.g. 4
42  static int minor( ); // minor version number: e.g. 7
43  static int patch( ); // patch number: e.g. 1
44  static int feature( ); // feature increment: e.g. 298
45  static std::string desc( ); // description: e.g. " ID cc37ed0c4a"
46  static std::string info( ); // combined string: e.g. "5.0.0-565 ID cc37ed0c4a"
47  static std::string str( ); // combined string: e.g. "5.0.0-565"
48  static std::string variant( ); // "Instrument" variant: e.g. "ALMA"
49 
50  // compare the version included in 'vec' against the current version.
51  // 'comparitor' is one of: ">", "<", ">=", "<=", "=", "!="
52  static bool compare(const std::string& comparitor, const std::vector<int>& vec);
53 
54  // Summarize the above into an ostream. Note that an
55  // <src>ostringstream</src> can be converted to a
56  // <linkto class="String">String</linkto> via a constructor.
57  // This information is NOT prepended with "AIPS++ version:" or anything
58  // like that. You may wish to add this yourself. The date is also not
59  // included.
60  static void report(std::ostream &os) { os << info( ); }
61 
62 };
63 
64 } //# NAMESPACE CASA - END
65 
66 #endif
static std::string str()
static void report(std::ostream &os)
Summarize the above into an ostream.
Definition: version.h:60
static std::string variant()
static bool compare(const std::string &comparitor, const std::vector< int > &vec)
compare the version included in &#39;vec&#39; against the current version.
static int major()
static int feature()
static int minor()
static std::string info()
static std::string desc()
static int patch()