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

DirectoryValidator is a validator that checks that a directory path is valid. More...

#include <DirectoryValidator.h>

Inheritance diagram for Mantid::Kernel::DirectoryValidator:
Mantid::Kernel::FileValidator

Public Member Functions

std::vector< std::string > allowedValues () const override
 Returns the set of valid values. More...
 
IValidator_sptr clone () const override
 Clone the validator. More...
 
 DirectoryValidator (bool testDirectoryExists=true)
 Constructor. More...
 
- Public Member Functions inherited from Mantid::Kernel::FileValidator
std::vector< std::string > allowedValues () const override
 Returns the set of valid values. More...
 
IValidator_sptr clone () const override
 Clone the validator. More...
 
 FileValidator (const std::vector< std::string > &extensions=std::vector< std::string >(), bool testFileExists=true)
 Constructor. More...
 

Private Member Functions

std::string checkValidity (const std::string &value) const override
 If m_fullTest=true if checks that the files exists, otherwise just that path syntax looks valid. More...
 

Additional Inherited Members

- Protected Attributes inherited from Mantid::Kernel::FileValidator
std::vector< std::string > m_extensions
 The list of permitted extensions. More...
 
bool m_testExist
 Flag indicating whether to test for existence of filename. More...
 

Detailed Description

DirectoryValidator is a validator that checks that a directory path is valid.

Author
Janik Zikovsky, SNS
Date
Nov 12, 2010

Definition at line 27 of file DirectoryValidator.h.

Constructor & Destructor Documentation

◆ DirectoryValidator()

Mantid::Kernel::DirectoryValidator::DirectoryValidator ( bool  testDirectoryExists = true)
explicit

Constructor.

Parameters
testDirectoryExists:: Flag indicating whether to test for existence of directory (default: yes)

Definition at line 20 of file DirectoryValidator.cpp.

References Mantid::Kernel::FileValidator::m_testExist.

Member Function Documentation

◆ allowedValues()

std::vector< std::string > Mantid::Kernel::DirectoryValidator::allowedValues ( ) const
override

Returns the set of valid values.

Definition at line 25 of file DirectoryValidator.cpp.

◆ checkValidity()

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

If m_fullTest=true if checks that the files exists, otherwise just that path syntax looks valid.

Parameters
value:: file name
Returns
An error message to display to users or an empty string on no error

Definition at line 38 of file DirectoryValidator.cpp.

References Mantid::Kernel::FileValidator::m_testExist, and value.

◆ clone()

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

Clone the validator.

Returns
A pointer to a new validator with the same properties as this one

Definition at line 31 of file DirectoryValidator.cpp.


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