Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
726c813b
Commit
726c813b
authored
Jun 21, 2017
by
Roman Tolchenov
Browse files
Re #19909. Fix clang format.
parent
47f69465
Changes
8
Hide whitespace changes
Inline
Side-by-side
Framework/API/inc/MantidAPI/CompositeFunction.h
View file @
726c813b
...
...
@@ -67,7 +67,8 @@ public:
/// Returns the function's name
std
::
string
name
()
const
override
{
return
"CompositeFunction"
;
}
/// Writes itself into a string
std
::
string
asString
(
const
std
::
string
&
parentLocalAttributesStr
=
""
)
const
override
;
std
::
string
asString
(
const
std
::
string
&
parentLocalAttributesStr
=
""
)
const
override
;
/// Sets the workspace for each member function
void
setWorkspace
(
boost
::
shared_ptr
<
const
Workspace
>
ws
)
override
;
/// Set matrix workspace
...
...
Framework/API/inc/MantidAPI/IFunction.h
View file @
726c813b
...
...
@@ -324,7 +324,8 @@ public:
/// Returns the function's name
virtual
std
::
string
name
()
const
=
0
;
/// Writes itself into a string
virtual
std
::
string
asString
(
const
std
::
string
&
localAttributesStr
=
""
)
const
;
virtual
std
::
string
asString
(
const
std
::
string
&
localAttributesStr
=
""
)
const
;
/// Virtual copy constructor
virtual
boost
::
shared_ptr
<
IFunction
>
clone
()
const
;
/// Set the workspace.
...
...
Framework/API/inc/MantidAPI/ImmutableCompositeFunction.h
View file @
726c813b
...
...
@@ -46,7 +46,8 @@ public:
/// Returns the function's name
std
::
string
name
()
const
override
{
return
"ImmutableCompositeFunction"
;
}
/// Writes itself into a string
std
::
string
asString
(
const
std
::
string
&
parentLocalAttributesStr
=
""
)
const
override
;
std
::
string
asString
(
const
std
::
string
&
parentLocalAttributesStr
=
""
)
const
override
;
/// Set i-th parameter
void
setParameter
(
size_t
i
,
const
double
&
value
,
bool
explicitlySet
=
true
)
override
{
...
...
Framework/API/src/CompositeFunction.cpp
View file @
726c813b
...
...
@@ -46,11 +46,13 @@ void CompositeFunction::init() {}
* // write NewFunction's own ties and constraints
* // ostr << ";constraints=(" << ... <<")";
* }
* @param parentLocalAttributesStr :: A preformatted string with parent's local attributes.
* @param parentLocalAttributesStr :: A preformatted string with parent's local
* attributes.
* Can be passed in by a CompositeFunction (eg MultiDomainFunction).
* @return the string representation of the composite function
*/
std
::
string
CompositeFunction
::
asString
(
const
std
::
string
&
parentLocalAttributesStr
)
const
{
std
::
string
CompositeFunction
::
asString
(
const
std
::
string
&
parentLocalAttributesStr
)
const
{
std
::
ostringstream
ostr
;
// if empty just return function name
...
...
@@ -83,7 +85,8 @@ std::string CompositeFunction::asString(const std::string &parentLocalAttributes
this
->
getLocalAttribute
(
i
,
localAttName
).
value
();
if
(
!
localAttValue
.
empty
())
{
// local attribute names are prefixed by dollar sign
localAttributesStr
<<
','
<<
'$'
<<
localAttName
<<
'='
<<
localAttValue
;
localAttributesStr
<<
','
<<
'$'
<<
localAttName
<<
'='
<<
localAttValue
;
}
}
ostr
<<
fun
->
asString
(
localAttributesStr
.
str
());
...
...
Framework/API/src/ImmutableCompositeFunction.cpp
View file @
726c813b
...
...
@@ -16,7 +16,8 @@ using std::size_t;
* Overridden method creates an initialization string which makes it look like a
* siple function.
*/
std
::
string
ImmutableCompositeFunction
::
asString
(
const
std
::
string
&
parentLocalAttributesStr
)
const
{
std
::
string
ImmutableCompositeFunction
::
asString
(
const
std
::
string
&
parentLocalAttributesStr
)
const
{
return
IFunction
::
asString
(
parentLocalAttributesStr
);
}
...
...
Framework/API/test/MultiDomainFunctionTest.h
View file @
726c813b
...
...
@@ -478,8 +478,8 @@ public:
"name=MultiDomainFunctionTest_Function; "
"(name=MultiDomainFunctionTest_Function;name="
"MultiDomainFunctionTest_Function))"
;
auto
f
=
FunctionFactory
::
Instance
().
createInitialized
(
ini
);
auto
g
=
FunctionFactory
::
Instance
().
createInitialized
(
f
->
asString
());
auto
f
=
FunctionFactory
::
Instance
().
createInitialized
(
ini
);
auto
g
=
FunctionFactory
::
Instance
().
createInitialized
(
f
->
asString
());
TS_ASSERT_EQUALS
(
g
->
asString
(),
"composite=MultiDomainFunction,NumDeriv=false;(composite="
"CompositeFunction,NumDeriv=false,$domains=i;name="
...
...
Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSpectrum.h
View file @
726c813b
...
...
@@ -36,7 +36,8 @@ public:
std
::
string
name
()
const
override
{
return
"CrystalFieldSpectrum"
;
}
const
std
::
string
category
()
const
override
{
return
"General"
;
}
void
buildTargetFunction
()
const
override
;
std
::
string
asString
(
const
std
::
string
&
parentLocalAttributesStr
=
""
)
const
override
;
std
::
string
asString
(
const
std
::
string
&
parentLocalAttributesStr
=
""
)
const
override
;
protected:
void
updateTargetFunction
()
const
override
;
...
...
Framework/CurveFitting/src/Functions/CrystalFieldSpectrum.cpp
View file @
726c813b
...
...
@@ -97,7 +97,8 @@ void CrystalFieldSpectrum::updateTargetFunction() const {
}
/// Custom string conversion method
std
::
string
CrystalFieldSpectrum
::
asString
(
const
std
::
string
&
parentLocalAttributesStr
)
const
{
std
::
string
CrystalFieldSpectrum
::
asString
(
const
std
::
string
&
parentLocalAttributesStr
)
const
{
std
::
ostringstream
ostr
;
ostr
<<
"name="
<<
this
->
name
();
// Print the attributes
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment