A Discrete-Event Network Simulator
API
version.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2018 Lawrence Livermore National Laboratory
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 version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Authors: Mathew Bielejeski <bielejeski1@llnl.gov>
19 */
20
21#ifndef BUILD_VERSION_H_
22#define BUILD_VERSION_H_
23
24#include "ns3/int64x64.h"
25#include <string>
26
33namespace ns3 {
34
100{
101public:
113 static std::string VersionTag (void);
114
124 static std::string ClosestAncestorTag (void);
125
136 static uint32_t Major (void);
137
148 static uint32_t Minor (void);
149
161 static uint32_t Patch (void);
162
174 static std::string ReleaseCandidate (void);
175
182 static uint32_t TagDistance (void);
183
189 static bool DirtyWorkingTree (void);
190
205 static std::string CommitHash (void);
206
214 static std::string BuildProfile (void);
215
233 static std::string ShortVersion (void);
234
251 static std::string BuildSummary (void);
252
269 static std::string LongVersion (void);
270
271}; // class Version
272
273} // namespace ns3
274
275#endif
Helper class providing functions to access various parts of the version string, as well as functions ...
Definition: version.h:100
static std::string CommitHash(void)
Hash of the most recent commit.
Definition: version.cc:82
static std::string LongVersion(void)
Constructs a string containing all of the build details.
Definition: version.cc:132
static bool DirtyWorkingTree(void)
Indicates whether there were uncommitted changes during the build.
Definition: version.cc:76
static std::string VersionTag(void)
Returns the ns-3 version tag of the closest ancestor commit.
Definition: version.cc:34
static std::string ReleaseCandidate(void)
Release candidate component of the build version.
Definition: version.cc:64
static uint32_t Minor(void)
Minor component of the build version.
Definition: version.cc:52
static uint32_t Patch(void)
Patch component of the build version.
Definition: version.cc:58
static std::string ClosestAncestorTag(void)
Returns the closest tag that is attached to a commit that is an ancestor of the current branch head.
Definition: version.cc:40
static std::string BuildProfile(void)
Indicates the type of build that was performed (debug/release/optimized).
Definition: version.cc:88
static std::string ShortVersion(void)
Constructs a string containing the ns-3 major and minor version components, and indication of additio...
Definition: version.cc:94
static uint32_t TagDistance(void)
The number of commits between the current commit and the tag returned by ClosestAncestorTag().
Definition: version.cc:70
static std::string BuildSummary(void)
Constructs a string containing the most recent tag and status flags.
Definition: version.cc:114
static uint32_t Major(void)
Major component of the build version.
Definition: version.cc:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.