|
| using | FFIRN_Func = std::function<bool(void)> |
| using | FFIRN_DescriptorMap = std::unordered_map<std::string, FFIRN_Func> |
| static std::string | GetFormattedLatLon (const UtLLPos &position) noexcept |
| 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 |
| void | SetUtLLPos () noexcept |
| bool | IsValidLatLonMinutes () noexcept |
| bool | IsValidLatLonSeconds () noexcept |
| bool | IsValidLattitudinalDegree (const std::string &aValue) noexcept |
| bool | IsValidLongitudinalDegree (const std::string &aValue) noexcept |
| bool | IsValidMinuteOrSecond (const std::string &aValue) noexcept |
| bool | IsValidLattitudinalHemisphere (const std::string &aValue) noexcept |
| bool | IsValidLongitudinalHemisphere (const std::string &aValue) noexcept |
| 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.
|
| 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 |
FFIRN_Validator responsible for the validation and property extraction of a NamedLocation. It comes in several forms.
USMTF Excerpt: A.Geographic Location, LAT / LONG, MINUTES/Seconds // this is delegated to base LatLon B. Place Name, a literal string where meaning must be provided by user C. ICAO BASE CODE, A known value with a known spherical location.
| bool usmtf::NamedLocation::ParseAndValidate |
( |
const Field & | aField | ) |
|
|
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.
Reimplemented from usmtf::LatLon.
References usmtf::Field::GetContent(), usmtf::LatLon::GetFormattedLatLon(), mICAOService, mIsFreeForm, mLocation, and usmtf::LatLon::ParseAndValidate().
Referenced by NamedLocation().