ReFRACtor
|
The class handles the calculation of the altitude and gravity constants. More...
#include <altitude.h>
Public Member Functions | |
virtual | ~Altitude () |
virtual void | add_observer (Observer< Altitude > &Obs) |
Add an observer. More... | |
void | add_observer_and_keep_reference (boost::shared_ptr< Observer< Altitude > > &Obs) |
Add an observer and keep a reference to it. More... | |
virtual AutoDerivativeWithUnit< double > | altitude (const AutoDerivativeWithUnit< double > &P) const =0 |
Return altitude grid for the given pressure. More... | |
virtual boost::shared_ptr< Altitude > | clone () const =0 |
Clone an Altitude object. More... | |
virtual boost::shared_ptr< Altitude > | clone (const boost::shared_ptr< Pressure > &Press, const boost::shared_ptr< Temperature > &Temp) const =0 |
This version of clone takes a pressure and temperature to use. More... | |
virtual AutoDerivativeWithUnit< double > | gravity (const AutoDerivativeWithUnit< double > &P) const =0 |
Return gravity constant for the given pressure. More... | |
virtual void | print (std::ostream &Os) const |
std::string | print_to_string () const |
Print to string. More... | |
virtual void | remove_observer (Observer< Altitude > &Obs) |
Remove an observer. More... | |
Protected Member Functions | |
void | add_observer_do (Observer< Altitude > &Obs, Altitude &t) |
Add an observer. More... | |
void | add_observer_do (Observer< Altitude > &Obs) |
void | clean_dead_ptr () |
Remove any dead pointers. More... | |
void | notify_update_do (const Altitude &Self) |
Function to call to notify Observers of a state change. More... | |
void | remove_observer_do (Observer< Altitude > &Obs, Altitude &t) |
Remove an observer. More... | |
void | remove_observer_do (Observer< Altitude > &Obs) |
Protected Attributes | |
std::list< boost::weak_ptr< Observer< Altitude > > > | olist |
std::vector< boost::shared_ptr< Observer< Altitude > > > | ref_list |
The class handles the calculation of the altitude and gravity constants.
Other objects may depend on the altitude, and should be updated when the altitude is updated. To facilitate that, this class in an Oberverable, and objects can add themselves as Observers to be notified when the temperature is updated.
Definition at line 19 of file altitude.h.
|
inlinevirtual |
Definition at line 21 of file altitude.h.
Add an observer.
Implements FullPhysics::Observable< Altitude >.
Definition at line 22 of file altitude.h.
|
inlineinherited |
Add an observer and keep a reference to it.
See the discussion in the Observer class description for details.
Definition at line 107 of file observer.h.
|
inlineprotectedinherited |
Add an observer.
Definition at line 148 of file observer.h.
|
inlineprotectedinherited |
Definition at line 159 of file observer.h.
|
pure virtual |
Return altitude grid for the given pressure.
Implemented in FullPhysics::AltitudeHydrostatic.
|
inlineprotectedinherited |
Remove any dead pointers.
Definition at line 196 of file observer.h.
|
pure virtual |
Clone an Altitude object.
Note that the cloned version will not be attached to and StateVector or Observer<Altitude>, although you can of course attach them after receiving the cloned object.
Because this isn't attached to the StateVector, one use of the clone operator is to create a "frozen" Altitude object.
Implemented in FullPhysics::AltitudeHydrostatic.
|
pure virtual |
This version of clone takes a pressure and temperature to use.
The intent is that the pressure and temperature has been cloned from the original pressure and temperature (although this class has no way to verify this). This allows sets of objects to be cloned using a common Pressure and Temperature clone, e.g. Atmosphere.
Implemented in FullPhysics::AltitudeHydrostatic.
|
pure virtual |
Return gravity constant for the given pressure.
Implemented in FullPhysics::AltitudeHydrostatic.
|
inlineprotectedinherited |
Function to call to notify Observers of a state change.
The object should pass itself to this function, so it can be passed to the Observers.
Definition at line 121 of file observer.h.
|
inlinevirtual |
Reimplemented in FullPhysics::AltitudeHydrostatic.
Definition at line 42 of file altitude.h.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
Remove an observer.
Implements FullPhysics::Observable< Altitude >.
Definition at line 24 of file altitude.h.
|
inlineprotectedinherited |
Remove an observer.
Definition at line 173 of file observer.h.
|
inlineprotectedinherited |
Definition at line 181 of file observer.h.
|
protectedinherited |
Definition at line 200 of file observer.h.
|
protectedinherited |
Definition at line 201 of file observer.h.