nomlib
Loading...
Searching...
No Matches
nom::VersionInfo Struct Reference

Container for x.x.x version schemes. More...

#include <version.hpp>

Public Member Functions

 VersionInfo ()
 Default constructor; initialize version fields to zero (0).
 ~VersionInfo ()
 Destructor.
 VersionInfo (int major, int minor, int patch)
 Construct an object with specified version fields.
int major () const
 Get the major version.
int minor () const
 Get the minor revision version.
int patch () const
 Get the patch level version.
std::string version_string () const
 Get the full version as a string.

Static Public Member Functions

static bool convert_version_string (const std::string &ver_string, VersionInfo &info)
 Convert a version string to major, minor and patch integers.

Private Attributes

int major_
int minor_
int patch_

Detailed Description

Container for x.x.x version schemes.

Definition at line 43 of file version.hpp.

Member Function Documentation

◆ convert_version_string()

bool nom::VersionInfo::convert_version_string ( const std::string & ver_string,
VersionInfo & info )
static

Convert a version string to major, minor and patch integers.

Parameters
ver_stringA version string in the format of x.x.x, where x is a number between nom::NOM_INT_MIN and nom::NOM_INT_MAX.
Returns
Boolean TRUE upon a successful conversion, or boolean FALSE upon a unsuccessful conversion, such as if the version string format is invalid.
Remarks
This implementation derives from version.cpp, part of the NCBI C++ Toolkit.

◆ major()

int nom::VersionInfo::major ( ) const

Get the major version.

Returns
An integer containing the major version.

◆ minor()

int nom::VersionInfo::minor ( ) const

Get the minor revision version.

Returns
An integer containing the minor revision version.

◆ patch()

int nom::VersionInfo::patch ( ) const

Get the patch level version.

Returns
An integer containing the patch level version.

◆ version_string()

std::string nom::VersionInfo::version_string ( ) const

Get the full version as a string.

Returns
A std::string containing the full version.

Member Data Documentation

◆ major_

int nom::VersionInfo::major_
private

Definition at line 88 of file version.hpp.

◆ minor_

int nom::VersionInfo::minor_
private

Definition at line 89 of file version.hpp.

◆ patch_

int nom::VersionInfo::patch_
private

Definition at line 90 of file version.hpp.


The documentation for this struct was generated from the following file: