casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::DS9Coordinate Class Reference

Class to represent a single coordinate (value + unit). More...

#include <DS9FileReader.h>

List of all members.

Public Member Functions

 DS9Coordinate (DS9::CoordinateSystem s, DS9::CoordinateUnit u=DS9::UNSET)
 Constructor which takes a system and a unit.
 ~DS9Coordinate ()
 Destructor.
void set (DS9::CoordinateSystem system)
 Sets the coordinate system to the given.
void set (DS9::CoordinateUnit unit)
 Sets the coordinate unit to the given.
void set (double value)
 Sets the single value to the given.
void set (double val1, double val2, double val3, bool minusZero=false)
 Sets the HMS/DMS value to the given.
DS9::CoordinateSystem system () const
 Returns the coordinate system.
DS9::CoordinateUnit unit () const
 Returns the unit.
double value () const
 Returns the first value.
vector< double > values () const
 Returns the value(s).
unsigned int size () const
 Returns 1 for normal coordinates or 3 for HMS/DMS.
bool isValid () const
 Returns true if this coordinate is valid, false otherwise.
String toPrintString () const
 Returns a String version for use with DS9Region::toPrintString.
double toDegrees () const
 Returns the value in degrees.

Private Attributes

DS9::CoordinateSystem m_system
DS9::CoordinateUnit m_unit
vector< double > m_values
bool m_minusZero

Detailed Description

Class to represent a single coordinate (value + unit).

Definition at line 259 of file DS9FileReader.h.


Constructor & Destructor Documentation

Constructor which takes a system and a unit.

Destructor.


Member Function Documentation

Returns true if this coordinate is valid, false otherwise.

If the coordinate is invalid (such as an unset unit), the method will attempt to fix it.

Sets the coordinate system to the given.

Sets the coordinate unit to the given.

void casa::DS9Coordinate::set ( double  value)

Sets the single value to the given.

void casa::DS9Coordinate::set ( double  val1,
double  val2,
double  val3,
bool  minusZero = false 
)

Sets the HMS/DMS value to the given.

minusZero is used when the first value is zero, but the whole value is negative.

unsigned int casa::DS9Coordinate::size ( ) const

Returns 1 for normal coordinates or 3 for HMS/DMS.

Returns the coordinate system.

Returns the value in degrees.

Returns a String version for use with DS9Region::toPrintString.

Returns the unit.

double casa::DS9Coordinate::value ( ) const

Returns the first value.

No conversion is used.

vector<double> casa::DS9Coordinate::values ( ) const

Returns the value(s).

Size will be 1 for normal coordinates, 3 for HMS/DMS. No conversion is used.


Member Data Documentation

Definition at line 312 of file DS9FileReader.h.

Definition at line 309 of file DS9FileReader.h.

Definition at line 310 of file DS9FileReader.h.

vector<double> casa::DS9Coordinate::m_values [private]

Definition at line 311 of file DS9FileReader.h.


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