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::TimeSeriesProperty< HeldType > Mantid::Kernel::TimeSeriesProperty< double > Mantid::Kernel::TimeSeriesProperty< int > Mantid::Kernel::TimeSeriesProperty< bool > 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. More...
 
bool autoTrim () const
 Returns if the property is set to automatically trim string unput values of whitespace. More...
 
void clearSettings ()
 Deletes the PropertySettings object contained. More...
 
virtual Propertyclone () const =0
 'Virtual copy constructor' More...
 
virtual const PropertyHistory createHistory () const
 Create a PropertyHistory object representing the current state of the Property. More...
 
void createTemporaryValue ()
 Create a temporary value for this property. More...
 
unsigned int direction () const
 returns the direction of the property More...
 
const std::string & documentation () const
 Get the property's documentation string. More...
 
virtual void filterByTime (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &stop)
 Filter out a property by time. More...
 
virtual std::string getDefault () const =0
 Get the default value for the property which is the value the property was initialised with. More...
 
const std::string & getGroup ()
 
virtual size_t getMemorySize () const
 
IPropertySettingsgetSettings ()
 
bool hasTemporaryValue () const
 Property is using a temporary value for this property. More...
 
virtual bool isDefault () const =0
 Overriden function that returns if property has the same value that it was initialised with, if applicable. More...
 
virtual bool isMultipleSelectionAllowed ()
 Is Multiple Selection Allowed. More...
 
virtual std::string isValid () const
 Overridden function that checks whether the property, if not overriden returns "". More...
 
virtual bool isValueSerializable () const
 Whether the string returned by value() can be used for serialization. More...
 
virtual Propertymerge (Property *)
 Just returns the property (*this) unless overridden. More...
 
const std::string & name () const
 Get the property's name. More...
 
virtual Propertyoperator+= (Property const *rhs)=0
 Add to this. More...
 
bool remember () const
 Whether to save input values. More...
 
virtual void saveProperty (::NeXus::File *)
 
void setAutoTrim (const bool &setting)
 Sets if the property is set to automatically trim string unput values of whitespace. More...
 
virtual std::string setDataItem (const std::shared_ptr< DataItem > &)=0
 Set the value of the property via a DataItem pointer. More...
 
void setDocumentation (const std::string &documentation)
 Sets the user level description of the property. More...
 
void setGroup (const std::string &group)
 Set the group this property belongs to. More...
 
void setRemember (bool)
 Set wheter to remeber this property input. More...
 
void setSettings (std::unique_ptr< IPropertySettings > settings)
 Set the PropertySettings object. More...
 
virtual void setUnits (const std::string &unit)
 Sets the units of the property, as a string. More...
 
virtual std::string setValue (const std::string &)=0
 Set the value of the property via a string. More...
 
virtual std::string setValueFromJson (const Json::Value &)=0
 Set the value of the property via a Json object. More...
 
virtual std::string setValueFromProperty (const Property &right)=0
 Set the value of the property via a reference to another property. More...
 
virtual int size () const
 Return the size of this property. More...
 
virtual void splitByTime (std::vector< SplittingInterval > &splitter, std::vector< Property * > outputs, bool isProtonCharge=true) const
 Split a property by time. More...
 
const std::string type () const
 Returns the type of the property as a string. More...
 
const std::type_info * type_info () const
 Get the property type_info. More...
 
virtual const std::string & units () const
 Returns the units of the property, if any, as a string. More...
 
virtual std::string value () const =0
 Returns the value of the property as a string. More...
 
virtual Json::Value valueAsJson () const =0
 Returns the value of the property as a Json::Value. More...
 
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. More...
 
virtual ~Property ()
 Virtual destructor. More...
 

Protected Member Functions

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

Protected Attributes

std::string m_name
 The name of the property. More...
 

Private Member Functions

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

Private Attributes

bool m_autotrim
 Flag to determine if string inputs to the property should be automatically trimmed of whitespace. More...
 
const unsigned int m_direction
 Whether the property is used as input, output or both to an algorithm. More...
 
std::string m_documentation
 Longer, optional description of property. More...
 
std::string m_group
 Name of the "group" of this property, for grouping in the GUI. Default "". More...
 
bool m_remember
 Flag whether to save input values. More...
 
std::unique_ptr< IPropertySettingsm_settings
 Property settings (enabled/visible) More...
 
const std::type_info * m_typeinfo
 The type of the property. More...
 
std::string m_units
 Units of the property (optional) More...
 

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 364 of file Property.cpp.

References m_autotrim.

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

◆ clearSettings()

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

Deletes the PropertySettings object contained.

