# E.S.O. - VLT project/ESO Archive
# $Id: TcsCatalogObject.man3,v 1.1.1.1 2009/03/31 14:11:52 cguirao Exp $
#
# This file is processed by the ESO/VLT docDoManPages command to
# produce a man page in nroff, TeX and MIF formats. 
# See docDoManPages(1) for a description of the input format.
# 
# who             when       what
# --------------  ---------  ----------------------------------------
# Allan Brighton  27 Jun 96  Created
#

NAME
TcsCatalogObject - Class representing one row of results of a
                         TcsCatalog query.

SYNOPSIS
#include "TcsCatalogObject.h"

// NULL values
#define TCS_CATALOG_NULL_INT 4294967294      /* (2^32 - 1) */
#define TCS_CATALOG_NULL_DOUBLE 1.E-300

class TcsCatalogObject {
...
public:
    TcsCatalogObject();
    TcsCatalogObject(const TcsCatalogObject&);
    ~TcsCatalogObject();

    TcsCatalogObject& operator=(const TcsCatalogObject &);
    friend ostream& operator<<(ostream&, const TcsCatalogObject&);
    
    void print(char* buf, int bufsize);
    static void printHeadings(ostream& os);
    static void printHeadings(char* buf, int bufsize);
    int printTableRow(ostream&);
    
    void reset();
    
    static int isNull(int v);
    static int isNull(double v);
    static int isNull(const char* v);
    
    // set values
    int id(const char*);
    int ra(double);
    int dec(double);
    int cooSystem(const char*);
    int epoch(double);
    int pma(double);
    int pmd(double);
    int radvel(double);
    int parallax(double);
    int cooType(const char*);
    int band(const char*);
    int mag(double);
    int more(const char*);
    int preview(const char*);
    int distance(double);
    int pa(double);
    
    // get values
    const char* id();
    double ra();
    double dec();
    const char* cooSystem();
    double epoch();
    double pma();
    double pmd();
    double radvel();
    double parallax();
    const char* cooType();
    const char* band();
    double mag();
    const char* more();
    const char* preview();
    double distance();
    double pa();
    
    static int numCols();
    static char** colNames();
    static const char* colName(int col);
    static int colIndex(const char* colName);
    static int hasCol(const char* name);
};

DESCRIPTION
This object represents the contents of one row of TCS (GSC or PPM)
query results.  Missing values are set to the appropriate null value
(see above). Methods are available to set and get the object values.
The "set" methods do some error checking. The "get" methods are all
simple "inline" methods that simply return the value.

The following column values represent a TCS catalog object:

 id		object catalog id
 ra		Alpha coordinate for the target in decimal degrees
 dec		Delta coordinate for the target in decimal degrees
 cooSystem	Equinox system and equinox ("B1950" or "J2000")
 epoch		Epoch expressed as decimal year
 pma		Proper Motion Alpha in radians/year (-10.0 to 10.0)
 pmd		Proper Motion Delta in radians/year (-10.0 to 10.0)
 radvel		radial velocity in km/sec (-200000 to 200000)
 parallax	Parallax in arcseconds (-10000 to 10000)
 cooType	Coord. type: "M" for mean, "A" for apparent character
 band		Magnitude wavelength band ("V")
 mag		Object's magnitude in given band
 more		An HTTP URL pointing to more info on the object
 preview	An HTTP URL pointing to an image of the object
 distance	distance to center of the field 
 pa		position angle based on center of the field 

UNITS
Unless otherwise stated, the units for all radius values are in arcmin.
Floating point values for RA and DEC are always in degrees. The
default equinox is J2000.

PUBLIC METHODS
TcsCatalogObject()
	Constructor: initialize all fields to null.

TcsCatalogObject(const TcsCatalogObject&)
	copy constructor.

~TcsCatalogObject()
	Destructor.

TcsCatalogObject& operator=(const TcsCatalogObject &)
	Assignment.

operator<<(ostream&, const TcsCatalogObject&)
	Output operator (Tcl list format).

print(char* buf, int bufsize)
	Print this object to the given buffer.

printHeadings(ostream& os)
printHeadings(char* buf, int bufsize)
	Print the headings to match the output of '<<' above. 

printTableRow(ostream&)
	Print this object as a tab separated row

reset()
	Result all fields to default values.

isNull(int v)
isNull(double v)
isNull(const char* v)
	Return true if the given value is null (by convention).

id(const char*)
ra(double)
dec(double)
cooSystem(const char*)
epoch(double)
pma(double)
pmd(double)
radvel(double)
parallax(double)
cooType(const char*)
band(const char*)
mag(double)
more(const char*)
preview(const char*)
distance(double)
pa(double)
	Set fields, with range checking, return 0 if OK.

id()
ra()
dec()
cooSystem()
epoch()
pma()
pmd()
radvel()
parallax()
cooType()
band()
mag()
more()
preview()
distance()
pa()
	Member access: return member value.

The following methods are for compatibility with other AstroCatalog
classes:

numCols()
	Return the number of columns in the catalog.

colNames()
	Return an array of column names.

colName(int col)
	Return the column name for the given column.

colIndex(const char* colName)
	Return the column index for the given column name.

hasCol(const char* name)
	Return true if the catalog contains the given column. 


SEE ALSO

TcsCatalog, TcsQueryResult(3C++)
----------------------------------------------------------------------
