Mantid
|
PeakShapeBase : Base class for concrete PeakShapes containing common code. More...
#include <PeakShapeBase.h>
Public Member Functions | |
std::string | algorithmName () const override |
Get the name of the algorithm used to make this shape. More... | |
int | algorithmVersion () const override |
Get the version of the algorithm used to make this shape. More... | |
Kernel::SpecialCoordinateSystem | frame () const override |
Get the coordinate frame. More... | |
PeakShapeBase (Kernel::SpecialCoordinateSystem frame, std::string algorithmName=std::string(), int algorithmVersion=-1) | |
Constructor. More... | |
Public Member Functions inherited from Mantid::Geometry::PeakShape | |
virtual std::string | algorithmName () const =0 |
Algorithm. More... | |
virtual int | algorithmVersion () const =0 |
Algorithm Version. More... | |
virtual PeakShape * | clone () const =0 |
Deep copy this. More... | |
virtual Mantid::Kernel::SpecialCoordinateSystem | frame () const =0 |
Coordinte frame used upon creation. More... | |
virtual boost::optional< double > | radius (RadiusType type) const =0 |
Radius. More... | |
virtual std::string | shapeName () const =0 |
Shape name. More... | |
virtual std::string | toJSON () const =0 |
Serialize. More... | |
virtual | ~PeakShape ()=default |
Destructor. More... | |
Protected Member Functions | |
void | buildCommon (Json::Value &root) const |
Build common parts of outgoing JSON serialization. More... | |
PeakShapeBase & | operator= (const PeakShapeBase &)=default |
Assignment operator. More... | |
bool | operator== (const PeakShapeBase &other) const |
Equals operator. More... | |
PeakShapeBase (const PeakShapeBase &)=default | |
Copy constructor. More... | |
Protected Attributes | |
std::string | m_algorithmName |
Generating algorithm name. More... | |
int | m_algorithmVersion |
Generating algorithm version. More... | |
Mantid::Kernel::SpecialCoordinateSystem | m_frame |
Special coordinate system. More... | |
Additional Inherited Members | |
Public Types inherited from Mantid::Geometry::PeakShape | |
enum | RadiusType { Radius = 0 , OuterRadius = 1 , InnerRadius = 2 } |
For selecting different radius types. More... | |
PeakShapeBase : Base class for concrete PeakShapes containing common code.
Definition at line 26 of file PeakShapeBase.h.
Mantid::DataObjects::PeakShapeBase::PeakShapeBase | ( | Kernel::SpecialCoordinateSystem | frame, |
std::string | algorithmName = std::string() , |
||
int | algorithmVersion = -1 |
||
) |
Constructor.
Definition at line 15 of file PeakShapeBase.cpp.
|
protecteddefault |
Copy constructor.
|
overridevirtual |
Get the name of the algorithm used to make this shape.
Get the algorithm name.
Implements Mantid::Geometry::PeakShape.
Definition at line 44 of file PeakShapeBase.cpp.
References m_algorithmName.
Referenced by buildCommon().
|
overridevirtual |
Get the version of the algorithm used to make this shape.
Get the algorithmVersion.
Implements Mantid::Geometry::PeakShape.
Definition at line 50 of file PeakShapeBase.cpp.
References m_algorithmVersion.
Referenced by buildCommon().
|
protected |
Build common parts of outgoing JSON serialization.
Serialize to JSON object and return the JSON value for further modification
root | : Ref to root value to write to |
Definition at line 29 of file PeakShapeBase.cpp.
References algorithmName(), algorithmVersion(), frame(), and Mantid::Geometry::PeakShape::shapeName().
Referenced by Mantid::DataObjects::PeakShapeEllipsoid::toJSON(), and Mantid::DataObjects::PeakShapeSpherical::toJSON().
|
overridevirtual |
Get the coordinate frame.
Implements Mantid::Geometry::PeakShape.
Definition at line 22 of file PeakShapeBase.cpp.
References m_frame.
Referenced by buildCommon(), and operator==().
|
protecteddefault |
Assignment operator.
|
protected |
Equals operator.
Definition at line 52 of file PeakShapeBase.cpp.
References frame().
Referenced by Mantid::DataObjects::PeakShapeEllipsoid::operator==(), and Mantid::DataObjects::PeakShapeSpherical::operator==().
|
protected |
Generating algorithm name.
Definition at line 50 of file PeakShapeBase.h.
Referenced by algorithmName().
|
protected |
Generating algorithm version.
Definition at line 53 of file PeakShapeBase.h.
Referenced by algorithmVersion().
|
protected |