Class RangeSpec

Class Documentation

class RangeSpec

The RangeSpec class provides a common description of a positive, integral range of numbers.

Public Functions

RangeSpec()
RangeSpec(size_t frame)

See also

RangeSpecParser

RangeSpec(size_t start, bool startOpen, size_t end, bool endOpen)

See also

RangeSpecParser

RangeSpec(size_t start, bool startOpen, size_t end, bool endOpen, size_t step)

See also

RangeSpecParser

~RangeSpec()
bool Matches(size_t frame) const

Determine if frame matches the range specification described by this object.

Parameters

frame -- Integer frame number to test.

Returns

True if frame matches the range specification described by this object, false otherwise.

size_t Start() const

Retrieve the range start value or the single-frame value from the spec.

size_t End() const

Retrieve the range end value from the spec; if spec describes a single frame, then the value returned by End() is undefined.

size_t Step() const

Retrieve the step value for the range, or for single-frame specifications, starting with the single frame described. If not present in the spec, then the step value is 1

bool StartOpen() const

If a range is specified, describes whether the "left" side is open (does not include the Start() value) or closed (includes the Start() value). Default is "closed" range (includes the start value). Undefined for single-frame specifications.

bool EndOpen() const

If a range is specified, describes whether the "right" side is open (does not include the End() value) or closed (includes the End() value). Default is "closed" range (includes the end value). Undefined for single-frame specifications.

Public Static Attributes

static size_t const NOT_SET