MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Member Functions | Static Public Member Functions | Public Attributes | Friends
mds::CRange Class Reference

Class used to specify a span (or subsequence) of indices. More...

#include <mdsRange.h>

List of all members.

Public Member Functions

 CRange ()
 Default constructor initializes range of a zero length.
 CRange (tSize First, tSize Last)
 Index of the first and the last item.
int getBegin () const
 Returns index of the first item.
int getEnd () const
 Returns index of the item just after the last one.
int getFirst () const
 Returns index of the first item.
int getLast () const
 Returns index of the last item.
tSize getSize () const
 Returns length of the range.
bool isEmpty () const
 Returns true if the range is empty.
CRangeoperator&= (const CRange &r)
CRangeoperator+= (tSize d)
CRangeoperator-= (tSize d)
CRangeoperator= (const CRange &r)
 Assignment operator.

Static Public Member Functions

static CRange all ()
 Returns a range representing all posible values.

Public Attributes

int m_Begin
 Index of the first item.
int m_End
 Index of the item just after the last one.

Friends

bool operator!= (const CRange &a, const CRange &b)
CRange operator& (const CRange &a, const CRange &b)
 Operator calculates intersection of two given ranges.
CRange operator+ (const CRange &r, tSize d)
 Shifts the whole range.
CRange operator- (const CRange &r, tSize d)
 Shifts the whole range.
bool operator== (const CRange &a, const CRange &b)
 Comparison operator.

Detailed Description

Class used to specify a span (or subsequence) of indices.


Constructor & Destructor Documentation

Default constructor initializes range of a zero length.

mds::CRange::CRange ( tSize  First,
tSize  Last 
)

Index of the first and the last item.


Member Function Documentation

static CRange mds::CRange::all ( ) [static]

Returns a range representing all posible values.

Returns index of the first item.

Returns index of the item just after the last one.

Returns index of the first item.

Returns index of the last item.

Returns length of the range.

bool mds::CRange::isEmpty ( ) const

Returns true if the range is empty.

CRange& mds::CRange::operator&= ( const CRange r)
CRange& mds::CRange::operator+= ( tSize  d)
CRange& mds::CRange::operator-= ( tSize  d)
CRange& mds::CRange::operator= ( const CRange r)

Assignment operator.


Friends And Related Function Documentation

bool operator!= ( const CRange a,
const CRange b 
) [friend]
CRange operator& ( const CRange a,
const CRange b 
) [friend]

Operator calculates intersection of two given ranges.

CRange operator+ ( const CRange r,
tSize  d 
) [friend]

Shifts the whole range.

CRange operator- ( const CRange r,
tSize  d 
) [friend]

Shifts the whole range.

bool operator== ( const CRange a,
const CRange b 
) [friend]

Comparison operator.


Member Data Documentation

Index of the first item.

Index of the item just after the last one.


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