User Manual, Developers Guide and API Documentation

wns::module::DepListElem Class Reference

Class for dependency list elements. More...

#include <module/DependencyList.hpp>

Collaboration diagram for wns::module::DepListElem:

Collaboration graph
[legend]

List of all members.

Public Types

enum  depModeType { LessThan, EqualTo, GreaterThan }
 Dependency relation type. More...

Public Member Functions

bool dependencyMetBy (const Version ver) const
 Check, if a given version meets the dependency.
 DepListElem (const std::string s) throw (DepListElemInvalidInitString)
 String constructor.
 DepListElem (const depModeType mode, const Version dep)
 Component constructor.
Version getDependency () const
 Get the dependency.
depModeType getDepMode () const
 Get the dependency mode.
std::string getNiceString () const
 Return dependency as a human readable string.
std::string getString () const
 Return dependency as a string.
void setDependency (const Version dependency)
 Set the dependency's version.
void setDepMode (const depModeType depMode)
 Set the dependency mode.

Private Attributes

Version dependency
 Version.
depModeType depMode
 See depModeType.


Detailed Description

Author:
Swen Kühnlein <swen@comnets.rwth-aachen.de>

Definition at line 61 of file DependencyList.hpp.


Member Enumeration Documentation

Enumerator:
LessThan 
EqualTo 
GreaterThan 

Definition at line 67 of file DependencyList.hpp.


Constructor & Destructor Documentation

DepListElem::DepListElem ( const depModeType  mode,
const Version  dep 
)

This initializes a DepListElem instance with a given dependency mode and a Version object.

Parameters:
mode LessThan, EqualTo or GreaterThan.
dep depend on this version.

Definition at line 37 of file DependencyList.cpp.

wns::module::DepListElem::DepListElem ( const std::string  s  )  throw (DepListElemInvalidInitString)

This initializes a DepListElem instance by a string, consisting of "<", "=" or ">" as first character and a (sub)string accepted by Version::Version(std::string s) starting at the second character.

Parameters:
s initialization string.


Member Function Documentation

bool DepListElem::dependencyMetBy ( const Version  ver  )  const

Parameters:
ver the version to check
Returns:
true, if ver meets the dependecy.

Definition at line 81 of file DependencyList.cpp.

Version DepListElem::getDependency (  )  const

Returns:
the version.

Definition at line 66 of file DependencyList.cpp.

DepListElem::depModeType DepListElem::getDepMode (  )  const

Returns:
the dependecy mode (LessThan, EqualTo or GreaterThan).

Definition at line 60 of file DependencyList.cpp.

string DepListElem::getNiceString (  )  const

Note:
The returned string may contain newlines!
Returns:
dependency as human readable string.

Definition at line 113 of file DependencyList.cpp.

string DepListElem::getString (  )  const

Returns:
the dependency as a string.

Definition at line 96 of file DependencyList.cpp.

void DepListElem::setDependency ( const Version  dependency  ) 

Parameters:
dependency the version.

Definition at line 76 of file DependencyList.cpp.

void DepListElem::setDepMode ( const depModeType  depMode  ) 

Parameters:
depMode the dependency mode (LessThan, EqualTo or GreaterThan).

Definition at line 71 of file DependencyList.cpp.


Member Data Documentation

Definition at line 149 of file DependencyList.hpp.

Definition at line 144 of file DependencyList.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