Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.sao.ru/precise/Local/SkyCat/astrotcl/astrotcl.15.html
Дата изменения: Fri Sep 11 17:33:25 1998
Дата индексирования: Tue Oct 2 12:45:35 2012
Кодировка:

Поисковые слова: р р р с р с р р р с р с р р р с с р р с р с р р п п р р п р п р п р п
HMS(3)

Go up one levelGo to Previous Go to Next

HMS(3)

NAME

 
HMS - C++ class for working with H:M:S (hours minutes seconds) values

SYNOPSIS

 
#include "HMS.h"

class HMS {
public:
    HMS();
    HMS(int hours, int min, double sec);
    HMS(double val);

    int isNull() const;

    int hours() const;
    int min() const;
    double sec() const;
    double val() const;

    friend ostream& operator<<(ostream&, const HMS&);
    friend istream& operator>>(istream&, HMS&);

    friend int operator< (const HMS& a, const HMS& b);
    friend int operator<=(const HMS& a, const HMS& b);
    friend int operator> (const HMS& a, const HMS& b);
    friend int operator>=(const HMS& a, const HMS& b);
    friend int operator==(const HMS& a, const HMS& b);
    friend int operator!=(const HMS& a, const HMS& b);
};

DESCRIPTION

 
HMS is a simple class for representing values in Hours:Minutes:Seconds
format or in degrees, converting back and forth and comparing.

CONSTRUCTORS

 
HMS()
        Initialize a NULL H:M:S value (see isNull() method).

HMS(hours, min, sec)
        Initialize from hours, minutes and seconds.

HMS(val)
        Initialize from a value in degrees.

METHODS

 
isNull()
        Return true if the HMS object has the NULL value (created with
        default constructor).

hours()
min()
sec()
val()
        Return the parts of the H:M:S value or the value (val) in
        degrees.

operator<<(ostream, hms)
operator>>(istream, hms)
        I/O operators - using format H:M:S.sss.

operator< (a, b);
operator<=(a, b);
operator> (a, b);
operator>=(a, b);
operator==(a, b);
operator!=(a, b);
        Comparison operators - compare two H:M:S values.

SEE ALSO

 
WorldCoords
 


- - - - - -
Last change: 08 Sep 98

 


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory