Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Mantid::Kernel::Property Class Referenceabstract

Base class for properties. More...

#include <Property.h>

Inheritance diagram for Mantid::Kernel::Property:
Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > > Mantid::Kernel::PropertyWithValue< std::string > Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > > Mantid::Kernel::PropertyWithValue< std::vector< int64_t > > Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > > Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > > Mantid::Kernel::PropertyWithValue< std::vector< T > > Mantid::Kernel::PropertyWithValue< Matrix< double > > Mantid::Kernel::PropertyWithValue< PropertyManager_sptr > Mantid::Kernel::PropertyWithValue< PythonObject > Mantid::Kernel::TimeSeriesProperty< HeldType > Mantid::Kernel::TimeSeriesProperty< double > Mantid::Kernel::TimeSeriesProperty< int > Mantid::Kernel::TimeSeriesProperty< bool > Mantid::Kernel::EnumeratedStringProperty< E, names > Mantid::Kernel::PropertyWithValue< TYPE > Mantid::Kernel::TimeSeriesProperty< TYPE >

Public Member Functions

virtual std::vector< std::string > allowedValues () const
 Returns the set of valid values for this property, if such a set exists.
 
bool autoTrim () const
 Returns if the property is set to automatically trim string unput values of whitespace.
 
void clearSettings ()
 Deletes the PropertySettings object contained.
 
virtual Propertyclone () const =0
 'Virtual copy constructor'
 
virtual const PropertyHistory createHistory () const
 Create a PropertyHistory object representing the current state of the Property.
 
void createTemporaryValue ()
 Create a temporary value for this property.
 
unsigned int direction () const
 returns the direction of the property
 
bool disableReplaceWSButton () const
 Returns if the property is set to disable the creation of the "Replace Workspace" button.
 
const std::string & documentation () const
 Get the property's documentation string.
 
virtual std::string getDefault () const =0
 Get the default value for the property which is the value the property was initialised with.
 
const std::string & getGroup ()
 
virtual size_t getMemorySize () const
 
IPropertySettingsgetSettings ()
 
const IPropertySettingsgetSettings () const
 
bool hasTemporaryValue () const
 Property is using a temporary value for this property.
 
virtual bool isDefault () const =0
 Overriden function that returns if property has the same value that it was initialised with, if applicable.
 
bool isDynamicDefault () const
 Returns a flag indicating that the property's value has been set programmatically, for example, if the property has a default value which depends on the value of an upstream property.
 
virtual bool isMultipleSelectionAllowed ()
 Is Multiple Selection Allowed.
 
virtual std::string isValid () const
 Overridden function that checks whether the property, if not overriden returns "".
 
virtual bool isValueSerializable () const
 Whether the string returned by value() can be used for serialization.
 
virtual Propertymerge (Property *)
 Just returns the property (*this) unless overridden.
 
const std::string & name () const
 Get the property's name.
 
virtual Propertyoperator+= (Property const *rhs)=0
 Add to this.
 
bool remember () const
 Whether to save input values.
 
virtual void saveProperty (Nexus::File *)
 
void setAutoTrim (const bool &setting)
 Sets if the property is set to automatically trim string unput values of whitespace.
 
virtual std::string setDataItem (const std::shared_ptr< DataItem > &)=0
 Set the value of the property via a DataItem pointer.
 
void setDisableReplaceWSButton (const bool &disable)
 Sets the property to disable the creation of the "Replace Workspace" button.
 
void setDocumentation (const std::string &documentation)
 Sets the user level description of the property.
 
void setGroup (const std::string &group)
 Set the group this property belongs to.
 
void setIsDynamicDefault (const bool &flag)
 Set or clear the flag indicating whether or not the property's value has been set programmatically.
 
void setName (const std::string &name)
 Set the property's name.
 
void setRemember (bool)
 Set wheter to remeber this property input.
 
void setSettings (std::unique_ptr< IPropertySettings > settings)
 Set the PropertySettings object.
 
virtual void setUnits (const std::string &unit)
 Sets the units of the property, as a string.
 
virtual std::string setValue (const std::string &)=0
 Set the value of the property via a string.
 
