|
Teuchos - Trilinos Tools Package
Version of the Day
|
Validate a file name entry. More...
#include <Teuchos_StandardParameterEntryValidators.hpp>
Public Member Functions | |
Constructors/Destructor | |
| FileNameValidator (bool mustAlreadyExist=mustAlreadyExistDefault()) | |
| Constructs a FileNameValidator. | |
Attribute/Query Functions | |
| bool | fileMustExist () const |
| Gets the variable describing whether or not this validator wants the file that is specified to already exist. | |
| bool | fileEmptyNameOK () const |
| Gets the variable describing whether or not this validator is OK with file name being empty (even if fileMustExist() returns true). | |
Setter Functions | |
| bool | setFileMustExist (bool shouldFileExist) |
| Sets whether or not the validator requires the file to already exist. | |
| bool | setFileEmptyNameOK (bool isEmptyNameOK) |
| Sets whether or not the validator is OK with empty file name (even if fileMustExist() returns true) | |
Overridden from ParameterEntryValidator | |
| ValidStringsList | validStringValues () const |
| | |
| void | validate (ParameterEntry const &entry, std::string const ¶mName, std::string const &sublistName) const |
| | |
| const std::string | getXMLTypeName () const |
| | |
| void | printDoc (std::string const &docString, std::ostream &out) const |
| | |
Static Public Member Functions | |
Public types | |
| static bool | mustAlreadyExistDefault () |
| The default value of the mustAlreadyExist parameter in the constructor. | |
Validate a file name entry.
Simply indicates that the parameter entry with this validator should contain a filename.
Please see FileNameValidatorXMLConverter for documenation regarding the XML representation of this validator.
Definition at line 1440 of file Teuchos_StandardParameterEntryValidators.hpp.
| Teuchos::FileNameValidator::FileNameValidator | ( | bool | mustAlreadyExist = mustAlreadyExistDefault() | ) |
Constructs a FileNameValidator.
| mustAlreadyExist | True if the file the user specifies should already exists, false otherwise. |
Definition at line 389 of file Teuchos_StandardParameterEntryValidators.cpp.
| static bool Teuchos::FileNameValidator::mustAlreadyExistDefault | ( | ) | [inline, static] |
The default value of the mustAlreadyExist parameter in the constructor.
Definition at line 1449 of file Teuchos_StandardParameterEntryValidators.hpp.
| bool Teuchos::FileNameValidator::fileMustExist | ( | ) | const |
Gets the variable describing whether or not this validator wants the file that is specified to already exist.
Definition at line 395 of file Teuchos_StandardParameterEntryValidators.cpp.
| bool Teuchos::FileNameValidator::fileEmptyNameOK | ( | ) | const |
Gets the variable describing whether or not this validator is OK with file name being empty (even if fileMustExist() returns true).
Note: This property of the validator is not persistent. It is not saved or retrieved. Its purpose is to work around the fact that an input file name, for which user has not given the name by selecting in a GUI, is empty.
Definition at line 400 of file Teuchos_StandardParameterEntryValidators.cpp.
| bool Teuchos::FileNameValidator::setFileMustExist | ( | bool | shouldFileExist | ) |
Sets whether or not the validator requires the file to already exist.
| shouldFileExist | True if the file should already exist, false otherwise. |
Definition at line 405 of file Teuchos_StandardParameterEntryValidators.cpp.
| bool Teuchos::FileNameValidator::setFileEmptyNameOK | ( | bool | isEmptyNameOK | ) |
Sets whether or not the validator is OK with empty file name (even if fileMustExist() returns true)
| isEmptyNameOK | True if empty name is all right, false otherwise. |
Definition at line 411 of file Teuchos_StandardParameterEntryValidators.cpp.
| ParameterEntryValidator::ValidStringsList Teuchos::FileNameValidator::validStringValues | ( | ) | const [virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 418 of file Teuchos_StandardParameterEntryValidators.cpp.
| void Teuchos::FileNameValidator::validate | ( | ParameterEntry const & | entry, |
| std::string const & | paramName, | ||
| std::string const & | sublistName | ||
| ) | const [virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 424 of file Teuchos_StandardParameterEntryValidators.cpp.
| const std::string Teuchos::FileNameValidator::getXMLTypeName | ( | ) | const [virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 454 of file Teuchos_StandardParameterEntryValidators.cpp.
| void Teuchos::FileNameValidator::printDoc | ( | std::string const & | docString, |
| std::ostream & | out | ||
| ) | const [virtual] |
Implements Teuchos::ParameterEntryValidator.
Definition at line 460 of file Teuchos_StandardParameterEntryValidators.cpp.
1.7.6.1