CARMA C++
sza::util::Coord Class Reference

A class for specifying a coordinate in a multi-dimensional space. More...

#include <carma/szautil/Coord.h>

Public Member Functions

 Coord ()
 Constructors. More...
 
 Coord (Coord *coord)
 
 Coord (unsigned ind1)
 
 Coord (unsigned ind1, unsigned ind2)
 
 Coord (unsigned ind1, unsigned ind2, unsigned ind3)
 
unsigned int getIndex (unsigned iAxis)
 Return the coordinate index for axis iAxis. More...
 
bool isSet (unsigned iAxis)
 Return true if a coordinate is set for this axis. More...
 
bool isValid ()
 Check if this coordinate contains valid data. More...
 
unsigned nAxis ()
 Return the number of axes in this coordinate nTuplet. More...
 
Coordoperator+= (unsigned incr)
 Add an increment to this object. More...
 
void operator= (Coord &coord)
 Assignment operators. More...
 
void operator= (Coord coord)
 
bool operator== (Coord &coord)
 Add an increment to this object. More...
 
void reserveIndex (unsigned nAxis)
 Reserve (but don't set) an index slot for the requested axis. More...
 
void reset (unsigned nAxis=1)
 Reset the coordinate ntuplet. More...
 
void setIndex (unsigned nAxis, unsigned index)
 Set the coordinate index of the requested axis. More...
 
virtual ~Coord ()
 Destructor. More...
 

Friends

std::ostream & operator<< (std::ostream &os, Coord &coord)
 An operator for printing this object. More...
 

Detailed Description

A class for specifying a coordinate in a multi-dimensional space.

Supports up to three dimensions at the moment.

Definition at line 21 of file Coord.h.

Constructor & Destructor Documentation

sza::util::Coord::Coord ( )

Constructors.

virtual sza::util::Coord::~Coord ( )
virtual

Destructor.

Member Function Documentation

unsigned int sza::util::Coord::getIndex ( unsigned  iAxis)

Return the coordinate index for axis iAxis.

bool sza::util::Coord::isSet ( unsigned  iAxis)

Return true if a coordinate is set for this axis.

bool sza::util::Coord::isValid ( )

Check if this coordinate contains valid data.

unsigned sza::util::Coord::nAxis ( )

Return the number of axes in this coordinate nTuplet.

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

Add an increment to this object.

void sza::util::Coord::operator= ( Coord coord)

Assignment operators.

bool sza::util::Coord::operator== ( Coord coord)

Add an increment to this object.

void sza::util::Coord::reserveIndex ( unsigned  nAxis)

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

void sza::util::Coord::reset ( unsigned  nAxis = 1)

Reset the coordinate ntuplet.

void sza::util::Coord::setIndex ( unsigned  nAxis,
unsigned  index 
)

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 file: