svcore  1.9
Selection Class Reference

A selection object simply represents a range in time, via start and end frame. More...

#include <Selection.h>

List of all members.

Public Member Functions

 Selection ()
 Selection (int startFrame, int endFrame)
 Selection (const Selection &)
Selectionoperator= (const Selection &)
virtual ~Selection ()
bool isEmpty () const
int getStartFrame () const
int getEndFrame () const
bool contains (int frame) const
bool operator< (const Selection &) const
bool operator== (const Selection &) const

Protected Attributes

int m_startFrame
int m_endFrame

Detailed Description

A selection object simply represents a range in time, via start and end frame.

The end frame is the index of the frame just *after* the end of the selection. For example a selection of length 10 frames starting at time 0 will have start frame 0 and end frame 10. This will be contiguous with (rather than overlapping with) a selection that starts at frame 10.

Any selection with equal start and end frames is empty, representing "no selection". All empty selections are equal under the comparison operators. The default constructor makes an empty selection with start and end frames equal to zero.

Definition at line 39 of file Selection.h.


Constructor & Destructor Documentation

Definition at line 19 of file Selection.cpp.

Selection::Selection ( int  startFrame,
int  endFrame 
)

Definition at line 25 of file Selection.cpp.

References m_endFrame, and m_startFrame.

Definition at line 36 of file Selection.cpp.

Selection::~Selection ( ) [virtual]

Definition at line 52 of file Selection.cpp.


Member Function Documentation

Selection & Selection::operator= ( const Selection s)

Definition at line 43 of file Selection.cpp.

References m_endFrame, and m_startFrame.

bool Selection::isEmpty ( ) const

Definition at line 57 of file Selection.cpp.

References m_endFrame, and m_startFrame.

Referenced by operator<(), and operator==().

int Selection::getStartFrame ( ) const

Definition at line 63 of file Selection.cpp.

References m_startFrame.

int Selection::getEndFrame ( ) const

Definition at line 69 of file Selection.cpp.

References m_endFrame.

bool Selection::contains ( int  frame) const

Definition at line 75 of file Selection.cpp.

References m_endFrame, and m_startFrame.

bool Selection::operator< ( const Selection s) const

Definition at line 81 of file Selection.cpp.

References isEmpty(), and m_startFrame.

bool Selection::operator== ( const Selection s) const

Definition at line 93 of file Selection.cpp.

References isEmpty(), m_endFrame, and m_startFrame.


Member Data Documentation

int Selection::m_startFrame [protected]

Definition at line 57 of file Selection.h.

Referenced by contains(), getStartFrame(), isEmpty(), operator<(), operator=(), operator==(), and Selection().

int Selection::m_endFrame [protected]

Definition at line 58 of file Selection.h.

Referenced by contains(), getEndFrame(), isEmpty(), operator=(), operator==(), and Selection().


The documentation for this class was generated from the following files: