|
WSF
|
#include <VerticalDimension.hpp>


Public Member Functions | |
| VerticalDimension ()=default | |
| bool | ParseAndValidate (const Field &aField) override |
| const std::string & | GetBaseReference () const noexcept |
| const std::string & | GetMinAltitude () const noexcept |
| const std::string & | GetAltitudeUnitOfMeasure () const noexcept |
| const std::string & | GetFlightIndicator () const noexcept |
| const std::string & | GetMaxAltitude () const noexcept |
| int | GetNumericalMinAltitude () const noexcept |
| Int because its expressed as 000-999 in hundreds of feet. | |
| int | GetNumericalMaxAltitude () const noexcept |
| Public Member Functions inherited from usmtf::FFIRN_Validator | |
| FFIRN_Validator ()=default | |
| const std::string & | GetRawContent () const noexcept |
| Return the content of the field as it was in the USMTF set. | |
| std::vector< std::string > | SplitOnDelimeter (const std::string &value, const std::string &delimeter) |
| Values separated by delimeter. | |
| const std::string & | GetFieldContent () const noexcept |
| Public Member Functions inherited from usmtf::Validatable | |
| bool | IsValid () const noexcept |
| Public Member Functions inherited from usmtf::ErrorManager | |
| virtual | ~ErrorManager ()=default |
| bool | HasErrors () const noexcept |
| void | LogErrors (std::ostream &aOut) const noexcept |
| const std::vector< ValidationError > & | GetErrors () const |
Protected Member Functions | |
| bool | IsValidVerticalDimensionBaseToFlightLevel () noexcept |
| bool | IsValidVerticalDimensionBaseToRelativeAlt () noexcept |
| bool | IsValidVerticalDimensionRelativeAltToFlightLevel () noexcept |
| /RAFL:100AGL-FL230 | |
| bool | IsValidVerticalDimensionRelativeAltToRelativeAlt () noexcept |
| /RARA:000AGL-020AGL | |
| bool | IsValidVerticalDimensionFlightLevelToFlightLevel () noexcept |
| /FLFL:FL250-FL290 | |
| bool | IsValidAltitudeBaseReferencePoint (const std::string &aValue) noexcept |
| bool | IsValidRelativeAltitude (const std::string &aValue) noexcept |
| bool | IsValidAltitudeUOM (const std::string &aValue) noexcept |
| bool | IsValidFlightLevelIndicator (const std::string &aValue) noexcept |
| Protected Member Functions inherited from usmtf::FFIRN_Validator | |
| bool | ValidateByDescriptor (const FFIRN_DescriptorMap &aDescriptorMap) |
| Speed up validation if descriptor is present. Runs all functions if it isn't. | |
| void | ClearErrorsIfValid (bool aHasAtLeastOnePassed) noexcept |
| void | SetField (const Field &aField) noexcept |
| Field Setter for internal use only. | |
| Protected Member Functions inherited from usmtf::ErrorManager | |
| void | AddError (const ValidationError &aError) noexcept |
| void | AddError (const std::string &aFailureReason, const std::string &aValueValidatied, const std::string &aOptionalSuggestion="") noexcept |
| void | AddError (const std::string &aErrorMessage) noexcept |
| void | AddErrors (const std::vector< ValidationError > &aErrors) noexcept |
| void | ClearErrors () noexcept |
Protected Attributes | |
| std::string | mBaseReference |
| std::string | mMinAltitude |
| std::string | mAltitudeMeasurement |
| std::string | mFlightIndicator |
| std::string | mMaxAltitude |
| Protected Attributes inherited from usmtf::FFIRN_Validator | |
| Field | mField |
Additional Inherited Members | |
| Public Types inherited from usmtf::FFIRN_Validator | |
| using | FFIRN_Func = std::function<bool(void)> |
| using | FFIRN_DescriptorMap = std::unordered_map<std::string, FFIRN_Func> |
| Static Public Member Functions inherited from usmtf::FFIRN_Validator | |
| static bool | IsInSelection (const std::string &aValue, const std::vector< std::string > &choices) noexcept |
| static bool | IsStringLength (const std::string &aValue, size_t aLength) noexcept |
| static size_t | CheckForAnyDelimeter (const std::string &aValue, const std::vector< std::string > &aDelimeters) noexcept |
| Returns the positions of a specified delimiter if present, npos if not. | |
| static size_t | CheckForAnyDelimeter (const std::string &aValue, const std::vector< std::string > &aDelimeters, std::string &aFoundDelimeter) noexcept |
| template<class T> | |
| static bool | IsInRange (T aValue, T aLowerBound, T aUpperBound) noexcept |
FFIRN_Validator responsible for the validation and property extraction of a VerticalDimension. VerticalDimensions define the altitude lower and upper bound. These are used in zones for Z axis volume.
USMTF Example: VerticalDimension |||||||||| 1TRACK vvvvvvvvvv / LEG / LEG - BEGIN / LEG - END / LEG - WIDTH / MINALT - MAXALT / 01 / 152345N0505657E / 192646N0531226E / 30.5NML - 60.9NMR / 050AMSL - 100AMSL / 02 / 192646N0531226E / 231031N0545323E / 60.5NML - 60.5NMR / 080AMSL - 120AMSL / 03 / 231031N0545323E / 280628N0562901E / 60NML - 80NMR / 100AMSL - 150AMSL //
|
default |
References GetAltitudeUnitOfMeasure(), GetBaseReference(), GetFlightIndicator(), GetMaxAltitude(), GetMinAltitude(), GetNumericalMaxAltitude(), GetNumericalMinAltitude(), IsValidAltitudeBaseReferencePoint(), IsValidAltitudeUOM(), IsValidFlightLevelIndicator(), IsValidRelativeAltitude(), IsValidVerticalDimensionBaseToFlightLevel(), IsValidVerticalDimensionBaseToRelativeAlt(), IsValidVerticalDimensionFlightLevelToFlightLevel(), IsValidVerticalDimensionRelativeAltToFlightLevel(), IsValidVerticalDimensionRelativeAltToRelativeAlt(), and ParseAndValidate().
|
noexcept |
References mAltitudeMeasurement.
Referenced by VerticalDimension().
|
noexcept |
References mBaseReference.
Referenced by VerticalDimension().
|
noexcept |
References mFlightIndicator.
Referenced by VerticalDimension().
|
noexcept |
References mMaxAltitude.
Referenced by GetNumericalMaxAltitude(), and VerticalDimension().
|
noexcept |
References mMinAltitude.
Referenced by GetNumericalMinAltitude(), and VerticalDimension().
|
noexcept |
References GetMaxAltitude().
Referenced by VerticalDimension().
|
noexcept |
Int because its expressed as 000-999 in hundreds of feet.
References GetMinAltitude().
Referenced by VerticalDimension().
|
protectednoexcept |
|
protectednoexcept |
|
protectednoexcept |
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), and usmtf::FFIRN_Validator::IsInRange().
Referenced by IsValidVerticalDimensionBaseToFlightLevel(), IsValidVerticalDimensionBaseToRelativeAlt(), IsValidVerticalDimensionFlightLevelToFlightLevel(), IsValidVerticalDimensionRelativeAltToFlightLevel(), IsValidVerticalDimensionRelativeAltToRelativeAlt(), and VerticalDimension().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::CheckForAnyDelimeter(), usmtf::FFIRN_Validator::IsInRange(), IsValidAltitudeBaseReferencePoint(), IsValidFlightLevelIndicator(), IsValidRelativeAltitude(), mBaseReference, usmtf::FFIRN_Validator::mField, mFlightIndicator, and mMaxAltitude.
Referenced by ParseAndValidate(), and VerticalDimension().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::CheckForAnyDelimeter(), usmtf::FFIRN_Validator::IsInRange(), IsValidAltitudeBaseReferencePoint(), IsValidAltitudeUOM(), IsValidRelativeAltitude(), mAltitudeMeasurement, mBaseReference, usmtf::FFIRN_Validator::mField, and mMaxAltitude.
Referenced by ParseAndValidate(), and VerticalDimension().
|
protectednoexcept |
/FLFL:FL250-FL290
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::CheckForAnyDelimeter(), usmtf::FFIRN_Validator::IsStringLength(), IsValidFlightLevelIndicator(), IsValidRelativeAltitude(), usmtf::FFIRN_Validator::mField, mFlightIndicator, mMaxAltitude, and mMinAltitude.
Referenced by ParseAndValidate(), and VerticalDimension().
|
protectednoexcept |
/RAFL:100AGL-FL230
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::CheckForAnyDelimeter(), usmtf::FFIRN_Validator::IsInRange(), IsValidAltitudeUOM(), IsValidFlightLevelIndicator(), IsValidRelativeAltitude(), mAltitudeMeasurement, usmtf::FFIRN_Validator::mField, mFlightIndicator, mMaxAltitude, and mMinAltitude.
Referenced by ParseAndValidate(), and VerticalDimension().
|
protectednoexcept |
/RARA:000AGL-020AGL
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::CheckForAnyDelimeter(), usmtf::FFIRN_Validator::IsInRange(), IsValidAltitudeUOM(), IsValidRelativeAltitude(), mAltitudeMeasurement, usmtf::FFIRN_Validator::mField, mMaxAltitude, and mMinAltitude.
Referenced by ParseAndValidate(), and VerticalDimension().
|
overridevirtual |
I am not a huge fan of violating command query separation. But, in this case it makes sense. The functions that come into ParseAndValidate have to parse to get value of the component, sometimes there are many components in a single field. Unfortunately parsing is an intertwined attribute of validation. You cant parse according to some rule set if the field is invalid, making it impossible to separate the two notions easily. I have opted to instead name the functions for what they are actually doing. Parsing components and validating them as well. Optionally members can be set within the function as well.
Implements usmtf::FFIRN_Validator.
References usmtf::ffirn_descriptors::cBRFL, usmtf::ffirn_descriptors::cBRRA, usmtf::ffirn_descriptors::cFLFL, usmtf::ffirn_descriptors::cRAFL, usmtf::ffirn_descriptors::cRARA, IsValidVerticalDimensionBaseToFlightLevel(), IsValidVerticalDimensionBaseToRelativeAlt(), IsValidVerticalDimensionFlightLevelToFlightLevel(), IsValidVerticalDimensionRelativeAltToFlightLevel(), IsValidVerticalDimensionRelativeAltToRelativeAlt(), usmtf::FFIRN_Validator::SetField(), and usmtf::FFIRN_Validator::ValidateByDescriptor().
Referenced by VerticalDimension().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |