COPASI API
4.40.278
|
#include <CVersion.h>
Public Member Functions | |
CVersion () | |
const std::string & | getVersion () const |
C_INT32 | getVersionDevel () const |
C_INT32 | getVersionMajor () const |
C_INT32 | getVersionMinor () const |
bool | isCompatible (const CVersion &version) const |
const bool & | isSourceModified () const |
bool | mayBeUpdated () const |
bool | operator!= (const CVersion &other) const |
bool | operator< (const CVersion &other) const |
bool | operator<= (const CVersion &other) const |
bool | operator== (const CVersion &other) const |
bool | operator> (const CVersion &other) const |
bool | operator>= (const CVersion &other) const |
void | setVersion (const C_INT32 &major, const C_INT32 &minor, const C_INT32 &devel, const bool &sourcesModified, const std::string &comment="", const std::string &creator="") |
const CVersion & | setVersion (const std::string &version) |
~CVersion () | |
Static Public Attributes | |
static const CVersion | VERSION |
Private Member Functions | |
CVersion (C_INT32 major, C_INT32 minor, C_INT32 build, const bool &sourcesModified, const std::string &comment, const std::string &creator) | |
void | setString () |
Private Attributes | |
C_INT32 | mBuild |
std::string | mComment |
std::set< C_INT32 > | mCompatible |
std::string | mCreator |
C_INT32 | mMajor |
C_INT32 | mMinor |
bool | mSourcesModified |
std::string | mVersion |
(C) Pedro Mendes 2001
|
private |
Constructor with four arguments.
References C_INT32, COPASI_VERSION_COMPATIBILITY, mBuild, mCompatible, and setString().
CVersion::CVersion | ( | ) |
Default constructor. This creates a version object without any version info.
References setString().
CVersion::~CVersion | ( | ) |
Destructor.
const std::string & CVersion::getVersion | ( | ) | const |
Returns a string with the full version number.
References mVersion.
Referenced by CCopasiXML::load(), CConfigurationFile::CXML::save(), CCopasiXML::save(), CCopasiXML::saveModelParameterSets(), CCheckForUpdates::setConfirmedCheckForUpdate(), and CCheckForUpdates::setSkipVersion().
C_INT32 CVersion::getVersionDevel | ( | ) | const |
Returns the development version number.
References mBuild.
Referenced by CCopasiXML::load(), operator<(), operator==(), operator>(), and EventHandler::processStart().
C_INT32 CVersion::getVersionMajor | ( | ) | const |
Returns the major version number.
References mMajor.
Referenced by operator<(), operator==(), and operator>().
C_INT32 CVersion::getVersionMinor | ( | ) | const |
Returns the minor version number.
References mMinor.
Referenced by operator<(), operator==(), and operator>().
bool CVersion::isCompatible | ( | const CVersion & | version | ) | const |
Compare Versions
const | CVersion & version |
References mBuild, mCompatible, mMajor, and mMinor.
const bool & CVersion::isSourceModified | ( | ) | const |
Retrieve the whether the source code is modified compared to the official build
References mSourcesModified.
bool CVersion::mayBeUpdated | ( | ) | const |
References mComment.
bool CVersion::operator!= | ( | const CVersion & | other | ) | const |
bool CVersion::operator< | ( | const CVersion & | other | ) | const |
References getVersionDevel(), getVersionMajor(), getVersionMinor(), mBuild, mMajor, and mMinor.
bool CVersion::operator<= | ( | const CVersion & | other | ) | const |
bool CVersion::operator== | ( | const CVersion & | other | ) | const |
References getVersionDevel(), getVersionMajor(), getVersionMinor(), mBuild, mMajor, and mMinor.
bool CVersion::operator> | ( | const CVersion & | other | ) | const |
References getVersionDevel(), getVersionMajor(), getVersionMinor(), mBuild, mMajor, and mMinor.
bool CVersion::operator>= | ( | const CVersion & | other | ) | const |
|
private |
Creates the version string.
References mBuild, mComment, mMajor, mMinor, mSourcesModified, mVersion, and StringPrint().
Referenced by CVersion(), and setVersion().
void CVersion::setVersion | ( | const C_INT32 & | major, |
const C_INT32 & | minor, | ||
const C_INT32 & | devel, | ||
const bool & | sourcesModified, | ||
const std::string & | comment = "" , |
||
const std::string & | creator = "" |
||
) |
Sets a version number
const | C_INT32 & major |
const | C_INT32 & minor |
const | C_INT32 & build |
const | bool & sourcesModified |
const | std::string & comment |
const | std::string & creator |
References mBuild, mComment, mCreator, mMajor, mMinor, mSourcesModified, and setString().
Referenced by COPASIHandler::processStart().
const CVersion & CVersion::setVersion | ( | const std::string & | version | ) |
Set a version number
const | std::string & version |
References CVectorCore< CType >::array(), mBuild, mComment, mMajor, mMinor, mSourcesModified, setString(), and strToInt().
|
private |
The monotonously increasing build number
Referenced by CVersion(), getVersionDevel(), isCompatible(), operator<(), operator==(), operator>(), setString(), and setVersion().
|
private |
Comment appended to the version string
Referenced by mayBeUpdated(), setString(), and setVersion().
|
private |
The list of compatible builds
Referenced by CVersion(), and isCompatible().
|
private |
Creator who compiled this version for official unmodified sources it is copasi.org
Referenced by setVersion().
|
private |
Major version number. (4 for first COPASI release)
Referenced by getVersionMajor(), isCompatible(), operator<(), operator==(), operator>(), setString(), and setVersion().
|
private |
Minor version number. (changes with releases that are mostly bug fixes)
Referenced by getVersionMinor(), isCompatible(), operator<(), operator==(), operator>(), setString(), and setVersion().
|
private |
Boolean value indicating whether mBuild is describing the current state of the sources.
Referenced by isSourceModified(), setString(), and setVersion().
|
private |
Version string.
Referenced by getVersion(), and setString().
|
static |
(C) Pedro Mendes 2001
Referenced by CCheckForUpdates::checkRequired(), CSBMLExporter::exportModelToString(), Copasi2SBMLTranslator::getVersion(), CCopasiXML::load(), CCheckForUpdates::needToConfirmCheckForUpdate(), CConfigurationFile::CXML::save(), CCopasiXML::save(), CCopasiXML::saveModelParameterSets(), CCheckForUpdates::setConfirmedCheckForUpdate(), CInfo::update(), CModelVersionHierarchy::updateVersionXML(), CSEDMLExporter::writeSedMLToFile(), and CSEDMLExporter::writeSedMLToString().