My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::Coord Class Reference

#include <Coord.h>

Public Member Functions

 Coord ()
 
 Coord (Coord *coord)
 
 Coord (unsigned ind1)
 
 Coord (unsigned ind1, unsigned ind2)
 
 Coord (unsigned ind1, unsigned ind2, unsigned ind3)
 
virtual ~Coord ()
 
void setIndex (unsigned nAxis, unsigned index)
 
void reserveIndex (unsigned nAxis)
 
void reset (unsigned nAxis=1)
 
unsigned nAxis ()
 
unsigned int getIndex (unsigned iAxis)
 
bool isSet (unsigned iAxis)
 
bool isValid ()
 
void operator= (Coord &coord)
 
void operator= (Coord coord)
 
Coordoperator+= (unsigned incr)
 
bool operator== (Coord &coord)
 

Friends

std::ostream & operator<< (std::ostream &os, Coord &coord)
 

Detailed Description

A class for specifying a coordinate in a multi-dimensional space. Supports up to three dimensions at the moment.

Constructor & Destructor Documentation

Coord::Coord ( )

Constructors.

....................................................................... Constructors.

Coord::~Coord ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

unsigned int Coord::getIndex ( unsigned  iAxis)

Return the coordinate index for axis iAxis

....................................................................... Return the coordinate index for axis iAxis

bool Coord::isSet ( unsigned  iAxis)

Return true if a coordinate is set for this axis

....................................................................... Return true if a coordinate is set for this axis

bool Coord::isValid ( )

Check if this coordinate contains valid data

....................................................................... Check if this coordinate contains valid data

unsigned Coord::nAxis ( )

Return the number of axes in this coordinate nTuplet.

....................................................................... Return the number of axes in this coordinate nTuplet.

Coord & Coord::operator+= ( unsigned  incr)

Add an increment to this object

....................................................................... Add an increment to this object

void Coord::operator= ( Coord coord)

Assignment operators

....................................................................... Assignment operator

void Coord::operator= ( Coord  coord)

....................................................................... Assignment operator

bool Coord::operator== ( Coord coord)

Add an increment to this object

....................................................................... Print a Coord object onto a stream

void Coord::reserveIndex ( unsigned  iAxis)

Reserve (but don't set) an index slot for the requested axis

....................................................................... Reserve an index slot for the requested axis. This is a way to make the coordinate object match a certain size, without actually setting valid indices.

void Coord::reset ( unsigned  nAxis = 1)

Reset the coordinate ntuplet

....................................................................... Reset the coordinate ntuplet

void Coord::setIndex ( unsigned  iAxis,
unsigned  index 
)

Set the coordinate index of the requested axis

....................................................................... Set the coordinate index of the requested axis

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Coord coord 
)
friend

An operator for printing this object


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