Poco::OSP

class VersionRange

File Information

Library: OSP
Package: Util
Header: Poco/OSP/VersionRange.h

Description

This utility class represents a range of versions.

A version range can be an open, half closed or closed interval.

Member Summary

Member Functions: includeLower, includeUpper, isEmpty, isInRange, lowerBound, operator =, swap, toString, upperBound

Constructors

VersionRange

VersionRange();

Creates an empty VersionRange.

VersionRange

explicit VersionRange(
    const Version & ver
);

Creates a VersionRange matching only a specific Version.

VersionRange

VersionRange(
    const VersionRange & range
);

Creates a VersionRange by copying another one.

VersionRange

VersionRange(
    const Version & lower,
    bool includeLower,
    const Version & upper,
    bool includeUpper
);

Creates the VersionRange.

Destructor

~VersionRange

~VersionRange();

Destroys the VersionRange.

Member Functions

includeLower inline

bool includeLower() const;

Returns true iff the lower bound lies within the interval.

includeUpper inline

bool includeUpper() const;

Returns true iff the upper bound lies within the interval.

isEmpty

bool isEmpty() const;

Returns true iff the version range is empty.

isInRange

bool isInRange(
    const Version & version
) const;

Returns true iff the version lies within the range.

lowerBound inline

const Version & lowerBound() const;

Returns the lower bound of the interval.

operator =

VersionRange & operator = (
    const VersionRange & range
);

Assigns another VersionRange.

operator =

VersionRange & operator = (
    const Version & ver
);

Assigns a single Version.

swap

void swap(
    VersionRange & range
);

Swaps the VersionRange with another one.

toString

std::string toString() const;

Returns a string representation of the version range.

upperBound inline

const Version & upperBound() const;

Returns the upper bound of the interval.

Securely control IoT edge devices from anywhere   Connect a Device