virtual std::string setValueFromJson (const Json::Value &)=0
 Set the value of the property via a Json object.
 
virtual std::string setValueFromProperty (const Property &right)=0
 Set the value of the property via a reference to another property.
 
virtual int size () const
 Return the size of this property.
 
const std::string type () const
 Returns the type of the property as a string.
 
const std::type_info * type_info () const
 Get the property type_info.
 
virtual const std::string & units () const
 Returns the units of the property, if any, as a string.
 
virtual std::string value () const =0
 Returns the value of the property as a string.
 
virtual Json::Value valueAsJson () const =0
 Returns the value of the property as a Json::Value.
 
virtual std::string valueAsPrettyStr (const size_t maxLength=0, const bool collapseLists=true) const
 Returns the value of the property as a pretty printed string.
 
virtual ~Property ()
 Virtual destructor.
 

Protected Member Functions

 Property (const Property &right)
 Copy constructor.
 
 Property (std::string name, const std::type_info &type, const unsigned int &direction=Direction::Input)
 Constructor.
 

Protected Attributes

std::string m_name
 The name of the property.
 

Private Member Functions

Propertyoperator= (const Property &right)
 Private, unimplemented copy assignment operator.
 
 Property ()
 Private default constructor.
 

Private Attributes

bool m_autotrim
 Flag to determine if string inputs to the property should be automatically trimmed of whitespace.
 
const unsigned int m_direction
 Whether the property is used as input, output or both to an algorithm.
 
bool m_disableReplaceWSButton
 Flag to disable the generation of the "Replace Workspace" button on the OutputWorkspace property.
 
std::string m_documentation
 Longer, optional description of property.
 
std::string m_group
 Name of the "group" of this property, for grouping in the GUI. Default "".
 
bool m_isDynamicDefault
 Flag to indicate that the property's value has been set programmatically, for example, when a default value is dynamic and depends on an upstream property.
 
bool m_remember
 Flag whether to save input values.
 
std::unique_ptr< IPropertySettingsm_settings
 Property settings (enabled/visible)
 
const std::type_info * m_typeinfo
 The type of the property.
 
std::string m_units
 Units of the property (optional)
 

Detailed Description

Base class for properties.

Allows access without reference to templated concrete type.

