List of all members | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes
utl::LeapSeconds Class Reference

#include <utl/LeapSeconds.h>

Inheritance diagram for utl::LeapSeconds:
Inheritance graph
[legend]

Public Member Functions

bool ConvertGPSToUnix (const unsigned long gpsSecond, time_t &unixSecond) const
 returns true if the GPS second is an UTC leap second More...
 
void ConvertUnixToGPS (const time_t unixSecond, unsigned long &gpsSecond) const
 
void Dump () const
 
 LeapSeconds ()
 
 ~LeapSeconds ()
 

Public Attributes

static LeapSeconds &return instance
 

Private Types

typedef
GPSToUnixMap::const_iterator 
GPSToUnixIterator
 
typedef std::map< unsigned
long, std::pair< int, int > > 
GPSToUnixMap
 
typedef
UnixToGPSMap::const_iterator 
UnixToGPSIterator
 
typedef std::map< std::time_t,
long > 
UnixToGPSMap
 

Private Member Functions

void Init ()
 
void SetUTC ()
 
void UnsetUTC ()
 

Private Attributes

std::time_t fGPSEpochInUnixSeconds
 
GPSToUnixMap fGPSToUnixLeaps
 
std::string * fTZ
 
UnixToGPSMap fUnixToGPSLeaps
 

Detailed Description

Quick definition: a positive leap second is a GPS second where the UTC second is exceptionally allowed to take the value of 60, i.e. the seconds run as 58, 59, 60, 00, 01... A negative leap second is removed from the last second of a day preceding the midnight, i.e. the day runs only until second 58 and jumps directly to 00 of the next day.

utl_LeapSeconds.png
Author
Darko Veberic
Date
16 Jul 2009

Definition at line 28 of file LeapSeconds.h.

Member Typedef Documentation

typedef GPSToUnixMap::const_iterator utl::LeapSeconds::GPSToUnixIterator
private

Definition at line 32 of file LeapSeconds.h.

typedef std::map<unsigned long, std::pair<int, int> > utl::LeapSeconds::GPSToUnixMap
private

Definition at line 31 of file LeapSeconds.h.

typedef UnixToGPSMap::const_iterator utl::LeapSeconds::UnixToGPSIterator
private

Definition at line 35 of file LeapSeconds.h.

typedef std::map<std::time_t, long> utl::LeapSeconds::UnixToGPSMap
private

Definition at line 34 of file LeapSeconds.h.

Constructor & Destructor Documentation

utl::LeapSeconds::LeapSeconds ( )
inline

Definition at line 38 of file LeapSeconds.h.

References Init(), and SetUTC().

utl::LeapSeconds::~LeapSeconds ( )
inline

Definition at line 39 of file LeapSeconds.h.

References UnsetUTC().

Member Function Documentation

bool LeapSeconds::ConvertGPSToUnix ( const unsigned long  gpsSecond,
time_t &  unixSecond 
) const

returns true if the GPS second is an UTC leap second

Definition at line 11 of file LeapSeconds.cc.

References UnivRecNS::low.

void LeapSeconds::ConvertUnixToGPS ( const time_t  unixSecond,
unsigned long &  gpsSecond 
) const
void LeapSeconds::Dump ( ) const

Definition at line 90 of file LeapSeconds.cc.

void LeapSeconds::Init ( void  )
private
void LeapSeconds::SetUTC ( )
private

Definition at line 107 of file LeapSeconds.cc.

Referenced by LeapSeconds().

void LeapSeconds::UnsetUTC ( )
private

Definition at line 118 of file LeapSeconds.cc.

Referenced by ~LeapSeconds().

Member Data Documentation

std::time_t utl::LeapSeconds::fGPSEpochInUnixSeconds
private

Definition at line 55 of file LeapSeconds.h.

GPSToUnixMap utl::LeapSeconds::fGPSToUnixLeaps
private

Definition at line 57 of file LeapSeconds.h.

std::string* utl::LeapSeconds::fTZ
private

Definition at line 59 of file LeapSeconds.h.

UnixToGPSMap utl::LeapSeconds::fUnixToGPSLeaps
private

Definition at line 58 of file LeapSeconds.h.

LeapSeconds & return utl::Singleton< LeapSeconds >::instance
inherited

Definition at line 44 of file Singleton.h.


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

, generated on Tue Sep 26 2023.