Definition at line 103 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< T >, Mantid::Kernel::ArrayProperty< int64_t >, Mantid::Kernel::MaskedProperty< TYPE >, Mantid::Kernel::MatrixProperty< TYPE >, Mantid::Kernel::PropertyManagerProperty, Mantid::Kernel::PropertyWithValue< TYPE >, 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::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Referenced by Mantid::Algorithms::SampleLogsBehaviour::addPropertyForList(), Mantid::Algorithms::SampleLogsBehaviour::addPropertyForTimeSeries(), Mantid::DataHandling::Load::declareLoaderProperties(), Mantid::PythonInterface::AlgorithmAdapter< BaseAlgorithm >::declarePyAlgProperty(), 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 144 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 149 of file Property.cpp.

References setValue().

◆ direction()

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

◆ documentation()

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

◆ filterByTime()

void Mantid::Kernel::Property::filterByTime ( const Types::Core::DateAndTime &  start,
const Types::Core::DateAndTime &  stop 
)
virtual

Filter out a property by time.

Will be overridden by TimeSeriesProperty (only)

Parameters
start:: the beginning time to filter from
stop:: the ending time to filter to

Reimplemented in Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Definition at line 194 of file Property.cpp.

References UNUSED_ARG.

◆ 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::PropertyManagerProperty, Mantid::Kernel::PropertyWithValue< TYPE >, 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::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Referenced by BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(), MantidQt::API::OptionsPropertyWidget::editingFinished(), 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 197 of file Property.h.

Referenced by BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS().

◆ getMemorySize()

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

◆ getSettings()

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

◆ 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 159 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::PropertyWithValue< TYPE >, 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::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Referenced by Mantid::Kernel::PropertyManager::asJson(), BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(), Mantid::MDAlgorithms::ConvertToMD::buildTargetWSDescription(), Mantid::Algorithms::NormaliseToMonitor::checkProperties(), Mantid::CurveFitting::Algorithms::PawleyFit::exec(), Mantid::DataHandling::LoadInstrument::exec(), Mantid::DataHandling::LoadNexusProcessed::exec(), Mantid::DataHandling::LoadParameterFile::exec(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::exec(), Mantid::MDAlgorithms::TransposeMD::exec(), Mantid::Algorithms::Stitch1D::getEndOverlap(), Mantid::Algorithms::Stitch1D::getRebinParams(), Mantid::Algorithms::Stitch1D::getStartOverlap(), Mantid::API::Algorithm::isDefault(), Mantid::DataHandling::LoadILLDiffraction::loadDataScan(), Mantid::DataHandling::LoadILLSANS::loadMetaData(), Mantid::Algorithms::CheckWorkspacesMatch::runCompareWorkspaces(), Mantid::API::BoxControllerSettingsAlgorithm::takeDefaultsFromInstrument(), Mantid::Algorithms::Bin2DPowderDiffraction::validateInputs(), Mantid::Algorithms::NormaliseToMonitor::validateInputs(), and Mantid::MDAlgorithms::IntegrateEllipsoidsV2::validateInputs().

◆ 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 138 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 60 of file Property.cpp.

References m_name.

Referenced by Mantid::Kernel::PropertyManager::asJson(), MantidQt::API::BoolPropertyWidget::BoolPropertyWidget(), BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(), Mantid::Algorithms::CompareWorkspaces::checkRunProperties(), Mantid::Kernel::LogFilter::convertToTimeSeriesOfDouble(), MantidQt::MantidWidgets::FitOptionsBrowser::createPropertyProperty(), MantidQt::CustomDialogs::LoadDialog::createWidgetsForProperty(), Mantid::DataHandling::Load::declareLoaderProperties(), Mantid::Kernel::PropertyManager::filterByProperty(), Mantid::API::IndexProperty::generatePropertyName(), Mantid::API::IndexTypeProperty::generatePropertyName(), MantidQt::API::FileDialogHandler::getCaption(), Mantid::API::Algorithm::getInputWorkspaceStorageModes(), Mantid::Algorithms::FilterEvents::getTimeSeriesLogNames(), MantidQt::API::AlgorithmPropertiesWidget::hideOrDisableProperties(), MantidQt::API::isCalledInputWorkspace(), MantidQt::API::ListPropertyWidget::ListPropertyWidget(), Mantid::Algorithms::AddLogDerivative::makeDerivative(), Mantid::Algorithms::GenerateEventsFilter::makeMultipleFiltersByValues(), Mantid::Algorithms::GenerateEventsFilter::makeMultipleFiltersByValuesParallel(), Mantid::Kernel::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(), Mantid::Algorithms::CheckWorkspacesMatch::runCompareWorkspaces(), MantidQt::API::AlgorithmDialog::setAlgorithm(), Mantid::Algorithms::CalculateCountRate::setOutLogParameters(), Mantid::DataHandling::LoadNexus::setOutputWorkspace(), Mantid::API::Algorithm::setPropertyOrdinal(), Mantid::Kernel::PropertyManager::setPropertyOrdinal(), Mantid::API::MultipleFileProperty::setValueAsSingleFile(), Mantid::Kernel::PropertyManager::splitByTime(), Mantid::Algorithms::FilterEvents::splitTimeSeriesProperty(), MantidQt::API::TextPropertyWidget::TextPropertyWidget(), MantidQt::API::PropertyWidget::valueChangedSlot(), and Mantid::NeXus::NexusFileIO::writeNumericTimeLog().

◆ 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 109 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< 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< TYPE >, 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< TYPE >, 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< TYPE >, 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< TYPE >, 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< TYPE >, 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< TYPE >, 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< TYPE >, 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< TYPE >, 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::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::Kernel::PropertyWithValue< TYPE >, 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::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Definition at line 127 of file Property.h.

◆ 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 371 of file Property.cpp.

References m_autotrim.

Referenced by BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(), 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

◆ 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 134 of file Property.cpp.

References documentation(), and m_documentation.

Referenced by Mantid::Algorithms::ExponentialCorrection::defineProperties(), 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 194 of file Property.h.

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

◆ setRemember()

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

Set wheter to remeber this property input.

Parameters
remember:: true to remember

Definition at line 115 of file Property.cpp.

References m_remember, and remember().

Referenced by 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 92 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< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, Mantid::Kernel::TimeSeriesProperty< bool >, Mantid::API::FileProperty, Mantid::API::MultipleFileProperty, Mantid::Kernel::PropertyManagerProperty, Mantid::API::AlgorithmProperty, Mantid::API::FunctionProperty, Mantid::API::WorkspaceProperty< TYPE >, Mantid::Kernel::ArrayProperty< T >, Mantid::Kernel::ArrayProperty< int64_t >, Mantid::Kernel::PropertyWithValue< TYPE >, 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 > >, and Mantid::Kernel::PropertyWithValue< PropertyManager_sptr >.

Referenced by Mantid::Kernel::SetValueWhenProperty::applyChanges(), BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(), createTemporaryValue(), Mantid::DataHandling::LoadHelper::recurseAndAddNexusFieldsToWsRun(), 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

◆ splitByTime()

void Mantid::Kernel::Property::splitByTime ( std::vector< SplittingInterval > &  splitter,
std::vector< Property * >  outputs,
bool  isProtonCharge = true 
) const
virtual

Split a property by time.

Will be overridden by TimeSeriesProperty (only) For any other property type, this does nothing.

Parameters
splitter:: time splitter
outputs:: holder for splitter output
isProtonCharge:: a flag to tell whether the property is periodic or not

Reimplemented in Mantid::Kernel::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Definition at line 208 of file Property.cpp.

References UNUSED_ARG.

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

◆ 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 70 of file Property.cpp.

References m_typeinfo.

◆ units()

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

◆ 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< T >, Mantid::Kernel::ArrayProperty< int64_t >, Mantid::Kernel::PropertyManagerProperty, Mantid::Kernel::PropertyWithValue< TYPE >, 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::TimeSeriesProperty< TYPE >, Mantid::Kernel::TimeSeriesProperty< HeldType >, Mantid::Kernel::TimeSeriesProperty< double >, Mantid::Kernel::TimeSeriesProperty< int >, and Mantid::Kernel::TimeSeriesProperty< bool >.

Referenced by Mantid::Kernel::SetValueWhenProperty::applyChanges(), MantidQt::API::BoolPropertyWidget::BoolPropertyWidget(), BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(), 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::DataHandling::LoadMuonNexus2::doExec(), Mantid::Algorithms::CreateLogPropertyTable::exec(), Mantid::DataHandling::LoadInstrument::exec(), Mantid::MDAlgorithms::CalculateCoverageDGS::exec(), Mantid::MDAlgorithms::MDNorm::exec(), Mantid::MDAlgorithms::PreprocessDetectorsToMD::exec(), Mantid::Algorithms::NormaliseByCurrent::extractCharge(), MantidQt::API::FilePropertyWidget::FilePropertyWidget(), Mantid::DataHandling::SaveGSS::generateInstrumentHeader(), Mantid::MDAlgorithms::MDNorm::getBinParameters(), MantidQt::API::FindFilesWorker::getFilesFromAlgorithm(), Mantid::API::LogManager::getPropertyAsIntegerValue(), Mantid::Kernel::EnabledWhenProperty::getPropertyValue(), Mantid::Kernel::SetValueWhenProperty::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::Algorithms::CheckWorkspacesMatch::runCompareWorkspaces(), Mantid::DataHandling::LoadEventNexus::runLoadNexusLogs(), Mantid::Algorithms::SampleLogsBehaviour::stringPropertiesMatch(), MantidQt::API::TextPropertyWidget::TextPropertyWidget(), 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 237 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 219 of file Property.h.

Referenced by Property().

◆ m_documentation

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

Longer, optional description of property.

Definition at line 215 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 227 of file Property.h.

◆ m_name

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

The name of the property.

Definition at line 208 of file Property.h.

Referenced by name(), and Property().

◆ m_remember

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

Flag whether to save input values.

Definition at line 233 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 224 of file Property.h.

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

◆ m_typeinfo

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

The type of the property.

Definition at line 217 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 221 of file Property.h.

Referenced by setUnits(), and units().


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