TRangeRef Class Reference

#include <bacell.h>

Link against: bafl.lib

class TRangeRef

Nested Classes and Structures

Public Attributes
TCellRef iFrom
TCellRef iTo
Public Member Functions
TRangeRef()
TRangeRef(const TCellRef &, const TCellRef &)
TRangeRef(TInt, TInt, TInt, TInt)
IMPORT_C TBoolContains(const TCellRef &)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C TIntNoCells()
TInt NoCols()
TInt NoRows()
voidSetRange(const TCellRef &, const TCellRef &)
voidSetRange(TInt, TInt, TInt, TInt)
TBool operator!=(const TRangeRef &)
IMPORT_C TBooloperator==(const TRangeRef &)

Detailed Description

Identifies a range of cells by start and end cell references. The range is inclusive of both the start and end cells.

See also: TCellRef

Member Attribute Documentation

iFrom

TCellRef iFrom

The start cell.

iTo

The end cell.

Constructor & Destructor Documentation

TRangeRef ( )

TRangeRef()[inline]

Default constructor.

The object's start cell and end cell are undefined.

TRangeRef ( const TCellRef &, const TCellRef & )

TRangeRef(const TCellRef &aFrom,
const TCellRef &aTo
)[inline]

Constructor taking a start and end cell.

ParameterDescription
aFromThe start cell.
aToThe end cell.

TRangeRef ( TInt, TInt, TInt, TInt )

TRangeRef(TIntaFromRow,
TIntaFromCol,
TIntaToRow,
TIntaToCol
)[inline]

Constructor taking a start row and start column number, and an end row and end column number.

ParameterDescription
aFromRowThe start row number.
aFromColThe start column number.
aToRowThe end row number.
aToColThe end column number.

Member Function Documentation

Contains ( const TCellRef & )

IMPORT_C TBoolContains(const TCellRef &aCell)const

Tests whether the specified cell is contained within the range.

A range includes its outer perimeter.

ParameterDescription
aCellThe cell to be tested.

Returns: ETrue, if the specified cell is contained within the range; EFalse, otherwise.

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalises an object of this class to a write stream.

The presence of this function means that the standard templated operator<<() can be used to externalise objects of this class.

ParameterDescription
aStreamStream to which the object should be externalised.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalises an object of this class from a read stream.

The presence of this function means that the standard templated operator>>() can be used to internalise objects of this class.

Note that the function has assignment semantics. It replaces the old value of the object with a new value read from the read stream.

ParameterDescription
aStreamStream from which the object is to be internalised.

NoCells ( )

IMPORT_C TIntNoCells()const

Gets the number of cells represented by the range.

Returns: The number of cells.

NoCols ( )

TInt NoCols()const [inline]

Gets the number of columns represented by the range.

Returns: The number of columns.

NoRows ( )

TInt NoRows()const [inline]

Gets the number of rows represented by the range.

Returns: The number of rows.

SetRange ( const TCellRef &, const TCellRef & )

voidSetRange(const TCellRef &aFrom,
const TCellRef &aTo
)[inline]

Sets the cell range to the specified cells.

ParameterDescription
aFromThe start cell for the range.
aToThe end cell for the range.

SetRange ( TInt, TInt, TInt, TInt )

voidSetRange(TIntaFromRow,
TIntaFromCol,
TIntaToRow,
TIntaToCol
)[inline]

Sets the cell range to the specified start row and column, and end row and column.

ParameterDescription
aFromRowThe start row number.
aFromColThe start column number.
aToRowThe end row number.
aToColThe end column number.

operator!= ( const TRangeRef & )

TBool operator!=(const TRangeRef &aRange)const [inline]

Compares this cell range with the specified cell range for inequality.

ParameterDescription
aRangeThe cell to be compared.

Returns: ETrue, if the start cells are different or the end cells are different.

operator== ( const TRangeRef & )

IMPORT_C TBooloperator==(const TRangeRef &aRange)const

Compares this cell range with the specified cell range for equality.

ParameterDescription
aRangeThe cell range to be compared.

Returns: ETrue, if the start cells and the end cells are the same.