#include <CeylanLibtoolVersion.h>
Public Types | |
typedef Ceylan::Uint8 | VersionNumber |
Describes a version number, a part of the full version identifier. | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
LibtoolVersion (VersionNumber current=0, VersionNumber revision=0, VersionNumber age=0) | |
Constructs a new Libtool version identifier. | |
LibtoolVersion (const std::string &versionText) | |
Constructs a new Libtool version identifier from a string of the form 'x.y.z' where x, y and z are textual representations of positive or null integers. | |
virtual | ~LibtoolVersion () throw () |
Basic virtual destructor. | |
virtual VersionNumber | getCurrentInterfaceNumber () const |
Returns the current interface version of this version identifier. | |
virtual void | setCurrentInterfaceNumber (VersionNumber newCurrent) |
Sets the current interface version of this version identifier. | |
virtual VersionNumber | getRevisionInterfaceNumber () const |
Returns the revision number of this version identifier. | |
virtual void | setRevisionInterfaceNumber (VersionNumber newRevision) |
Sets the revision interface number of this version identifier. | |
virtual VersionNumber | getInterfaceAge () const |
Returns the interface age of this version identifier. | |
virtual void | setInterfaceAge (VersionNumber newAge) |
Sets the release number (or patch number) of this version identifier. | |
virtual bool | isCompatibleWith (const Version &expectedVersion) const |
Tells whether this version, taken as an actual library version, is compatible according to Libtool rules with the specified one, taken as a requested version. | |
virtual bool | canBeComparedWith (const Version &version) const |
Tells whether this version scheme is compatible with the one of the supplied version instance. | |
virtual const std::string | toString (VerbosityLevels level=high) const |
Returns a user-friendly description of the state of this object. | |
virtual VersionNumber | getMajorNumber () const |
Returns the major number of this version identifier. | |
virtual void | setMajorNumber (VersionNumber newNumber) |
Sets the major number of this version identifier. | |
virtual VersionNumber | getMinorNumber () const |
Returns the minor number of this version identifier. | |
virtual void | setMinorNumber (VersionNumber newNumber) |
Sets the minor number of this version identifier. | |
virtual VersionNumber | getReleaseNumber () const |
Returns the release number (or patch number) of this version identifier. | |
virtual void | setReleaseNumber (VersionNumber newNumber) |
Sets the release number (or patch number) of this version identifier. | |
Static Public Member Functions | |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Protected Member Functions | |
virtual bool | isUsualVersionSchemeCompliant () const |
Tells that a LibtoolVersion, for compatibility matters, should not be mixed with basic versions, since their meaning differ. | |
virtual void | checkConsistency () const |
Raises an exception iff the Libtool version is not consistent. | |
Protected Attributes | |
VersionNumber | _major |
The major version number, i.e. the first version coordinate. | |
VersionNumber | _minor |
The minor version number, i.e. the second version coordinate. | |
VersionNumber | _release |
The release version number (or patch number), i.e. | |
Static Protected Attributes | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Member Functions | |
LibtoolVersion (const LibtoolVersion &source) | |
Copy constructor made private to ensure that it will be never called. | |
LibtoolVersion & | operator= (const LibtoolVersion &source) |
Assignment operator made private to ensure that it will be never called. |
(revision version).(age)
Definition at line 47 of file CeylanLibtoolVersion.h.
typedef Ceylan::Uint8 Ceylan::Version::VersionNumber [inherited] |
Describes a version number, a part of the full version identifier.
Definition at line 76 of file CeylanVersion.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
LibtoolVersion::LibtoolVersion | ( | VersionNumber | current = 0 , |
|
VersionNumber | revision = 0 , |
|||
VersionNumber | age = 0 | |||
) | [explicit] |
Constructs a new Libtool version identifier.
current | the current version interface number. | |
revision | the revision version interface number. | |
age | the age version interface number. |
VersionException | if this cannot be a valid Libtool version. |
Definition at line 40 of file CeylanLibtoolVersion.cc.
References checkConsistency().
LibtoolVersion::LibtoolVersion | ( | const std::string & | versionText | ) | [explicit] |
Constructs a new Libtool version identifier from a string of the form 'x.y.z' where x, y and z are textual representations of positive or null integers.
versionText | a string describing the version, ex: "2.15.1" |
VersionException | if the string could not be transformed into a valid Libtool version. |
Definition at line 51 of file CeylanLibtoolVersion.cc.
References checkConsistency().
LibtoolVersion::~LibtoolVersion | ( | ) | throw () [virtual] |
Ceylan::LibtoolVersion::LibtoolVersion | ( | const LibtoolVersion & | source | ) | [private] |
Copy constructor made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
bool LibtoolVersion::canBeComparedWith | ( | const Version & | version | ) | const [virtual] |
Tells whether this version scheme is compatible with the one of the supplied version instance.
Reimplemented from Ceylan::Version.
Definition at line 197 of file CeylanLibtoolVersion.cc.
Referenced by isCompatibleWith().
void LibtoolVersion::checkConsistency | ( | ) | const [protected, virtual] |
Raises an exception iff the Libtool version is not consistent.
VersionException | if Libtool version is not consistent. |
Definition at line 208 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_major, Ceylan::Version::_release, and Ceylan::toString().
Referenced by LibtoolVersion().
Version::VersionNumber LibtoolVersion::getCurrentInterfaceNumber | ( | ) | const [virtual] |
Returns the current interface version of this version identifier.
Definition at line 68 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_major.
Referenced by isCompatibleWith().
Version::VersionNumber LibtoolVersion::getInterfaceAge | ( | ) | const [virtual] |
Returns the interface age of this version identifier.
Definition at line 104 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_release.
Referenced by isCompatibleWith().
Version::VersionNumber Version::getMajorNumber | ( | ) | const [virtual, inherited] |
Returns the major number of this version identifier.
Definition at line 131 of file CeylanVersion.cc.
References Ceylan::Version::_major.
Referenced by operator<(), operator==(), and Ceylan::Module::setVersion().
Version::VersionNumber Version::getMinorNumber | ( | ) | const [virtual, inherited] |
Returns the minor number of this version identifier.
Definition at line 145 of file CeylanVersion.cc.
References Ceylan::Version::_minor.
Referenced by operator<(), operator==(), and Ceylan::Module::setVersion().
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
Version::VersionNumber Version::getReleaseNumber | ( | ) | const [virtual, inherited] |
Returns the release number (or patch number) of this version identifier.
Definition at line 159 of file CeylanVersion.cc.
References Ceylan::Version::_release.
Referenced by operator<(), operator==(), and Ceylan::Module::setVersion().
Version::VersionNumber LibtoolVersion::getRevisionInterfaceNumber | ( | ) | const [virtual] |
Returns the revision number of this version identifier.
Definition at line 86 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_minor.
bool LibtoolVersion::isCompatibleWith | ( | const Version & | expectedVersion | ) | const [virtual] |
Tells whether this version, taken as an actual library version, is compatible according to Libtool rules with the specified one, taken as a requested version.
The interface age is used to know whether API compatibility is claimed or not.
Basically, this version is supposed to correspond with the one of a library, the parameter version being the one the user program was written with. This method tells whether the user program can work with this corresponding library.
expectedVersion,according | to Libtool rules the Libtool-style library version expected by the user program. This must be a LibtoolVersion instance indeed, otherwise an exception is raised. |
VersionException | if the comparison of the two versions cannot be done, for example in the case where they belong to incompatible version schemes: this would be a meaningless operation. |
Reimplemented from Ceylan::Version.
Definition at line 122 of file CeylanLibtoolVersion.cc.
References canBeComparedWith(), generalUtils::false, getCurrentInterfaceNumber(), getInterfaceAge(), Ceylan::high, Ceylan::Version::toString(), toString(), and generalUtils::true.
bool LibtoolVersion::isUsualVersionSchemeCompliant | ( | ) | const [protected, virtual] |
Tells that a LibtoolVersion, for compatibility matters, should not be mixed with basic versions, since their meaning differ.
Reimplemented from Ceylan::Version.
Definition at line 188 of file CeylanLibtoolVersion.cc.
References generalUtils::false.
LibtoolVersion& Ceylan::LibtoolVersion::operator= | ( | const LibtoolVersion & | source | ) | [private] |
Assignment operator made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void LibtoolVersion::setCurrentInterfaceNumber | ( | VersionNumber | newCurrent | ) | [virtual] |
Sets the current interface version of this version identifier.
Definition at line 77 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_major.
void LibtoolVersion::setInterfaceAge | ( | VersionNumber | newAge | ) | [virtual] |
Sets the release number (or patch number) of this version identifier.
Definition at line 113 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_release.
void Version::setMajorNumber | ( | VersionNumber | newNumber | ) | [virtual, inherited] |
Sets the major number of this version identifier.
Definition at line 138 of file CeylanVersion.cc.
References Ceylan::Version::_major.
Referenced by Ceylan::Module::setVersion().
void Version::setMinorNumber | ( | VersionNumber | newNumber | ) | [virtual, inherited] |
Sets the minor number of this version identifier.
Definition at line 152 of file CeylanVersion.cc.
References Ceylan::Version::_minor.
Referenced by Ceylan::Module::setVersion().
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
void Version::setReleaseNumber | ( | VersionNumber | newNumber | ) | [virtual, inherited] |
Sets the release number (or patch number) of this version identifier.
Definition at line 166 of file CeylanVersion.cc.
References Ceylan::Version::_release.
Referenced by Ceylan::Module::setVersion().
void LibtoolVersion::setRevisionInterfaceNumber | ( | VersionNumber | newRevision | ) | [virtual] |
Sets the revision interface number of this version identifier.
Definition at line 95 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_minor.
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const string LibtoolVersion::toString | ( | VerbosityLevels | level = high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from Ceylan::Version.
Definition at line 167 of file CeylanLibtoolVersion.cc.
References Ceylan::Version::_major, Ceylan::Version::_minor, Ceylan::Version::_release, Ceylan::low, Ceylan::medium, and Ceylan::toNumericalString().
Referenced by isCompatibleWith().
VersionNumber Ceylan::Version::_major [protected, inherited] |
The major version number, i.e. the first version coordinate.
Definition at line 219 of file CeylanVersion.h.
Referenced by checkConsistency(), getCurrentInterfaceNumber(), Ceylan::Version::getMajorNumber(), setCurrentInterfaceNumber(), Ceylan::Version::setMajorNumber(), Ceylan::Version::toString(), toString(), and Ceylan::Version::Version().
VersionNumber Ceylan::Version::_minor [protected, inherited] |
The minor version number, i.e. the second version coordinate.
Definition at line 223 of file CeylanVersion.h.
Referenced by Ceylan::Version::getMinorNumber(), getRevisionInterfaceNumber(), Ceylan::Version::setMinorNumber(), setRevisionInterfaceNumber(), Ceylan::Version::toString(), toString(), and Ceylan::Version::Version().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().
VersionNumber Ceylan::Version::_release [protected, inherited] |
The release version number (or patch number), i.e.
the third version coordinate.
Definition at line 231 of file CeylanVersion.h.
Referenced by checkConsistency(), getInterfaceAge(), Ceylan::Version::getReleaseNumber(), setInterfaceAge(), Ceylan::Version::setReleaseNumber(), Ceylan::Version::toString(), toString(), and Ceylan::Version::Version().