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

#include <Selection.h>

Public Member Functions

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

Protected Attributes

sv_frame_t m_startFrame
 
sv_frame_t 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 40 of file Selection.h.

Constructor & Destructor Documentation

Selection::Selection ( )

Definition at line 19 of file Selection.cpp.

Referenced by MultiSelection::getContainingSelection().

Selection::Selection ( sv_frame_t  startFrame,
sv_frame_t  endFrame 
)

Definition at line 25 of file Selection.cpp.

References m_endFrame, and m_startFrame.

Selection::Selection ( const Selection s)

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<(), operator==(), and CSVStreamWriter::writeInChunks().

sv_frame_t Selection::getStartFrame ( ) const

Definition at line 63 of file Selection.cpp.

References m_startFrame.

Referenced by getDuration(), and CSVStreamWriter::writeInChunks().

sv_frame_t Selection::getEndFrame ( ) const

Definition at line 69 of file Selection.cpp.

References m_endFrame.

Referenced by getDuration(), and CSVStreamWriter::writeInChunks().

sv_frame_t Selection::getDuration ( ) const
inline

Definition at line 52 of file Selection.h.

References contains(), getEndFrame(), getStartFrame(), operator<(), and operator==().

bool Selection::contains ( sv_frame_t  frame) const

Definition at line 75 of file Selection.cpp.

References m_endFrame, and m_startFrame.

Referenced by getDuration(), Labeller::labelAll(), Labeller::subdivide(), and Labeller::winnow().

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

Definition at line 81 of file Selection.cpp.

References isEmpty(), and m_startFrame.

Referenced by getDuration().

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

Definition at line 93 of file Selection.cpp.

References isEmpty(), m_endFrame, and m_startFrame.

Referenced by getDuration().

Member Data Documentation

sv_frame_t Selection::m_startFrame
protected

Definition at line 59 of file Selection.h.

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

sv_frame_t Selection::m_endFrame
protected

Definition at line 60 of file Selection.h.

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


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