Ceylan::LibtoolVersion Class Reference

Describes a Libtool interface version, with respects the form: (current version). More...

#include <CeylanLibtoolVersion.h>

Inheritance diagram for Ceylan::LibtoolVersion:
Inheritance graph
[legend]
Collaboration diagram for Ceylan::LibtoolVersion:
Collaboration graph
[legend]

List of all members.

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.
LibtoolVersionoperator= (const LibtoolVersion &source)
 Assignment operator made private to ensure that it will be never called.

Detailed Description

Describes a Libtool interface version, with respects the form: (current version).

(revision version).(age)

See also:
http://www.gnu.org/software/libtool/manual.html#Libtool-versioning

Definition at line 47 of file CeylanLibtoolVersion.h.


Member Typedef Documentation

Describes a version number, a part of the full version identifier.

Definition at line 76 of file CeylanVersion.h.


Member Enumeration Documentation

Defines what text output formats for TextDisplayable instances are available.

Enumerator:
rawText 
html 

Definition at line 124 of file CeylanTextDisplayable.h.


Constructor & Destructor Documentation

LibtoolVersion::LibtoolVersion ( VersionNumber  current = 0,
VersionNumber  revision = 0,
VersionNumber  age = 0 
) [explicit]

Constructs a new Libtool version identifier.

Parameters:
current the current version interface number.
revision the revision version interface number.
age the age version interface number.
Exceptions:
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.

Parameters:
versionText a string describing the version, ex: "2.15.1"
Exceptions:
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]

Basic virtual destructor.

Definition at line 61 of file CeylanLibtoolVersion.cc.

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.


Member Function Documentation

bool LibtoolVersion::canBeComparedWith ( const Version version  )  const [virtual]

Tells whether this version scheme is compatible with the one of the supplied version instance.

Returns:
true iff comparing these two versions would have a meaning.
Note:
This method is public so that the operators can use it.

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.

Exceptions:
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]
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.

Parameters:
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.
Returns:
true iff the program can be safely linked with this library version.
Exceptions:
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.

Note:
Consistency of the Libtool version is not checked.

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.

Note:
Consistency of the Libtool version is not checked.

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.

Parameters:
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.

Note:
Consistency of the Libtool version is not checked.

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.

Parameters:
displayables a list of pointers to TextDisplayable instances/
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
toString, Ceylan::VerbosityLevels

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.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
TextDisplayable

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().


Member Data Documentation

VersionNumber Ceylan::Version::_major [protected, inherited]
VersionNumber Ceylan::Version::_minor [protected, inherited]
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited]

The text format to be used currently by TextDisplayable instances.

Note:
Defaults to raw text.

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().


The documentation for this class was generated from the following files:
Generated on Mon Nov 29 13:40:22 2010 for Ceylan by  doxygen 1.6.3