22 #include "ns3/version-defines.h"
36 return NS3_VERSION_TAG;
42 return NS3_VERSION_CLOSEST_TAG;
48 return NS3_VERSION_MAJOR;
54 return NS3_VERSION_MINOR;
60 return NS3_VERSION_PATCH;
66 return std::string{NS3_VERSION_RELEASE_CANDIDATE};
72 return NS3_VERSION_TAG_DISTANCE;
78 return static_cast<bool> (NS3_VERSION_DIRTY_FLAG);
84 return std::string{NS3_VERSION_COMMIT_HASH};
90 return std::string{NS3_VERSION_BUILD_PROFILE};
96 std::ostringstream ostream;
100 if ( ( !ancestorTag.empty () && (ancestorTag !=
VersionTag ()) )
110 return ostream.str ();
116 std::ostringstream ostream;
128 return ostream.str ();
134 std::ostringstream ostream;
138 if ( !ancestorTag.empty () && (ancestorTag !=
VersionTag ()) )
140 ostream <<
'+' << ancestorTag;
145 if ( tagDistance > 0 )
147 ostream <<
'+' << tagDistance;
159 return ostream.str ();
static std::string CommitHash(void)
Hash of the most recent commit.
static std::string LongVersion(void)
Constructs a string containing all of the build details.
static bool DirtyWorkingTree(void)
Indicates whether there were uncommitted changes during the build.
static std::string VersionTag(void)
Returns the ns-3 version tag of the closest ancestor commit.
static std::string ReleaseCandidate(void)
Release candidate component of the build version.
static uint32_t Minor(void)
Minor component of the build version.
static uint32_t Patch(void)
Patch component of the build version.
static std::string ClosestAncestorTag(void)
Returns the closest tag that is attached to a commit that is an ancestor of the current branch head.
static std::string BuildProfile(void)
Indicates the type of build that was performed (debug/release/optimized).
static std::string ShortVersion(void)
Constructs a string containing the ns-3 major and minor version components, and indication of additio...
static uint32_t TagDistance(void)
The number of commits between the current commit and the tag returned by ClosestAncestorTag().
static std::string BuildSummary(void)
Constructs a string containing the most recent tag and status flags.
static uint32_t Major(void)
Major component of the build version.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
class ns3::Version definition