User Manual, Developers Guide and API Documentation

wns::module::Release Class Reference

Class to represent a TLA FQRN. More...

#include <module/Release.hpp>

Collaboration diagram for wns::module::Release:

Collaboration graph
[legend]

List of all members.

Public Member Functions

std::string getArchive () const
 Returns the archive.
std::string getBranch () const
 Returns the branch.
std::string getCategory () const
 Returns the category.
std::string getNiceString () const
 Get Release as human readable string.
std::string getRevision () const
 Returns the revision.
std::string getString () const
 Get Release as string.
std::string getVersion () const
 Returns the version.
bool operator!= (const Release b) const
 Inequality operator.
bool operator< (const Release b) const throw (CategoryMatchError, BranchMatchError)
 Less operator.
bool operator<= (const Release b) const
 Less than or equal to operator.
bool operator== (const Release b) const
 Equality operator.
bool operator> (const Release b) const
 Greater operator.
bool operator>= (const Release b) const
 Greater than or equal to operator.
 Release (const std::string archive, const std::string category, const std::string branch, const std::string version, const std::string revision)
 Component constructor.
 Release (const std::string s)
 One string constructor.
 Release ()
 Default constructor.

Private Member Functions

bool revisionLowerThan (std::string s) const
 Compare Revisions.
bool versionLowerThan (std::string s) const
 Compare Versions.

Private Attributes

std::string archive
std::string branch
std::string category
bool empty
std::string revision
std::string version


Detailed Description

Author:
Swen Kühnlein <swen@comnets.rwth-aachen.de>
Note:
Although Release contains the archive the project is from, the archive attribute is currently just for informational purposes, i.e. it is never compared but it's returned by getString().
Todo:
: add support for #.#.# version numbers be more generic (not for tla only)

Definition at line 76 of file Release.hpp.


Constructor & Destructor Documentation

wns::module::Release::Release (  )  [inline]

Creates an empty Release instance.

See also:
isEmpty()

Definition at line 85 of file Release.hpp.

wns::module::Release::Release ( const std::string  s  ) 

This constructor creates a Release instance initialized by a string containing a TLA FQRN with archive in front: archive/category--branch--version--revision where version should be "#.#" and revision "patch-#". Example: msg@comnets.rwth-aachen.de--central/sgoose--nibbler-dev--1.0--patch-111 Please note that tla tree-version gives you this string with the revision omitted.

Parameters:
s TLA archive and FQRN to initialize Release with.

wns::module::Release::Release ( const std::string  archive,
const std::string  category,
const std::string  branch,
const std::string  version,
const std::string  revision 
)

This contructor creates a Release instance initialized by five strings containing archive, category, branch, version and revision. The parameter version is expected to look like "#.#" and revision like "patch-#", where # is a number (that may contain multiple digits).

Parameters:
archive The TLA archive.
category The TLA FQRN category (project name)
branch The branch.
version The version.
revision The revision.


Member Function Documentation

std::string wns::module::Release::getArchive (  )  const [inline]

Definition at line 128 of file Release.hpp.

std::string wns::module::Release::getBranch (  )  const [inline]

Definition at line 138 of file Release.hpp.

std::string wns::module::Release::getCategory (  )  const [inline]

Definition at line 133 of file Release.hpp.

string Release::getNiceString (  )  const

Note:
The returned string may contain newlines!
Returns:
A string that is easier readable for humans than getString().

Definition at line 143 of file Release.cpp.

std::string wns::module::Release::getRevision (  )  const [inline]

Definition at line 148 of file Release.hpp.

string Release::getString (  )  const

Returns:
A string formatted like archive/category--branch--version--revision.

Definition at line 138 of file Release.cpp.

std::string wns::module::Release::getVersion (  )  const [inline]

Definition at line 143 of file Release.hpp.

bool Release::operator!= ( const Release  b  )  const

Definition at line 89 of file Release.cpp.

bool Release::operator< ( const Release  b  )  const throw (CategoryMatchError, BranchMatchError)

Note:
Throws an exception if category or branch don't match.

Definition at line 95 of file Release.cpp.

bool Release::operator<= ( const Release  b  )  const

Note:
Throws an exception if category or branch don't match.

Definition at line 125 of file Release.cpp.

bool Release::operator== ( const Release  b  )  const

Definition at line 79 of file Release.cpp.

bool Release::operator> ( const Release  b  )  const

Note:
Throws an exception if category or branch don't match.

Definition at line 119 of file Release.cpp.

bool Release::operator>= ( const Release  b  )  const

Note:
Throws an exception if category or branch don't match.

Definition at line 131 of file Release.cpp.

bool wns::module::Release::revisionLowerThan ( std::string  s  )  const [private]

bool wns::module::Release::versionLowerThan ( std::string  s  )  const [private]


Member Data Documentation

std::string wns::module::Release::archive [private]

Definition at line 194 of file Release.hpp.

std::string wns::module::Release::branch [private]

Definition at line 196 of file Release.hpp.

std::string wns::module::Release::category [private]

Definition at line 195 of file Release.hpp.

Definition at line 193 of file Release.hpp.

std::string wns::module::Release::revision [private]

Definition at line 198 of file Release.hpp.

std::string wns::module::Release::version [private]

Definition at line 197 of file Release.hpp.


The documentation for this class was generated from the following files:

Generated on Sun May 27 03:33:00 2012 for openWNS by  doxygen 1.5.5