Class RangeSpecParser

Class Documentation

class RangeSpecParser

The RangeSpecParser class provides a convenient means to parse range specifications described in string data.

Public Functions

RangeSpecParser(TCHAR const *string)

RangeSpecParser constructor.

Frame numbers begin at 1. All values must be positive. Interval capture can be specified using standard 'range' notation, where ( and ) indicate 'open' range endpoints, and [ and ] indicate 'closed' range endpoints. Ranges may include an optional step value, appended to the end of the range, for example: (10..100]:10, to indicate every tenth frame in the range 10 to 100 (not including 10). The default step value is 1. Individual frames are specified as integers separated by semicolons, for example: 1;10;100. Individual frames and range specifications can be mixed in any order, for example: 1;(50..70]:5;10;100.

Parameters

string -- String containing range specification(s) to parse.

~RangeSpecParser()
bool ParseNextRange(RangeSpec *destSpec)

Parse the next range (if any) into destSpec.

Parameters

destSpec -- Pointer to valid RangeSpec instance. If this pointer is null or otherwise invalid, behavior is undefined.

Returns

True if (a) next range exists, and (b) could be parsed; false otherwise.