Mantid
Loading...
Searching...
No Matches
NoShape.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
8#include "MantidJson/Json.h"
9#include <json/json.h>
10#include <stdexcept>
11
12namespace Mantid::DataObjects {
13
18std::string NoShape::toJSON() const {
19
20 Json::Value root;
21 Json::Value shape(this->shapeName());
22 root["shape"] = shape;
23
24 return Mantid::JsonHelpers::jsonToString(root);
25}
26
31NoShape *NoShape::clone() const { return new NoShape; }
32
33std::string NoShape::algorithmName() const { return std::string(); }
34
35int NoShape::algorithmVersion() const { return -1; }
36
41std::string NoShape::shapeName() const { return NoShape::noShapeName(); }
42
44
45const std::string NoShape::noShapeName() { return "none"; }
46
47} // namespace Mantid::DataObjects
PeakShapeNone : No peak shape.
Definition: NoShape.h:17
std::string algorithmName() const override
Return the algorithn name.
Definition: NoShape.cpp:33
std::string shapeName() const override
Return the shape name.
Definition: NoShape.cpp:41
static const std::string noShapeName()
Return the shape name.
Definition: NoShape.cpp:45
std::string toJSON() const override
Serialize.
Definition: NoShape.cpp:18
int algorithmVersion() const override
Return the algorithm version.
Definition: NoShape.cpp:35
NoShape * clone() const override
Clone.
Definition: NoShape.cpp:31
Kernel::SpecialCoordinateSystem frame() const override
Get the coordinate frame.
Definition: NoShape.cpp:43
SpecialCoordinateSystem
Special coordinate systems for Q3D.