Main Page | Class List | Directories | File List | Class Members

range Class Reference

defines criteria for restriction of frames returned by get_next_dyn() More...

#include <tool.hh>

List of all members.

Public Member Functions

 range (const char[]="", const range_type=NONE)
 constructor for the range class

Friends

dyn * get_next_dyn (const range &)
 given a range object, returns the next frame


Detailed Description

The range class contains all the necessary information such that get_next_dyn() will return the next frame as specified by its range argument. This class currently implements two kinds of ranges, based on frame number and time. Only one type of selection criterion, however, can be active at one time. See the description of the constructor below for further details.


Constructor & Destructor Documentation

range::range const   char[] = "",
const   range_type = NONE
 

A range object is initialized from a string and range type that describes how to interpret the string, which, in turn, must be in a format compatible with that type. Only one type, or criterion, can be in effect at one time. Currently, the defined range types are:

  • NONE Unrestricted range, i.e., all frames in the input are accepted.
  • FRAME The argument is interpreted as a range of frames, where the first frame is 1 (not 0). This means that the string contains positive integers and conforms to one of the following, Standard C scanf() formats:
    • X-Y,Z ("%u-%u,%u") - frame X to frame Y skipping every Z frames
    • X-Y ("%u-%u") - frame X to frame Y
    • ,Z (",%u") - all frames skipping every Z frames
    • X ("%u") - frame X
  • TIME The argument is interpreted as a range of times. In other words, only frames from the specified time interval, as determined by Starlab's dyn::get_system_time(), are returned. The string must be in one of the following formats:
    • X-Y,Z ("%g-%g,%g") - frames in the time interval [X,Y] at least Z time units apart
    • X-Y ("%g-%g") - frames in the time interval [X,Y]
    • ,Z (",%g") - all frames at least Z time units apart
    • X ("%g") - frame at time X


The documentation for this class was generated from the following files:
Generated on Mon Jul 18 15:04:06 2005 for StarCluster by  doxygen 1.4.3