12#include "MantidAPI/DllConfig.h"
22#pragma warning(disable : 4522)
59 FileProperty(
const std::string &name,
const std::string &defaultValue,
unsigned int action,
60 const std::vector<std::string> &exts = std::vector<std::string>(),
61 unsigned int direction = Kernel::Direction::Input);
63 FileProperty(
const std::string &name,
const std::string &default_value,
unsigned int action,
const std::string &ext,
64 unsigned int direction = Kernel::Direction::Input);
66 FileProperty(
const std::string &name,
const std::string &default_value,
unsigned int action,
67 std::initializer_list<std::string> exts,
unsigned int direction = Kernel::Direction::Input);
76 bool isLoadProperty()
const;
78 bool isSaveProperty()
const;
80 bool isDirectoryProperty()
const;
82 bool isOptional()
const;
84 std::string setValue(
const std::string &propValue)
override;
87 std::string isValid()
const override;
97 std::string isEmptyValueValid()
const;
100 bool extsMatchRunFiles();
102 std::string setLoadProperty(
const std::string &propValue);
104 std::string setSaveProperty(
const std::string &propValue);
A specialized class for dealing with file properties.
unsigned int m_action
The action type of this property, i.e. load/save.
FileProperty(const FileProperty &)=default
FileProperty & operator=(const FileProperty &)=default
std::string m_oldLoadPropValue
Last value of propValue used in FileProperty::setLoadProperty.
bool m_runFileProp
Is this property for run files?
std::string m_oldLoadFoundFile
Last value of foundFile used in FileProperty::setLoadProperty.
std::string getDefaultExt() const
Returns the main file extension that's used.
FileProperty * clone() const override
'Virtual copy constructor
std::string m_defaultExt
The default file extension associated with the type of file this property will handle.
FileAction
An enumeration for load/save types.
Loads a workspace from a data file.
The concrete, templated class for properties.
Helper class which provides the Collimation Length for SANS instruments.