22#include "ns3/version-defines.h"
38 return NS3_VERSION_TAG;
44 return NS3_VERSION_CLOSEST_TAG;
50 return NS3_VERSION_MAJOR;
56 return NS3_VERSION_MINOR;
62 return NS3_VERSION_PATCH;
68 return std::string{NS3_VERSION_RELEASE_CANDIDATE};
74 return NS3_VERSION_TAG_DISTANCE;
80 return static_cast<bool>(NS3_VERSION_DIRTY_FLAG);
86 return std::string{NS3_VERSION_COMMIT_HASH};
92 return std::string{NS3_VERSION_BUILD_PROFILE};
98 std::ostringstream ostream;
111 return ostream.str();
117 std::ostringstream ostream;
129 return ostream.str();
135 std::ostringstream ostream;
139 if (!ancestorTag.empty() && (ancestorTag !=
VersionTag()))
141 ostream <<
'+' << ancestorTag;
148 ostream <<
'+' << tagDistance;
160 return ostream.str();
static uint32_t Patch()
Patch component of the build version.
static std::string CommitHash()
Hash of the most recent commit.
static uint32_t Major()
Major component of the build version.
static uint32_t TagDistance()
The number of commits between the current commit and the tag returned by ClosestAncestorTag().
static std::string BuildProfile()
Indicates the type of build that was performed (debug/release/optimized).
static std::string ReleaseCandidate()
Release candidate component of the build version.
static uint32_t Minor()
Minor component of the build version.
static std::string BuildSummary()
Constructs a string containing the most recent tag and status flags.
static bool DirtyWorkingTree()
Indicates whether there were uncommitted changes during the build.
static std::string ShortVersion()
Constructs a string containing the ns-3 major and minor version components, and indication of additio...
static std::string LongVersion()
Constructs a string containing all of the build details.
static std::string VersionTag()
Returns the ns-3 version tag of the closest ancestor commit.
static std::string ClosestAncestorTag()
Returns the closest tag that is attached to a commit that is an ancestor of the current branch head.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
class ns3::Version definition