Public Member Functions | Static Public Member Functions | Private Attributes

ctkVersionRange Class Reference

#include <Libs/PluginFramework/ctkVersionRange_p.h>

Collaboration diagram for ctkVersionRange:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int compare (const ctkVersionRange &obj) const
 ctkVersionRange ()
 ctkVersionRange (const QString &vr)
bool isSpecified () const
bool operator== (const ctkVersionRange &r) const
QString toString () const
bool withinRange (const ctkVersionRange &range) const
bool withinRange (const ctkVersion &ver) const
 ~ctkVersionRange ()

Static Public Member Functions

static const ctkVersionRangedefaultVersionRange ()

Private Attributes

ctkVersionhigh
bool highIncluded
ctkVersionlow
bool lowIncluded

Detailed Description

Class representing CTK version ranges.

Definition at line 31 of file ctkVersionRange_p.h.


Constructor & Destructor Documentation

ctkVersionRange::ctkVersionRange ( const QString &  vr  ) 

Construct a ctkVersionRange object. Format for a range: ( "(" | "[" ) LOW_VERSION "," HIGH_VERSION ( ")" | "]" ) Format for at least a version: VERSION

Parameters:
vr Input string.

Definition at line 34 of file ctkVersionRange.cpp.

ctkVersionRange::ctkVersionRange (  ) 

Construct the default ctkVersionRange object.

Definition at line 65 of file ctkVersionRange.cpp.

ctkVersionRange::~ctkVersionRange (  ) 

Definition at line 73 of file ctkVersionRange.cpp.


Member Function Documentation

int ctkVersionRange::compare ( const ctkVersionRange obj  )  const

Compare object to another ctkVersionRange. VersionRanges are compared on the lower bound.

Parameters:
obj ctkVersionRange to compare to.
Returns:
Return 0 if equals, negative if this object is less than obj and positive if this object is larger then obj.
Exceptions:
ClassCastException if object is not a ctkVersionRange object.

Definition at line 123 of file ctkVersionRange.cpp.

const ctkVersionRange & ctkVersionRange::defaultVersionRange (  )  [static]

The empty version range "[0.0.0,inf)".

Definition at line 27 of file ctkVersionRange.cpp.

bool ctkVersionRange::isSpecified (  )  const

Definition at line 79 of file ctkVersionRange.cpp.

bool ctkVersionRange::operator== ( const ctkVersionRange r  )  const

Check if object is equal to this object.

Parameters:
obj Package entry to compare to.
Returns:
true if equal, otherwise false.

Definition at line 158 of file ctkVersionRange.cpp.

QString ctkVersionRange::toString (  )  const

String with version number. If version is not specified return an empty string.

Returns:
QString.

Definition at line 128 of file ctkVersionRange.cpp.

bool ctkVersionRange::withinRange ( const ctkVersion ver  )  const

Check if specified version is within our range.

Parameters:
ver ctkVersion to compare to.
Returns:
Return true if within range, otherwise false.

Definition at line 84 of file ctkVersionRange.cpp.

bool ctkVersionRange::withinRange ( const ctkVersionRange range  )  const

Check if objects range is within another ctkVersionRange.

Parameters:
range ctkVersionRange to compare to.
Returns:
Return true if within range, otherwise false.

Definition at line 104 of file ctkVersionRange.cpp.


Member Data Documentation

Definition at line 37 of file ctkVersionRange_p.h.

Definition at line 39 of file ctkVersionRange_p.h.

Definition at line 36 of file ctkVersionRange_p.h.

Definition at line 38 of file ctkVersionRange_p.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines