|
WSF
|
#include <TimePoint.hpp>


Public Member Functions | |
| TimePoint (bool aTimeQualifersAllowed=false) noexcept | |
| bool | ParseAndValidate (const Field &aField) override |
| const std::string & | GetDay () const noexcept |
| const std::string & | GetMonth () const noexcept |
| const std::string & | GetYear () const noexcept |
| const std::string & | GetTimeZone () const noexcept |
| const std::string & | GetMinute () const noexcept |
| const std::string & | GetHour () const noexcept |
| const std::string & | GetStopTimeQualifier () 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 | IsValidStopTimeQualifier () noexcept |
| bool | IsValidDateTimeGroup () noexcept |
| bool | IsValidDayTimeMonth () noexcept |
| bool | IsValidDayTime () noexcept |
| bool | IsValidDay (const std::string &aDay) noexcept |
| bool | IsValidHour (const std::string &aHour) noexcept |
| bool | IsValidMinuteOrSecond (const std::string &aUnit) noexcept |
| bool | IsValidTimeZone (const std::string &aTimeZone) noexcept |
| bool | IsValidMonthName (const std::string &aMonth) noexcept |
| bool | IsValidYear (const std::string &aYear) noexcept |
| bool | ValidateDayTime (const std::string &aDayTime) 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 | |
| bool | mTimeQualifersAllowed |
| std::string | mStopTimeQualifier |
| std::string | mDay |
| std::string | mHour |
| std::string | mMinute |
| std::string | mTimeZone |
| std::string | mMonth |
| std::string | mYear |
| 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 TimePoint. A TimePoint is a field that indicates a point in time. It has many forms, they are fairly self explanatory, but the sheer number of options can be confusing.
TimePoint | | | | v v v v APERIOD/DISCRETE/141325ZFEB/142359ZFEB//
|
noexcept |
References mTimeQualifersAllowed.
Referenced by usmtf::VerifiedTimePoint::VerifiedTimePoint().
|
noexcept |
References mDay.
|
noexcept |
References mHour.
|
noexcept |
References mMinute.
|
noexcept |
References mMonth.
|
noexcept |
References mStopTimeQualifier.
|
noexcept |
References mTimeZone.
|
noexcept |
References mYear.
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::IsStringLength(), IsValidDay(), IsValidHour(), IsValidMinuteOrSecond(), IsValidMonthName(), IsValidTimeZone(), IsValidYear(), mDay, usmtf::FFIRN_Validator::mField, mHour, mMinute, mMonth, mTimeZone, and mYear.
Referenced by usmtf::IntervalDuration::ParseAndValidate(), ParseAndValidate(), and usmtf::VerifiedTimePoint::ParseAndValidate().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), and usmtf::FFIRN_Validator::IsInRange().
Referenced by IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protectednoexcept |
References usmtf::FFIRN_Validator::mField, and ValidateDayTime().
Referenced by usmtf::VerifiedTimePoint::ParseAndValidate().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), usmtf::FFIRN_Validator::IsStringLength(), IsValidDay(), IsValidHour(), IsValidMinuteOrSecond(), IsValidMonthName(), IsValidTimeZone(), mDay, usmtf::FFIRN_Validator::mField, mHour, mMinute, mMonth, and mTimeZone.
Referenced by ParseAndValidate(), and usmtf::VerifiedTimePoint::ParseAndValidate().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), and usmtf::FFIRN_Validator::IsInRange().
Referenced by IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), and usmtf::FFIRN_Validator::IsInRange().
Referenced by IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protectednoexcept |
|
protectednoexcept |
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), and usmtf::FFIRN_Validator::IsInSelection().
Referenced by IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protectednoexcept |
References usmtf::ErrorManager::AddError(), and usmtf::FFIRN_Validator::IsInRange().
Referenced by IsValidDateTimeGroup().
|
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.
Reimplemented in usmtf::VerifiedTimePoint.
References usmtf::FFIRN_Validator::ClearErrorsIfValid(), IsValidDateTimeGroup(), IsValidDayTimeMonth(), IsValidStopTimeQualifier(), mTimeQualifersAllowed, and usmtf::FFIRN_Validator::SetField().
|
protectednoexcept |
|
protected |
Referenced by GetDay(), IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protected |
Referenced by GetHour(), IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protected |
Referenced by GetMinute(), IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protected |
Referenced by GetMonth(), IsValidDateTimeGroup(), and IsValidDayTimeMonth().
|
protected |
Referenced by GetStopTimeQualifier(), and IsValidStopTimeQualifier().
|
protected |
Referenced by ParseAndValidate(), usmtf::VerifiedTimePoint::ParseAndValidate(), and TimePoint().
|
protected |
Referenced by GetTimeZone(), IsValidDateTimeGroup(), IsValidDayTimeMonth(), and ValidateDayTime().
|
protected |
Referenced by GetYear(), and IsValidDateTimeGroup().