Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# cell_range Class Reference

Represents a range of cells. More...

List of all members.

## Public Member Functions
| cell_range (COORDS topleft, COORDS bottomright)
| cell_range (COORDS topleft, unsigned horz_count, unsigned vert_count)
bool | is_intersecting (const cell_range &range) const
cell_range | operator+ (const cell_range &range) const
void | operator+= (const cell_range &range)
bool | operator== (const cell_range &range) const
bool | operator!= (const cell_range &range) const
COORDS | top_left () const
COORDS | bottom_right () const
void | move (int horz, int vert)
void | horz_count (unsigned count)
unsigned | horz_count () const
void | vert_count (unsigned count)
unsigned | vert_count () const

## Detailed Description

Represents a range of cells.

## Constructor & Destructor Documentation

cell_range | ( | COORDS | topleft,
|  | COORDS | bottomright
| ) | `[inline]`

| c'tor

cell_range | ( | COORDS | topleft,
|  | unsigned | horz_count,
|  | unsigned | vert_count
| ) | `[inline]`

  | c'tor Parameters:
  | topleft | Coordinates of the topleft cell
  | horz_count,vert_count | These two arguments describe the dimensions of the range

## Member Function Documentation

COORDS bottom_right | ( |  | ) | const`[inline]`

| Returns the coordinates of the lower right cell in this range.

unsigned horz_count | ( |  | ) | const`[inline]`

| Returns the horizontal count of cells in this range.

void horz_count | ( | unsigned | count | ) | `[inline]`

| Sets the horizontal count of cells in this range.

bool is_intersecting | ( | const cell_range & | range | ) | const`[inline]`

| Returns true if this range intersects the passed range.

void move | ( | int | horz,
|  | int | vert
| ) | `[inline]`

| Moves a range (note: a range can't be negative!).

bool operator!= | ( | const cell_range & | range | ) | const`[inline]`

| Compare two ranges.

cell_range operator+ | ( | const cell_range & | range | ) | const`[inline]`

| Merges two ranges.

void operator+= | ( | const cell_range & | range | ) | `[inline]`

| Merges two ranges.

bool operator== | ( | const cell_range & | range | ) | const`[inline]`

| Compare two ranges.

COORDS top_left | ( |  | ) | const`[inline]`

| Returns the coordinates of the upper left cell in this range.

unsigned vert_count | ( |  | ) | const`[inline]`

| Returns the vertical count of cells in this range.

void vert_count | ( | unsigned | count | ) | `[inline]`

| Sets the vertical count of cells in this range.

| by Steven Weiss. You can contact me at steven11@gmx.de.