OpenStudioCore:runmanager/lib
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | List of all members
openstudio::runmanager::ToolVersion Class Reference

#include <ToolInfo.hpp>

Public Member Functions

bool empty () const
 
boost::optional< int > getBuild () const
 
boost::optional< int > getMajor () const
 
boost::optional< int > getMinor () const
 
boost::optional< std::string > getTag () const
 
bool matches (const ToolVersion &requirements) const
 Compare the requirements to the current object For each element that "requirements" has set. More...
 
bool operator< (const ToolVersion &rhs) const
 Compare less than. More...
 
bool operator== (const ToolVersion &rhs) const
 Compare for exact equality. More...
 
 ToolVersion ()
 
 ToolVersion (int t_major)
 
 ToolVersion (int t_major, int t_minor)
 
 ToolVersion (int t_major, int t_minor, int t_build)
 
 ToolVersion (int t_major, int t_minor, int t_build, std::string t_tag)
 
 ToolVersion (boost::optional< int > t_major, boost::optional< int > t_minor, boost::optional< int > t_build, boost::optional< std::string > t_tag)
 
std::string toString () const
 Return a string representation of the version object. More...
 

Static Public Member Functions

static ToolVersion fromString (const std::string &)
 

Detailed Description

Utility for holding and comparing ToolVersion numbers.

Constructor & Destructor Documentation

openstudio::runmanager::ToolVersion::ToolVersion ( )
openstudio::runmanager::ToolVersion::ToolVersion ( int  t_major)
openstudio::runmanager::ToolVersion::ToolVersion ( int  t_major,
int  t_minor 
)
openstudio::runmanager::ToolVersion::ToolVersion ( int  t_major,
int  t_minor,
int  t_build 
)
openstudio::runmanager::ToolVersion::ToolVersion ( int  t_major,
int  t_minor,
int  t_build,
std::string  t_tag 
)
openstudio::runmanager::ToolVersion::ToolVersion ( boost::optional< int >  t_major,
boost::optional< int >  t_minor,
boost::optional< int >  t_build,
boost::optional< std::string >  t_tag 
)

Member Function Documentation

bool openstudio::runmanager::ToolVersion::empty ( ) const
Returns
true if no part of the ToolVersion info is set
static ToolVersion openstudio::runmanager::ToolVersion::fromString ( const std::string &  )
static
boost::optional<int> openstudio::runmanager::ToolVersion::getBuild ( ) const
Returns
the build version number
boost::optional<int> openstudio::runmanager::ToolVersion::getMajor ( ) const
Returns
the major version number
boost::optional<int> openstudio::runmanager::ToolVersion::getMinor ( ) const
Returns
the minor version number
boost::optional<std::string> openstudio::runmanager::ToolVersion::getTag ( ) const
Returns
the build tag (SHA/MD5/whatever) if set
bool openstudio::runmanager::ToolVersion::matches ( const ToolVersion requirements) const

Compare the requirements to the current object For each element that "requirements" has set.

If an element in requirements is not set, then any version number for that element will be accepted.

Parameters
[in]requirementsrequirements to check against
Returns
true if the object matches the requirements
bool openstudio::runmanager::ToolVersion::operator< ( const ToolVersion rhs) const

Compare less than.

Returns
true if any element is less than the corresponding element of rhs or if the LHS element (major,minor,build) is not defined
bool openstudio::runmanager::ToolVersion::operator== ( const ToolVersion rhs) const

Compare for exact equality.

Returns
true if major, minor and build all match
std::string openstudio::runmanager::ToolVersion::toString ( ) const

Return a string representation of the version object.