|
| using | FFIRN_Func = std::function<bool(void)> |
| using | FFIRN_DescriptorMap = std::unordered_map<std::string, FFIRN_Func> |
| 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 |
| static const std::string | cAny = R"((.*))" |
| static const std::string | c00to90 = R"(([0-8][0-9]|90))" |
| static const std::string | c00to59 = R"(([0-5][0-9]))" |
| static const std::string | c00to59dec000to999 = R"(([0-5][0-9])(.)([0-9]{3}))" |
| static const std::string | c00to59dec0to9 = R"(([0-5][0-9])(.)([0-9]{1}))" |
| static const std::string | c01to60 = R"(([0-5][1-9]|10|20|30|40|50|60))" |
| static const std::string | cNorS = R"((N|S))" |
| static const std::string | cAtoZ = R"((A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z))" |
| static const std::string | c0to9 = R"(([0-9]))" |
| static const std::string | cHyphenDelimeter = R"((-))" |
| static const std::string | c000to180 = R"((0[0-9]{2}|1[0-7][0-9]|180))" |
| static const std::string | c000to359 = R"((0[0-9]{2}|1[0-9]{2}|2[0-9]{2}|3[0-5][0-9]))" |
| static const std::string | c0to999 = R"(([0-9]{1,3}))" |
| static const std::string | c1to999 = R"(([1-9][0-9]{0,2}))" |
| static const std::string | c000to99999 = R"(([0-9]{3,5}))" |
| static const std::string | cEorW = R"((E|W))" |
| static const std::string | cStart = R"(^)" |
| static const std::string | cEnd = R"($)" |
| static const std::string | cSpace = R"( )" |
| 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 an AircrafControlAgency. Table TABLE 7 TYPE OF AIRCRAFT CONTROL AGENCY. 7A.UF.html
DATA ITEM CODE EXPLANATION (U) AIR OPERATIONS CENTER (U) AOC (U) AIR SUPPORT OPERATIONS CENTER (U) ASOC (U) AIRBORNE COMMAND, CONTROL, COMMUNICATIONS (ABCCC) (U) ABC (U) AIRBORNE WARNING AND CONTROL SYSTEM (U) AWAC (U) ASSAULT SUPPORT COORDINATOR (AIRBORNE) (U) ASCA (U) COMBAT CONTROL TEAM (U) CCT (U) COMBINED/COALITION AIR OPERATIONS CENTER (U) CAOC (U) CONTROL REPORTING CENTER (U) CRC (U) CONTROL REPORTING ELEMENT (U) CRE (U) CONTROL REPORTING POST (U) CRP (U) DIRECT AIR SUPPORT CENTER (U) DASC (U) DIRECT AIR SUPPORT CENTER (AIRBORNE) (U) DASA (U) EARLY WARNING/CONTROL SITE (MARINE) (U) EWC (U) FORWARD AIR CONTROL POST (U) FACP (U) FORWARD AIR CONTROLLER (U) FAC (U) FORWARD AIR CONTROLLER (AIRBORNE) (U) FACA (U) GROUND CONTROL INTERCEPT (U) GCI (U) HELICOPTER SUPPORT TEAM (U) HST (U) THE TEAM WHICH PROVIDES SUPPORT TO HELICOPTER OPERATIONS. (U) INITIAL TERMINAL GUIDANCE TEAM (U) ITG (U) JOINT AIR OPERATIONS CENTER (U) JAOC (U) MARINE AIR TRAFFIC CONTROL DETACHMENT (U) MATC (U) MARINE AIR TRAFFIC CONTROL MOBILE TEAM (U) MMT (U) OTHER (U) OTR (U) EXPLAIN IN FREE-TEXT SET. (U) TACTICAL AIR COMMAND CENTER (MARINE) (U) TACC (U) TACTICAL AIR CONTROL PARTY (U) TACP (U) TACTICAL AIR COORDINATOR, AIRBORNE (U) TACA (U) AN OFFICER WHO COORDINATES, FROM AN AIRCRAFT, THE ACTION OF COMBAT AIRCRAFT ENGAGED IN CLOSE SUPPORT OF GROUND OR SEA FORCES. (U) TACTICAL AIR DIRECTION CENTER (MARINE) (U) TADC (U) TACTICAL AIR OPERATIONS CENTER (MARINE) (U) TAOC
USMTF Excerpt: EXAMPLE: /CRC
| bool usmtf::AircraftControlAgency::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.
Implements usmtf::FFIRN_Validator.
References mAgency, usmtf::RegexValidator::mMatchResults, and usmtf::RegexValidator::ParseAndValidate().