Author
Russell Taylor, Tessella Support Services plc
Based on the Gaudi class of the same name (see http://proj-gaudi.web.cern.ch/proj-gaudi/)
Date
13/11/2007

Definition at line 94 of file Property.h.

Constructor & Destructor Documentation

◆ ~Property()

Mantid::Kernel::Property::~Property ( )
virtualdefault

Virtual destructor.

◆ Property() [1/3]

Mantid::Kernel::Property::Property ( std::string  name,
const std::type_info &  type,
const unsigned int &  direction = Direction::Input 
)
protected

Constructor.

Parameters
name:: The name of the property
type:: The type of the property
direction:: Whether this is a Direction::Input, Direction::Output or Direction::InOut (Input & Output) property
Exceptions
std::invalid_argumentif the name is empty

Definition at line 29 of file Property.cpp.

References m_direction, and m_name.

◆ Property() [2/3]

Mantid::Kernel::Property::Property ( const Property right)
protected

Copy constructor.

Definition at line 43 of file Property.cpp.

References m_name, m_settings, and right.

◆ Property() [3/3]

Mantid::Kernel::Property::Property ( )
private

Private default constructor.

Member Function Documentation

◆ allowedValues()

std::vector< std::string > Mantid::Kernel::Property::allowedValues ( ) const
virtual

◆ autoTrim()

bool Mantid::Kernel::Property::autoTrim ( ) const

Returns if the property is set to automatically trim string unput values of whitespace.

Returns
True/False

Definition at line 355 of file Property.cpp.

References m_autotrim.

Referenced by export_Property(), and Mantid::API::MultipleFileProperty::setValueAsMultipleFiles().

◆ clearSettings()

void Mantid::Kernel::Property::clearSettings ( )

Deletes the PropertySettings object contained.

Definition at line 115 of file Property.cpp.

References m_settings.

◆ clone()

virtual Property * Mantid::Kernel::Property::clone ( ) const
pure virtual

'Virtual copy constructor'

Implemented in Mantid::API::AlgorithmProperty, Mantid::API::FileProperty, Mantid::API::FunctionProperty, Mantid::API::IndexProperty, Mantid::API::MultipleFileProperty, Mantid::API::WorkspaceProperty< TYPE >, Mantid::Kernel::ArrayProperty< int64_t >, Mantid::Kernel::ArrayProperty< T >, Mantid::Kernel::EnumeratedStringProperty< E, names >, Mantid::Kernel::FilteredTimeSeriesProperty< double >, Mantid::Kernel::FilteredTimeSeriesProperty< HeldType >, Mantid::Kernel::MaskedProperty< TYPE >, Mantid::Kernel::MatrixProperty< TYPE >, Mantid::Kernel::PropertyManagerProperty, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::PythonInterface::PythonObjectProperty.

Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForList(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::Kernel::LogParser::createAllPeriodsLog(), Mantid::DataHandling::Load::declareLoaderProperties(), Mantid::PythonInterface::AlgorithmAdapter< BaseAlgorithm >::declarePyAlgProperty(), Mantid::DataHandling::RenameLog::exec(), Mantid::Algorithms::SampleLogsBehaviour::setSampleMap(), Mantid::Algorithms::SampleLogsBehaviour::setUpdatedSampleLogs(), and Mantid::Algorithms::SampleLogsBehaviour::updateTimeSeriesProperty().

◆ createHistory()

const PropertyHistory Mantid::Kernel::Property::createHistory ( ) const
virtual

Create a PropertyHistory object representing the current state of the Property.

Reimplemented in Mantid::API::FunctionProperty, Mantid::API::WorkspaceProperty< TYPE >, and Mantid::Kernel::MaskedProperty< TYPE >.

Definition at line 156 of file Property.cpp.

◆ createTemporaryValue()

void Mantid::Kernel::Property::createTemporaryValue ( )

Create a temporary value for this property.

Creates a temporary property value based on the memory address of the property.

Definition at line 161 of file Property.cpp.

References setValue().

◆ direction()

unsigned int Mantid::Kernel::Property::direction ( ) const
inline

◆ disableReplaceWSButton()

bool Mantid::Kernel::Property::disableReplaceWSButton ( ) const

Returns if the property is set to disable the creation of the "Replace Workspace" button.

Returns
True/False

Definition at line 368 of file Property.cpp.

References m_disableReplaceWSButton.

◆ documentation()

const std::string & Mantid::Kernel::Property::documentation ( ) const

◆ getDefault()

virtual std::string Mantid::Kernel::Property::getDefault ( ) const
pure virtual

Get the default value for the property which is the value the property was initialised with.

Implemented in Mantid::API::AlgorithmProperty, Mantid::API::FunctionProperty, Mantid::API::MultipleFileProperty, Mantid::API::WorkspaceProperty< TYPE >, Mantid::Kernel::EnumeratedStringProperty< E, names >, Mantid::Kernel::PropertyManagerProperty, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::PythonInterface::PythonObjectProperty.

Referenced by MantidQt::API::OptionsPropertyWidget::editingFinished(), export_Property(), MantidQt::API::AlgorithmDialog::getInputValue(), MantidQt::API::PropertyWidget::setPreviousValue(), MantidQt::API::BoolPropertyWidget::setValueImpl(), MantidQt::API::ListPropertyWidget::setValueImpl(), MantidQt::API::OptionsPropertyWidget::setValueImpl(), and MantidQt::API::PropertyWidget::updateIconVisibility().

◆ getGroup()

const std::string & Mantid::Kernel::Property::getGroup ( )
inline
Returns
the group this property belongs to

Definition at line 199 of file Property.h.

Referenced by export_Property().

◆ getMemorySize()

virtual size_t Mantid::Kernel::Property::getMemorySize ( ) const
inlinevirtual

◆ getSettings() [1/2]

IPropertySettings * Mantid::Kernel::Property::getSettings ( )

Definition at line 110 of file Property.cpp.

References m_settings.

◆ getSettings() [2/2]

const IPropertySettings * Mantid::Kernel::Property::getSettings ( ) const

◆ hasTemporaryValue()

bool Mantid::Kernel::Property::hasTemporaryValue ( ) const

Property is using a temporary value for this property.

Checks if the property value is a temporary one based on the memory address of the property.

Definition at line 171 of file Property.cpp.

◆ isDefault()

virtual bool Mantid::Kernel::Property::isDefault ( ) const
pure virtual

Overriden function that returns if property has the same value that it was initialised with, if applicable.

Implemented in Mantid::API::FunctionProperty, Mantid::API::IndexProperty, Mantid::API::WorkspaceProperty< TYPE >, Mantid::Kernel::EnumeratedStringProperty< E, names >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::PythonInterface::PythonObjectProperty.

Referenced by Mantid::Kernel::PropertyManager::asJson(), Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription(), Mantid::Kernel::EnabledWhenProperty::checkCriterion(), Mantid::Algorithms::NormaliseToMonitor::checkProperties(), Mantid::CurveFitting::Algorithms::PawleyFit::exec(), Mantid::DataHandling::LoadInstrument::exec(), Mantid::DataHandling::LoadParameterFile::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::exec(), Mantid::MDAlgorithms::TransposeMD::exec(), Mantid::DataHandling::LoadNexusProcessed::execLoader(), export_Property(), Mantid::Algorithms::Stitch1D::getEndOverlap(), Mantid::Algorithms::Stitch1D::getRebinParams(), Mantid::Algorithms::Stitch1D::getStartOverlap(), Mantid::API::Algorithm::isDefault(), Mantid::DataHandling::LoadILLSANS::loadMetaData(), MantidQt::API::AlgorithmDialog::saveInput(), Mantid::API::BoxControllerSettingsAlgorithm::takeDefaultsFromInstrument(), Mantid::Algorithms::Bin2DPowderDiffraction::validateInputs(), Mantid::Algorithms::NormaliseToMonitor::validateInputs(), and Mantid::MDAlgorithms::IntegrateEllipsoidsV2::validateInputs().

◆ isDynamicDefault()

bool Mantid::Kernel::Property::isDynamicDefault ( ) const

Returns a flag indicating that the property's value has been set programmatically, for example, if the property has a default value which depends on the value of an upstream property.

Definition at line 380 of file Property.cpp.

References m_isDynamicDefault.

Referenced by export_Property(), MantidQt::API::AlgorithmDialog::saveInput(), MantidQt::API::PropertyWidget::setPreviousValue(), MantidQt::API::PropertyWidget::toggleUseHistory(), MantidQt::API::PropertyWidget::transferHistoryState(), and MantidQt::API::PropertyWidget::userEditedProperty().

◆ isMultipleSelectionAllowed()

virtual bool Mantid::Kernel::Property::isMultipleSelectionAllowed ( )
inlinevirtual

◆ isValid()

std::string Mantid::Kernel::Property::isValid ( ) const
virtual

◆ isValueSerializable()

virtual bool Mantid::Kernel::Property::isValueSerializable ( ) const
inlinevirtual

Whether the string returned by value() can be used for serialization.

Reimplemented in Mantid::API::WorkspaceProperty< TYPE >.

Definition at line 143 of file Property.h.

Referenced by Mantid::Kernel::PropertyManager::asJson().

◆ merge()

virtual Property & Mantid::Kernel::Property::merge ( Property )
inlinevirtual

◆ name()

const std::string & Mantid::Kernel::Property::name ( ) const

Get the property's name.

Returns
The name of the property

Definition at line 61 of file Property.cpp.

References m_name.

Referenced by Mantid::Kernel::PropertyManager::asJson(), MantidQt::API::BoolPropertyWidget::BoolPropertyWidget(), Mantid::Algorithms::CompareWorkspaces::checkRunProperties(), Mantid::Kernel::LogFilter::convertToTimeSeriesOfDouble(), MantidQt::MantidWidgets::FitOptionsBrowser::createPropertyProperty(), MantidQt::CustomDialogs::LoadDialog::createWidgetsForProperty(), Mantid::DataHandling::Load::declareLoaderProperties(), export_Property(), Mantid::Kernel::PropertyManager::filterByProperty(), Mantid::DataHandling::Load::findFilenameProperty(), Mantid::API::IndexProperty::generatePropertyName(), Mantid::API::IndexTypeProperty::generatePropertyName(), MantidQt::API::FileDialogHandler::getCaption(), MantidQt::API::AlgorithmPropertiesWidget::hideOrDisableProperties(), MantidQt::API::isCalledInputWorkspaceOrLHSWorkspace(), Mantid::Kernel::SetValueWhenProperty::isConditionChanged(), MantidQt::API::ListPropertyWidget::ListPropertyWidget(), Mantid::Algorithms::AddLogDerivative::makeDerivative(), Mantid::Algorithms::GenerateEventsFilter::makeMultipleFiltersByValues(), Mantid::Algorithms::GenerateEventsFilter::makeMultipleFiltersByValuesParallel(), Mantid::Kernel::operator==(), Mantid::Kernel::PropertyWithValue< TYPE >::operator==(), Mantid::Kernel::EnumeratedStringProperty< E, names >::operator==(), MantidQt::API::OptionsPropertyWidget::OptionsPropertyWidget(), Mantid::Algorithms::CompareWorkspaces::processGroups(), Mantid::Algorithms::GenerateEventsFilter::processIntegerValueFilter(), Mantid::Algorithms::GenerateEventsFilter::processMultipleValueFilters(), Mantid::Algorithms::GenerateEventsFilter::processSingleValueFilter(), Mantid::Kernel::PropertyManagerProperty::PropertyManagerProperty(), MantidQt::API::PropertyWidget::PropertyWidget(), MantidQt::API::PropertyWidget::replaceWSButtonClicked(), MantidQt::API::AlgorithmDialog::setAlgorithm(), setName(), Mantid::Algorithms::CalculateCountRate::setOutLogParameters(), Mantid::DataHandling::LoadNexus::setOutputWorkspace(), Mantid::API::Algorithm::setPropertyOrdinal(), Mantid::Kernel::PropertyManager::setPropertyOrdinal(), Mantid::API::MultipleFileProperty::setValueAsSingleFile(), MantidQt::API::TextPropertyWidget::TextPropertyWidget(), and MantidQt::API::PropertyWidget::valueChangedSlot().

◆ operator+=()

virtual Property & Mantid::Kernel::Property::operator+= ( Property const *  rhs)
pure virtual

◆ operator=()

Property & Mantid::Kernel::Property::operator= ( const Property right)
private

Private, unimplemented copy assignment operator.

◆ remember()

bool Mantid::Kernel::Property::remember ( ) const

Whether to save input values.

Whether to remember this property input.

Returns
whether to remember this property's input

Definition at line 121 of file Property.cpp.

References m_remember.

Referenced by MantidQt::API::AlgorithmDialog::saveInput(), and setRemember().

◆ saveProperty()

virtual void Mantid::Kernel::Property::saveProperty ( Nexus::File *  )
inlinevirtual

Reimplemented in Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< int >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< int >, Mantid::Kernel::EnumeratedStringProperty< E, names >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, and Mantid::Kernel::TimeSeriesProperty< int >.

Definition at line 132 of file Property.h.

References name.

◆ setAutoTrim()

void Mantid::Kernel::Property::setAutoTrim ( const bool &  setting)

Sets if the property is set to automatically trim string unput values of whitespace.

Parameters
settingThe new setting value

Definition at line 362 of file Property.cpp.

References m_autotrim.

Referenced by export_Property(), Mantid::DataHandling::SaveAscii::init(), Mantid::DataHandling::SaveAscii2::init(), Mantid::DataHandling::SaveCSV::init(), and Mantid::MDAlgorithms::ConvertToMDParent::init().

◆ setDataItem()

virtual std::string Mantid::Kernel::Property::setDataItem ( const std::shared_ptr< DataItem > &  )
pure virtual

◆ setDisableReplaceWSButton()

void Mantid::Kernel::Property::setDisableReplaceWSButton ( const bool &  disable)

Sets the property to disable the creation of the "Replace Workspace" button.

Parameters
disableThe option to disable or not

Definition at line 374 of file Property.cpp.

References m_disableReplaceWSButton.

Referenced by export_Property().

◆ setDocumentation()

void Mantid::Kernel::Property::setDocumentation ( const std::string &  documentation)

Sets the user level description of the property.

In addition, if the brief documentation string is empty it will be set to the portion of the provided string up to the first period (or the entire string if no period is found).

Parameters
documentationThe string containing the descriptive comment

Definition at line 146 of file Property.cpp.

References documentation(), and m_documentation.

Referenced by Mantid::Algorithms::ExponentialCorrection::defineProperties(), export_Property(), Mantid::CurveFitting::Algorithms::DoublePulseFit::initConcrete(), Mantid::CurveFitting::Algorithms::Fit::initConcrete(), and Mantid::CurveFitting::Algorithms::QENSFitSimultaneous::initConcrete().

◆ setGroup()

void Mantid::Kernel::Property::setGroup ( const std::string &  group)
inline

Set the group this property belongs to.

Definition at line 196 of file Property.h.

References group.

Referenced by Mantid::Kernel::IPropertyManager::setPropertyGroup().

◆ setIsDynamicDefault()

void Mantid::Kernel::Property::setIsDynamicDefault ( const bool &  flag)

◆ setName()

void Mantid::Kernel::Property::setName ( const std::string &  name)

Set the property's name.

Parameters
name:: The name of the property

Definition at line 66 of file Property.cpp.

References m_name, and name().

◆ setRemember()

void Mantid::Kernel::Property::setRemember ( bool  remember)

Set wheter to remeber this property input.

Parameters
remember:: true to remember

Definition at line 127 of file Property.cpp.

References m_remember, and remember().

Referenced by Mantid::Kernel::MaskedProperty< TYPE >::MaskedProperty(), and Mantid::Kernel::MaskedProperty< TYPE >::MaskedProperty().

◆ setSettings()

void Mantid::Kernel::Property::setSettings ( std::unique_ptr< IPropertySettings settings)

Set the PropertySettings object.

Set the PropertySettings determining when this property is visible/enabled.

Takes ownership of the given object

Parameters
settingsA pointer to an object specifying the settings type

Definition at line 103 of file Property.cpp.

References m_settings.

◆ setUnits()

void Mantid::Kernel::Property::setUnits ( const std::string &  unit)
virtual

◆ setValue()

virtual std::string Mantid::Kernel::Property::setValue ( const std::string &  )
pure virtual

Set the value of the property via a string.

If the value is unacceptable the value is not changed but a string is returned

Implemented in Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< int >, Mantid::API::FileProperty, Mantid::API::MultipleFileProperty, Mantid::Kernel::PropertyManagerProperty, Mantid::API::AlgorithmProperty, Mantid::API::FunctionProperty, Mantid::API::WorkspaceProperty< TYPE >, Mantid::Kernel::ArrayProperty< int64_t >, Mantid::Kernel::ArrayProperty< T >, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::EnumeratedStringProperty< E, names >, and Mantid::PythonInterface::PythonObjectProperty.

Referenced by createTemporaryValue(), export_Property(), Mantid::API::Run::operator+=(), Mantid::DataHandling::LegacyLoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), Mantid::API::Run::setDuration(), Mantid::Kernel::PropertyManager::setPropertyOrdinal(), Mantid::API::Run::setProtonCharge(), and MantidQt::API::PropertyWidget::updateIconVisibility().

◆ setValueFromJson()

virtual std::string Mantid::Kernel::Property::setValueFromJson ( const Json::Value &  )
pure virtual

◆ setValueFromProperty()

virtual std::string Mantid::Kernel::Property::setValueFromProperty ( const Property right)
pure virtual

◆ size()

int Mantid::Kernel::Property::size ( ) const
virtual

◆ type()

const std::string Mantid::Kernel::Property::type ( ) const

◆ type_info()

const std::type_info * Mantid::Kernel::Property::type_info ( ) const

Get the property type_info.

Returns
The type of the property

Definition at line 81 of file Property.cpp.

References m_typeinfo.

◆ units()

const std::string & Mantid::Kernel::Property::units ( ) const
virtual

Returns the units of the property, if any, as a string.

Units are optional, and will return empty string if they have not been set before.

Returns
the property's units

Definition at line 191 of file Property.cpp.

References m_units.

Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForList(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::Algorithms::PDDetermineCharacterizations::getLogValue(), Mantid::API::Run::integrateProtonCharge(), and Mantid::Algorithms::SampleLogsBehaviour::mergeSampleLogs().

◆ value()

virtual std::string Mantid::Kernel::Property::value ( ) const
pure virtual

Returns the value of the property as a string.

Implemented in Mantid::API::AlgorithmProperty, Mantid::API::FunctionProperty, Mantid::API::MultipleFileProperty, Mantid::API::WorkspaceProperty< TYPE >, Mantid::Kernel::ArrayProperty< int64_t >, Mantid::Kernel::ArrayProperty< T >, Mantid::Kernel::EnumeratedStringProperty< E, names >, Mantid::Kernel::PropertyManagerProperty, Mantid::Kernel::PropertyWithValue< TYPE >, Mantid::Kernel::PropertyWithValue< Matrix< double > >, Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >, Mantid::Kernel::PropertyWithValue< PythonObject >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IAlgorithm > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< IFunction > >, Mantid::Kernel::PropertyWithValue< std::shared_ptr< MatrixWorkspace > >, Mantid::Kernel::PropertyWithValue< std::string >, Mantid::Kernel::PropertyWithValue< std::vector< int64_t > >, Mantid::Kernel::PropertyWithValue< std::vector< std::vector< std::string > > >, Mantid::Kernel::PropertyWithValue< std::vector< T > >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< HeldType >, and Mantid::Kernel::TimeSeriesProperty< int >.

Referenced by Mantid::Kernel::SetValueWhenProperty::applyChanges(), MantidQt::API::BoolPropertyWidget::BoolPropertyWidget(), Mantid::API::EnabledWhenWorkspaceIsType< T >::checkCriterion(), Mantid::Algorithms::SampleLogsBehaviour::checkErrorProperty(), Mantid::API::AlgorithmHasProperty::checkValidity(), Mantid::Algorithms::SampleLogsBehaviour::checkWarnProperty(), MantidQt::MantidWidgets::FitOptionsBrowser::createPropertyProperty(), Mantid::DataHandling::SaveCanSAS1D::createSASProcessElement(), Mantid::DataHandling::SaveCanSAS1D2::createSASProcessElement(), Mantid::DataHandling::SaveCanSAS1D::createSASRunElement(), Mantid::MDAlgorithms::SlicingAlgorithm::createTransform(), MantidQt::CustomDialogs::LoadDialog::createWidgetsForProperty(), Mantid::Algorithms::MonteCarloAbsorption::doSimulation(), Mantid::Algorithms::CreateLogPropertyTable::exec(), Mantid::DataHandling::LoadInstrument::exec(), Mantid::MDAlgorithms::CalculateCoverageDGS::exec(), Mantid::MDAlgorithms::MDNorm::exec(), Mantid::MDAlgorithms::PreprocessDetectorsToMD::exec(), export_Property(), Mantid::Algorithms::NormaliseByCurrent::extractCharge(), MantidQt::API::FilePropertyWidget::FilePropertyWidget(), Mantid::DataHandling::SaveGSS::generateInstrumentHeader(), Mantid::MDAlgorithms::MDNorm::getBinParameters(), MantidQt::API::FindFilesWorker::getFilesFromAlgorithm(), Mantid::API::MatrixWorkspace::getPlotType(), Mantid::API::LogManager::getPropertyAsIntegerValue(), Mantid::Kernel::EnabledWhenProperty::getPropertyValue(), Mantid::Kernel::PropertyManager::getPropertyValue(), Mantid::API::ExperimentInfo::getRunNumber(), Mantid::Algorithms::ConvertToConstantL2::getRunProperty(), Mantid::API::MatrixWorkspace::getTitle(), Mantid::API::WorkspaceGroup::isMultiperiod(), MantidQt::API::ListPropertyWidget::ListPropertyWidget(), Mantid::DataHandling::LoadMuonStrategy::loadDefaultDetectorGrouping(), Mantid::Kernel::operator==(), MantidQt::API::OptionsPropertyWidget::OptionsPropertyWidget(), Mantid::API::MultiPeriodGroupWorker::processGroups(), Mantid::Algorithms::CompareWorkspaces::processGroups(), MantidQt::API::AlgorithmPropertiesWidget::replaceWSClicked(), Mantid::Algorithms::DetectorEfficiencyCorUser::retrieveProperties(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::Algorithms::SampleLogsBehaviour::stringPropertiesMatch(), MantidQt::API::TextPropertyWidget::TextPropertyWidget(), MantidQt::API::PropertyWidget::transferHistoryState(), Mantid::Algorithms::SampleLogsBehaviour::updateListProperty(), Mantid::API::MultiPeriodGroupWorker::validateMultiPeriodGroupInputs(), and valueAsPrettyStr().

◆ valueAsJson()

virtual Json::Value Mantid::Kernel::Property::valueAsJson ( ) const
pure virtual

◆ valueAsPrettyStr()

std::string Mantid::Kernel::Property::valueAsPrettyStr ( const size_t  maxLength = 0,
const bool  collapseLists = true 
) const
virtual

Member Data Documentation

◆ m_autotrim

bool Mantid::Kernel::Property::m_autotrim
private

Flag to determine if string inputs to the property should be automatically trimmed of whitespace.

Definition at line 245 of file Property.h.

Referenced by autoTrim(), and setAutoTrim().

◆ m_direction

const unsigned int Mantid::Kernel::Property::m_direction
private

Whether the property is used as input, output or both to an algorithm.

Definition at line 227 of file Property.h.

Referenced by Property().

◆ m_disableReplaceWSButton

bool Mantid::Kernel::Property::m_disableReplaceWSButton
private

Flag to disable the generation of the "Replace Workspace" button on the OutputWorkspace property.

Definition at line 248 of file Property.h.

Referenced by disableReplaceWSButton(), and setDisableReplaceWSButton().

◆ m_documentation

std::string Mantid::Kernel::Property::m_documentation
private

Longer, optional description of property.

Definition at line 223 of file Property.h.

Referenced by documentation(), and setDocumentation().

◆ m_group

std::string Mantid::Kernel::Property::m_group
private

Name of the "group" of this property, for grouping in the GUI. Default "".

Definition at line 235 of file Property.h.

◆ m_isDynamicDefault

bool Mantid::Kernel::Property::m_isDynamicDefault
private

Flag to indicate that the property's value has been set programmatically, for example, when a default value is dynamic and depends on an upstream property.

Definition at line 252 of file Property.h.

Referenced by isDynamicDefault(), and setIsDynamicDefault().

◆ m_name

std::string Mantid::Kernel::Property::m_name
protected

The name of the property.

Definition at line 216 of file Property.h.

Referenced by name(), Property(), Property(), and setName().

◆ m_remember

bool Mantid::Kernel::Property::m_remember
private

Flag whether to save input values.

Definition at line 241 of file Property.h.

Referenced by remember(), and setRemember().

◆ m_settings

std::unique_ptr<IPropertySettings> Mantid::Kernel::Property::m_settings
private

Property settings (enabled/visible)

Definition at line 232 of file Property.h.

Referenced by clearSettings(), getSettings(), getSettings(), Property(), and setSettings().

◆ m_typeinfo

const std::type_info* Mantid::Kernel::Property::m_typeinfo
private

The type of the property.

Definition at line 225 of file Property.h.

Referenced by type(), and type_info().

◆ m_units

std::string Mantid::Kernel::Property::m_units
private

Units of the property (optional)

Definition at line 229 of file Property.h.

Referenced by setUnits(), and units().


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