Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Kernel::DateTimeValidator Class Reference

Checks that a string contains a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) More...

#include <DateTimeValidator.h>

Inheritance diagram for Mantid::Kernel::DateTimeValidator:

Public Member Functions

void allowEmpty (const bool &)
 Sets the value of the m_allowEmpty variable. More...
 
IValidator_sptr clone () const override
 Clone the current state. More...
 
 DateTimeValidator ()
 

Private Member Functions

std::string checkValidity (const std::string &value) const override
 Checks the value is valid. More...
 

Private Attributes

bool m_allowedEmpty
 Allows for an empty string to be accepted as input. More...
 

Detailed Description

Checks that a string contains a timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)

Definition at line 20 of file DateTimeValidator.h.

Constructor & Destructor Documentation

◆ DateTimeValidator()

Mantid::Kernel::DateTimeValidator::DateTimeValidator ( )

Definition at line 22 of file DateTimeValidator.cpp.

References m_allowedEmpty.

Member Function Documentation

◆ allowEmpty()

void Mantid::Kernel::DateTimeValidator::allowEmpty ( const bool &  allow)

Sets the value of the m_allowEmpty variable.

Parameters
allowThe new value of m_allowEmpty

Definition at line 28 of file DateTimeValidator.cpp.

References m_allowedEmpty.

◆ checkValidity()

std::string Mantid::Kernel::DateTimeValidator::checkValidity ( const std::string &  value) const
overrideprivate

Checks the value is valid.

Parameters
valueA string to check for an ISO formatted timestamp
Returns
An empty string if the value is valid or an string containing a description of the error otherwise

Definition at line 35 of file DateTimeValidator.cpp.

References error, m_allowedEmpty, UNUSED_ARG, and value.

◆ clone()

IValidator_sptr Mantid::Kernel::DateTimeValidator::clone ( ) const
override

Clone the current state.

Returns
A clone of the current state of the validator

Definition at line 20 of file DateTimeValidator.cpp.

Member Data Documentation

◆ m_allowedEmpty

bool Mantid::Kernel::DateTimeValidator::m_allowedEmpty
private

Allows for an empty string to be accepted as input.

Definition at line 34 of file DateTimeValidator.h.

Referenced by allowEmpty(), checkValidity(), and DateTimeValidator().


The documentation for this class was generated from the following files: