Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
VersionInfo.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* VersionInfo.h (C) 2000-2018 */
9/* */
10/* Information about an object's version. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_VERSIONINFO_H
13#define ARCANE_UTILS_VERSIONINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19#include <iosfwd>
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
46class ARCANE_UTILS_EXPORT VersionInfo
47{
48 public:
49
52
54 VersionInfo(int vmajor, int vminor, int vpatch);
55
60 VersionInfo(const Arccore::String& version_str);
61
62 public:
63
65 int versionMajor() const { return m_major; }
66
68 int versionMinor() const { return m_minor; }
69
71 int versionPatch() const { return m_patch; }
72
74 String versionAsString() const;
75
76 public:
77
78 // Prints the version numbers to the stream o
79 void write(std::ostream& o) const;
80
81 private:
82
83 int m_major;
84 int m_minor;
85 int m_patch;
86};
87
88/*---------------------------------------------------------------------------*/
89/*---------------------------------------------------------------------------*/
90
91extern "C++" ARCANE_UTILS_EXPORT std::ostream&
92operator<<(std::ostream& o, const VersionInfo& vi);
93
94/*---------------------------------------------------------------------------*/
95/*---------------------------------------------------------------------------*/
96
97} // namespace Arcane
98
99/*---------------------------------------------------------------------------*/
100/*---------------------------------------------------------------------------*/
101
102#endif
Arcane configuration file.
Information about a version.
Definition VersionInfo.h:47
int versionMajor() const
Returns the major version number.
Definition VersionInfo.h:65
VersionInfo()
Constructs a null version.
int m_major
Major version number.
Definition VersionInfo.h:83
int m_patch
Patch version number.
Definition VersionInfo.h:85
int versionMinor() const
Returns the minor version number.
Definition VersionInfo.h:68
int versionPatch() const
Returns the patch version number.
Definition VersionInfo.h:71
int m_minor
Minor version number.
Definition VersionInfo.h:84
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --