Mantid
Loading...
Searching...
No Matches
Framework
API
inc
MantidAPI
FunctionProperty.h
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8
9
//----------------------------------------------------------------------
10
// Includes
11
//----------------------------------------------------------------------
12
#include "MantidAPI/DllConfig.h"
13
#include "
MantidAPI/IFunction.h
"
14
#include "
MantidAPI/WorkspaceProperty.h
"
15
#include "
MantidKernel/Exception.h
"
16
#include "
MantidKernel/PropertyWithValue.h
"
17
18
#include <string>
19
20
namespace
Mantid
{
21
namespace
API
{
29
class
MANTID_API_DLL
FunctionProperty
:
public
Kernel::PropertyWithValue
<std::shared_ptr<IFunction>> {
30
public
:
32
FunctionProperty
(
const
std::string &name,
const
unsigned
int
direction = Kernel::Direction::Input,
33
const
PropertyMode::Type
optional = PropertyMode::Type::Mandatory);
34
36
FunctionProperty
(
const
FunctionProperty
&
right
) =
default
;
37
40
FunctionProperty
&
operator=
(
const
FunctionProperty
&
right
) =
default
;
41
44
FunctionProperty
&operator=(
const
std::shared_ptr<IFunction> &
value
)
override
;
45
47
FunctionProperty
&
operator+=
(
Kernel::Property
const
*)
override
;
48
50
FunctionProperty
*
clone
()
const override
{
return
new
FunctionProperty
(*
this
); }
51
53
std::string
value
()
const override
;
54
56
Json::Value valueAsJson()
const override
;
57
59
std::string getDefault()
const override
;
60
62
std::string setValue(
const
std::string &
value
)
override
;
63
65
std::string setValueFromJson(
const
Json::Value &
value
)
override
;
66
68
std::string isValid()
const override
;
69
71
bool
isDefault()
const override
;
72
74
const
Kernel::PropertyHistory
createHistory()
const override
;
75
76
private
:
78
bool
isOptional()
const
;
79
81
PropertyMode::Type
m_optional
;
83
std::string
m_definition
;
84
};
85
86
}
// namespace API
87
}
// namespace Mantid
Exception.h
value
double value
The value of the point.
Definition:
FitMW.cpp:51
IFunction.h
right
double right
Definition:
LineProfile.cpp:81
PropertyWithValue.h
WorkspaceProperty.h
Mantid::API::FunctionProperty
A property class for functions.
Definition:
FunctionProperty.h:29
Mantid::API::FunctionProperty::m_definition
std::string m_definition
The function definition string (as used by the FunctionFactory)
Definition:
FunctionProperty.h:83
Mantid::API::FunctionProperty::FunctionProperty
FunctionProperty(const FunctionProperty &right)=default
Copy constructor.
Mantid::API::FunctionProperty::m_optional
PropertyMode::Type m_optional
A flag indicating whether the property should be considered optional.
Definition:
FunctionProperty.h:81
Mantid::API::FunctionProperty::operator=
FunctionProperty & operator=(const FunctionProperty &right)=default
Copy assignment operator.
Mantid::API::FunctionProperty::clone
FunctionProperty * clone() const override
'Virtual copy constructor'
Definition:
FunctionProperty.h:50
Mantid::Kernel::PropertyHistory
This class stores information about the parameters used by an algorithm.
Definition:
PropertyHistory.h:34
Mantid::Kernel::PropertyWithValue
The concrete, templated class for properties.
Definition:
PropertyWithValue.h:37
Mantid::Kernel::Property
Base class for properties.
Definition:
Property.h:94
API
Definition:
ChudleyElliotSQE.h:16
Mantid::API::operator+=
MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Adds two workspaces.
Definition:
WorkspaceOpOverloads.cpp:281
Mantid
Helper class which provides the Collimation Length for SANS instruments.
Definition:
AbsorptionCorrection.h:18
Mantid::API::PropertyMode::Type
Type
Definition:
WorkspaceProperty.h:25
Generated on Tue Jan 3 2023 11:57:22 for Mantid by
1.9.5