![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
A simple interface class handling validation checking for classes that inherit it. More...
#include <supernovas.h>
Public Member Functions | |
| bool | is_valid () const |
| Returns the previously set 'valid' stae of the implementing instance. | |
| operator bool () const | |
| Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid(). | |
Protected Member Functions | |
| Validating () | |
| dummy constructor; | |
Protected Attributes | |
| bool | _valid = false |
| the state variable. | |
A simple interface class handling validation checking for classes that inherit it.
|
inlineprotected |
dummy constructor;
Referenced by supernovas::Frame::Frame().
|
inline |
Returns the previously set 'valid' stae of the implementing instance.
Generally 'valid' means that the class has all fields defined with sane values, such as floating-point values that are not NAN, and object fields that are themselves 'valid'. Some implementing classes may also apply additional range checking for values, for example, ensuring that a velocity does not exceed the speed of light, etc.
References _valid.
Referenced by supernovas::CatalogEntry::CatalogEntry(), supernovas::CatalogSource::CatalogSource(), supernovas::EquatorialTrack::EquatorialTrack(), supernovas::Frame::Frame(), supernovas::Galactic::Galactic(), supernovas::Galactic::Galactic(), supernovas::Galactic::Galactic(), supernovas::GeocentricObserver::GeocentricObserver(), supernovas::GeodeticObserver::GeodeticObserver(), supernovas::GeodeticObserver::GeodeticObserver(), supernovas::Geometric::Geometric(), supernovas::Horizontal::Horizontal(), supernovas::HorizontalTrack::HorizontalTrack(), supernovas::OrbitalSource::OrbitalSource(), supernovas::SolarSystemObserver::SolarSystemObserver(), supernovas::Coordinate::abs(), supernovas::ScalarVelocity::abs(), supernovas::Site::altitude(), supernovas::Frame::apparent_moon_elp2000(), supernovas::Planet::approx_apparent_in(), supernovas::Planet::approx_geometric_in(), supernovas::Orbital::apsis_period(), supernovas::Position::as_astrometric(), supernovas::AstrometricPosition::as_equatorial(), supernovas::Orbital::ascending_node(), supernovas::Pressure::atm(), supernovas::Pressure::bar(), supernovas::Temperature::celsius(), supernovas::Apparent::cirs(), supernovas::Equinox::cirs(), supernovas::Calendar::date(), supernovas::Calendar::date(), supernovas::CatalogEntry::dec(), supernovas::Apparent::distance(), supernovas::CatalogEntry::distance(), supernovas::Position::distance(), supernovas::Ecliptic::distance_to(), supernovas::Equatorial::distance_to(), supernovas::Galactic::distance_to(), supernovas::Horizontal::distance_to(), supernovas::Spherical::distance_to(), supernovas::EOP::dUT1(), supernovas::Time::dUT1(), supernovas::Apparent::ecliptic(), supernovas::Geometric::ecliptic(), supernovas::Site::enu_to_itrs(), supernovas::Site::enu_to_itrs(), supernovas::GeodeticObserver::enu_velocity(), supernovas::Apparent::equatorial(), supernovas::CatalogEntry::equatorial(), supernovas::Geometric::equatorial(), supernovas::Source::equatorial_track(), supernovas::Time::era(), supernovas::Temperature::farenheit(), supernovas::Observer::frame_at(), supernovas::Apparent::from_cirs(), supernovas::Apparent::from_cirs_sky_pos(), supernovas::Site::from_GPS(), supernovas::Orbital::from_mean_motion(), supernovas::Time::from_mjd(), supernovas::Orbital::from_novas_orbit(), supernovas::OrbitalSystem::from_novas_orbital_system(), supernovas::EquatorialTrack::from_novas_track(), supernovas::HorizontalTrack::from_novas_track(), supernovas::Coordinate::from_parallax(), supernovas::ScalarVelocity::from_redshift(), supernovas::Equinox::from_system_type(), supernovas::Apparent::from_tod(), supernovas::Apparent::from_tod_sky_pos(), supernovas::Apparent::galactic(), supernovas::Geometric::galactic(), supernovas::GeocentricObserver::geocentric_position(), supernovas::GeocentricObserver::geocentric_velocity(), supernovas::Frame::geometric(), supernovas::Frame::geometric_moon_elp2000(), supernovas::Time::gmst(), supernovas::Time::gst(), supernovas::TimeAngle::hours(), supernovas::Pressure::hPa(), supernovas::ScalarVelocity::in_direction(), supernovas::Observer::in_earth_orbit(), supernovas::Observer::in_solar_system(), supernovas::Orbital::inclination(), supernovas::Position::inv(), supernovas::Velocity::inv(), supernovas::EOP::itrf_transformed(), supernovas::Site::itrf_transformed(), supernovas::Site::itrs_to_enu(), supernovas::Site::itrs_to_enu(), supernovas::GeodeticObserver::itrs_velocity(), supernovas::Temperature::kelvin(), supernovas::Pressure::kPa(), supernovas::Site::latitude(), supernovas::Site::longitude(), supernovas::Time::lst(), supernovas::Planet::mass(), supernovas::Pressure::mbar(), supernovas::Planet::mean_radius(), supernovas::TimeAngle::minutes(), supernovas::Equinox::mod(), supernovas::Equinox::mod_at_besselian_epoch(), supernovas::Orbital::moon_mean_orbit_at(), supernovas::Orbital::moon_orbit_at(), supernovas::Time::moon_phase(), supernovas::Observer::moving_on_earth(), supernovas::Observer::moving_on_earth(), supernovas::Time::next_moon_phase(), supernovas::Orbital::node_period(), supernovas::Time::now(), supernovas::AstrometricPosition::obs_time(), supernovas::Frame::observer_ssb_position(), supernovas::Frame::observer_ssb_velocity(), supernovas::Time::offset_from(), supernovas::Observer::on_earth(), supernovas::Interval::operator*(), supernovas::Interval::operator*(), supernovas::operator*(), supernovas::ScalarVelocity::operator*(), supernovas::Vector::operator*(), supernovas::Velocity::operator*(), supernovas::Angle::operator+(), supernovas::CalendarDate::operator+(), supernovas::Position::operator+(), supernovas::ScalarVelocity::operator+(), supernovas::TimeAngle::operator+(), supernovas::TimeAngle::operator+(), supernovas::Velocity::operator+(), supernovas::Angle::operator-(), supernovas::CalendarDate::operator-(), supernovas::CalendarDate::operator-(), supernovas::Position::operator-(), supernovas::ScalarVelocity::operator-(), supernovas::Time::operator-(), supernovas::TimeAngle::operator-(), supernovas::TimeAngle::operator-(), supernovas::Velocity::operator-(), supernovas::Coordinate::operator/(), supernovas::Position::operator/(), supernovas::CalendarDate::operator>>(), supernovas::Ecliptic::operator>>(), supernovas::Equatorial::operator>>(), supernovas::Geometric::operator>>(), supernovas::OrbitalSource::orbital(), supernovas::OrbitalSystem::orientation(), supernovas::Pressure::Pa(), supernovas::CatalogEntry::parallax(), supernovas::Coordinate::parallax(), supernovas::Orbital::periapsis(), supernovas::Orbital::period(), supernovas::Vector::phi(), supernovas::Orbital::pole(), supernovas::OrbitalSystem::pole(), supernovas::EquatorialTrack::projected_at(), supernovas::HorizontalTrack::projected_at(), supernovas::CatalogEntry::ra(), supernovas::Equatorial::ra(), supernovas::Apparent::radial_velocity(), supernovas::CatalogEntry::radial_velocity(), supernovas::Track< CoordType >::radial_velocity_at(), supernovas::Frame::reduced_accuracy(), supernovas::Observer::reduced_accuracy_frame_at(), supernovas::Orbital::reference_mean_anomaly(), supernovas::AstrometricPosition::referenced_to(), supernovas::AstrometricPosition::referenced_to_ssb(), supernovas::Source::rises_above(), supernovas::Vector::scaled(), supernovas::TimeAngle::seconds(), supernovas::Orbital::semi_major_axis(), supernovas::Source::sets_below(), supernovas::Time::shifted(), supernovas::Velocity::speed(), supernovas::SolarSystemObserver::ssb_position(), supernovas::SolarSystemObserver::ssb_velocity(), supernovas::ScalarEvolution::stationary(), supernovas::Orbital::system(), supernovas::Vector::theta(), supernovas::Time::time_of_day(), supernovas::Horizontal::to_apparent(), supernovas::CalendarDate::to_calendar(), supernovas::Time::to_calendar_date(), supernovas::Equatorial::to_cirs(), supernovas::Geometric::to_cirs(), supernovas::Equatorial::to_ecliptic(), supernovas::Galactic::to_ecliptic(), supernovas::Time::to_epoch_string(), supernovas::Ecliptic::to_equatorial(), supernovas::Galactic::to_equatorial(), supernovas::Ecliptic::to_galactic(), supernovas::Equatorial::to_galactic(), supernovas::Equatorial::to_hip(), supernovas::Apparent::to_horizontal(), supernovas::Ecliptic::to_icrs(), supernovas::Equatorial::to_icrs(), supernovas::Geometric::to_icrs(), supernovas::Time::to_iso_string(), supernovas::Geometric::to_itrs(), supernovas::Ecliptic::to_j2000(), supernovas::Equatorial::to_j2000(), supernovas::Geometric::to_j2000(), supernovas::Ecliptic::to_mod(), supernovas::Equatorial::to_mod(), supernovas::Geometric::to_mod(), supernovas::Equatorial::to_mod_at_besselian_epoch(), supernovas::Site::to_observer(), supernovas::Horizontal::to_refracted(), supernovas::CatalogEntry::to_source(), supernovas::Orbital::to_source(), supernovas::Position::to_spherical(), supernovas::Time::to_string(), supernovas::Ecliptic::to_system(), supernovas::Equatorial::to_system(), supernovas::Geometric::to_system(), supernovas::CalendarDate::to_time(), supernovas::Geometric::to_tirs(), supernovas::Ecliptic::to_tod(), supernovas::Equatorial::to_tod(), supernovas::Geometric::to_tod(), supernovas::Horizontal::to_unrefracted(), supernovas::Equinox::tod(), supernovas::Pressure::torr(), supernovas::Source::transits_in(), supernovas::ScalarVelocity::travel(), supernovas::Velocity::travel(), supernovas::Track< CoordType >::unchecked_distance(), supernovas::Track< CoordType >::unchecked_latitude(), supernovas::Track< CoordType >::unchecked_longitude(), supernovas::Vector::unit_vector(), supernovas::CatalogEntry::v_lsr(), supernovas::Apparent::xyz(), supernovas::Site::xyz(), supernovas::Spherical::xyz(), and supernovas::Horizontal::zenith_angle().
|
inlineexplicit |
Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid().
E.g.:
is the same as the more verbose:
References _valid.
|
protected |
the state variable.
Constructors should set it to true before returning if the instance has been initialized in a valid state.
Referenced by supernovas::Angle::Angle(), supernovas::Angle::Angle(), supernovas::CalendarDate::CalendarDate(), supernovas::CalendarDate::CalendarDate(), supernovas::CatalogEntry::CatalogEntry(), supernovas::CatalogSource::CatalogSource(), supernovas::Coordinate::Coordinate(), supernovas::EphemerisSource::EphemerisSource(), supernovas::Frame::Frame(), supernovas::GeocentricObserver::GeocentricObserver(), supernovas::GeocentricObserver::GeocentricObserver(), supernovas::GeodeticObserver::GeodeticObserver(), supernovas::GeodeticObserver::GeodeticObserver(), supernovas::GeodeticObserver::GeodeticObserver(), supernovas::Geometric::Geometric(), supernovas::Interval::Interval(), supernovas::OrbitalSource::OrbitalSource(), supernovas::Planet::Planet(), supernovas::Position::Position(), supernovas::ScalarEvolution::ScalarEvolution(), supernovas::ScalarVelocity::ScalarVelocity(), supernovas::Site::Site(), supernovas::Site::Site(), supernovas::SolarSystemObserver::SolarSystemObserver(), supernovas::SolarSystemObserver::SolarSystemObserver(), supernovas::Spherical::Spherical(), supernovas::Time::Time(), supernovas::Time::Time(), supernovas::Time::Time(), supernovas::Time::Time(), supernovas::Time::Time(), supernovas::Vector::Vector(), supernovas::Velocity::Velocity(), supernovas::Orbital::apsis_period(), supernovas::CalendarDate::break_down(), supernovas::CatalogEntry::distance(), supernovas::Orbital::eccentricity(), supernovas::Orbital::inclination(), is_valid(), supernovas::Orbital::node_period(), operator bool(), supernovas::Frame::operator=(), supernovas::OrbitalSystem::orientation(), supernovas::CatalogEntry::parallax(), supernovas::CatalogEntry::proper_motion(), supernovas::CatalogEntry::radial_velocity(), supernovas::CatalogEntry::redshift(), and supernovas::CatalogEntry::v_lsr().