SolarTimer Class Reference
[Roadnav Misc Classes]

SolarTimer. More...

#include <SolarTimer.h>

List of all members.

Public Types

enum  EventType { Official, Civil, Nautical, Astronomical }

Public Member Functions

 SolarTimer ()
 SolarTimer (wxEvtHandler *owner, double fLong, double fLat, EventType type)
 Constructor.
void SetOwner (wxEvtHandler *owner, double fLong, double fLat, EventType type)
 Constructor.
void SetPosition (double fLong, double fLat)
 Sets the position for which sunrise/sunset events are to occur.
void Start ()
 Starts the solar timer.
void Stop ()
 Stops the solar timer.
bool IsDaytime ()
 Returns true if it is daytime.
bool Valid ()
void GetPosition (double &fLong, double &fLat) const
 Returns the coordinates for which sunrise/sunset are computed.
EventType GetEventType () const
 Returns the type of solar event.
wxDateTime GetSunrise () const
 Returns the sunrise time, adjusted for DST as necessary, for the current position.
wxDateTime GetSunset () const
 Returns the sunset time, adjusted for DST as necessary, for the current position.
virtual void Notify ()
 Virtual function called at sunrise and sunset.

Private Member Functions

void Init ()
void OnTimer (wxTimerEvent &event)
void OnTimeChange (wxTimeChangeEvent &event)
void ComputeSunriset ()
bool IsNewDay ()
void NotifyIfNeeded ()

Private Attributes

wxEvtHandler * m_pOwner
wxTimer m_Timer
double m_fLong
double m_fLat
EventType m_EventType
wxDateTime m_Today
wxDateTime m_Sunrise
wxDateTime m_Sunset
bool m_bIsDaytime


Detailed Description

SolarTimer.

Definition at line 75 of file MainPage.txt.


Member Enumeration Documentation

Enumerator:
Official 
Civil 
Nautical 
Astronomical 

Definition at line 107 of file SolarTimer.h.


Constructor & Destructor Documentation

SolarTimer::SolarTimer (  ) 

SolarTimer::SolarTimer ( wxEvtHandler *  owner,
double  fLong,
double  fLat,
EventType  type 
)

Constructor.

Definition at line 90 of file SolarTimer.cpp.


Member Function Documentation

void SolarTimer::SetOwner ( wxEvtHandler *  owner,
double  fLong,
double  fLat,
EventType  type 
)

Constructor.

Definition at line 104 of file SolarTimer.cpp.

void SolarTimer::SetPosition ( double  fLong,
double  fLat 
)

Sets the position for which sunrise/sunset events are to occur.

Definition at line 119 of file SolarTimer.cpp.

void SolarTimer::Start (  ) 

Starts the solar timer.

Definition at line 138 of file SolarTimer.cpp.

void SolarTimer::Stop (  ) 

Stops the solar timer.

Definition at line 159 of file SolarTimer.cpp.

bool SolarTimer::IsDaytime (  ) 

Returns true if it is daytime.

Definition at line 170 of file SolarTimer.cpp.

bool SolarTimer::Valid (  ) 

Definition at line 446 of file SolarTimer.cpp.

void SolarTimer::GetPosition ( double &  fLong,
double &  fLat 
) const

Returns the coordinates for which sunrise/sunset are computed.

Definition at line 186 of file SolarTimer.cpp.

SolarTimer::EventType SolarTimer::GetEventType (  )  const

Returns the type of solar event.

Definition at line 197 of file SolarTimer.cpp.

wxDateTime SolarTimer::GetSunrise (  )  const

Returns the sunrise time, adjusted for DST as necessary, for the current position.

Definition at line 208 of file SolarTimer.cpp.

wxDateTime SolarTimer::GetSunset (  )  const

Returns the sunset time, adjusted for DST as necessary, for the current position.

Definition at line 219 of file SolarTimer.cpp.

void SolarTimer::Notify (  )  [virtual]

Virtual function called at sunrise and sunset.

Subclasses should override this method.

Definition at line 231 of file SolarTimer.cpp.

void SolarTimer::Init (  )  [private]

Definition at line 284 of file SolarTimer.cpp.

void SolarTimer::OnTimer ( wxTimerEvent &  event  )  [private]

Definition at line 243 of file SolarTimer.cpp.

void SolarTimer::OnTimeChange ( wxTimeChangeEvent event  )  [private]

Definition at line 271 of file SolarTimer.cpp.

void SolarTimer::ComputeSunriset (  )  [private]

Definition at line 299 of file SolarTimer.cpp.

bool SolarTimer::IsNewDay (  )  [private]

Definition at line 278 of file SolarTimer.cpp.

void SolarTimer::NotifyIfNeeded (  )  [private]

Definition at line 254 of file SolarTimer.cpp.


Member Data Documentation

wxEvtHandler* SolarTimer::m_pOwner [private]

Definition at line 136 of file SolarTimer.h.

wxTimer SolarTimer::m_Timer [private]

Definition at line 137 of file SolarTimer.h.

double SolarTimer::m_fLong [private]

Definition at line 138 of file SolarTimer.h.

double SolarTimer::m_fLat [private]

Definition at line 139 of file SolarTimer.h.

Definition at line 140 of file SolarTimer.h.

wxDateTime SolarTimer::m_Today [private]

Definition at line 141 of file SolarTimer.h.

wxDateTime SolarTimer::m_Sunrise [private]

Definition at line 142 of file SolarTimer.h.

wxDateTime SolarTimer::m_Sunset [private]

Definition at line 143 of file SolarTimer.h.

bool SolarTimer::m_bIsDaytime [private]

Definition at line 144 of file SolarTimer.h.


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

Generated on Sun Jul 27 17:26:16 2008 for Roadnav by  doxygen 1.5.5