InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RowRange Class Reference

#include <TableTypes.h>

Public Types

typedef base_type data_type
 

Public Member Functions

 RowRange ()
 
 RowRange (int32 inStart, int32 inCount)
 
 RowRange (const GridArea &area)
 
void Set (int32 sstart, int32 ccount)
 
int32 End () const
 
bool16 IsEmpty () const
 
bool16 Contains (const RowRange &rhs) const
 
bool16 Contains (int32 row) const
 
bool16 Intersects (const RowRange &rhs) const
 
bool16 operator== (const RowRange &rhs) const
 
bool16 operator!= (const RowRange &rhs) const
 
RowRange operator& (const RowRange &rhs) const
 
RowRange operator| (const RowRange &rhs) const
 
RowRangeoperator&= (const RowRange &rhs)
 
RowRangeoperator|= (const RowRange &rhs)
 
void ReadWrite (IPMStream *stream)
 

Public Attributes

int32 start
 
int32 count
 

Detailed Description

A range of rows represented by [start, start+count).

For instance, a RowRange(0,3) would start at the topmost row in the table and include only the first three rows.

Author
Joe Shankar
See Also
ITableModel

Constructor & Destructor Documentation

RowRange::RowRange ()
inline

No-args constructor.

RowRange::RowRange (int32 inStart,
int32 inCount 
)
inline

Constuctor.

Parameters
startleftmost row to include in this range
countrows to span
RowRange::RowRange (const GridAreaarea)
inlineexplicit

Constructor. The rows spanned by the given GridArea used to delimit the constructed range.

Parameters
areaspecifies the area of interest

Member Function Documentation

bool16 RowRange::Contains (const RowRangerhs) const
inline

Query if the given range can be a subset of this range.

Parameters
rhsspecifies range to test
Returns
kTrue if the rows in the given range are a subset of the rows in this range, kFalse otherwise
bool16 RowRange::Contains (int32 row) const
inline

Query whether a given row lies within this range or not.

Parameters
row
Returns
kTrue if the row is within this row range, kFalse otherwise
int32 RowRange::End () const
inline
Returns
row beyond end of this range, which is the row just below
bool16 RowRange::Intersects (const RowRangerhs) const
inline

Query whether a given row range intersects with this range or not.

Parameters
rhs
bool16 RowRange::IsEmpty (void ) const
inline
Returns
kTrue if the count of rows spanned is 0, kFalse otherwise
bool16 RowRange::operator!= (const RowRangerhs) const
inline

Overload of not-equal comparison operator.

Returns
kTrue if the start or span differ, kFalse otherwise
RowRange RowRange::operator& (const RowRangerhs) const

Overload of bitwise-and operation. The operation performs an intersection operation.

Parameters
rhsrange to take intersection with
Returns
intersection of this and given row-range
RowRange& RowRange::operator&= (const RowRangerhs)
inline

Overload of operator bitwise-and assignment. Will have effect of assigning to the intersection of this with the given row-range.

Parameters
rhsrange to take intersection with
Returns
reference to self
bool16 RowRange::operator== (const RowRangerhs) const
inline

Overload of equality comparison operator. Semantically, identity obtains iff the start and span of this and comparand range are identical.

Returns
kTrue if the row range is identical in terms of start and rows spanned, kFalse otherwise.
RowRange RowRange::operator| (const RowRangerhs) const

Bitwise-or. Takes the union of this and the given row-range.

Returns
union of this and the given row range
RowRange& RowRange::operator|= (const RowRangerhs)
inline

Overload of operator bitwise-or assignment. Will assign this range to be the union of itself with the given row-range.

Parameters
rhsrange to take intersection with
Returns
reference to self
void RowRange::ReadWrite (IPMStreamstream)
inline

Persistence-related method.

Parameters
streamrefers to stream to read from or write to, dependent on stream state.
void RowRange::Set (int32 sstart,
int32 ccount 
)
inline

Mutator.

Parameters
startleftmost row to include in this range
ccountspecifies number of rows this range spans

Member Data Documentation

int32 RowRange::count

Represents the count of rows spanned by this range.

int32 RowRange::start

Represents the first row in this range.