Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::DataObjects::PeakShapeBase Class Reference

PeakShapeBase : Base class for concrete PeakShapes containing common code. More...

#include <PeakShapeBase.h>

Inheritance diagram for Mantid::DataObjects::PeakShapeBase:
Mantid::Geometry::PeakShape Mantid::DataObjects::PeakShapeEllipsoid Mantid::DataObjects::PeakShapeSpherical

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 PeakShapeclone () 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...
 
PeakShapeBaseoperator= (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...
 

Detailed Description

PeakShapeBase : Base class for concrete PeakShapes containing common code.

Definition at line 26 of file PeakShapeBase.h.

Constructor & Destructor Documentation

◆ PeakShapeBase() [1/2]

Mantid::DataObjects::PeakShapeBase::PeakShapeBase ( Kernel::SpecialCoordinateSystem  frame,
std::string  algorithmName = std::string(),
int  algorithmVersion = -1 
)

Constructor.

Definition at line 15 of file PeakShapeBase.cpp.

◆ PeakShapeBase() [2/2]

Mantid::DataObjects::PeakShapeBase::PeakShapeBase ( const PeakShapeBase )
protecteddefault

Copy constructor.

Member Function Documentation

◆ algorithmName()

std::string Mantid::DataObjects::PeakShapeBase::algorithmName ( ) const
overridevirtual

Get the name of the algorithm used to make this shape.

Get the algorithm name.

Returns
Algorithm name

Implements Mantid::Geometry::PeakShape.

Definition at line 44 of file PeakShapeBase.cpp.

References m_algorithmName.

Referenced by buildCommon().

◆ algorithmVersion()

int Mantid::DataObjects::PeakShapeBase::algorithmVersion ( ) const
overridevirtual

Get the version of the algorithm used to make this shape.

Get the algorithmVersion.

Returns
Algorithm version

Implements Mantid::Geometry::PeakShape.

Definition at line 50 of file PeakShapeBase.cpp.

References m_algorithmVersion.

Referenced by buildCommon().

◆ buildCommon()

void Mantid::DataObjects::PeakShapeBase::buildCommon ( Json::Value &  root) const
protected

Build common parts of outgoing JSON serialization.

PeakShapeBase::buildCommon.

Serialize to JSON object and return the JSON value for further modification

Parameters
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().

◆ frame()

Kernel::SpecialCoordinateSystem Mantid::DataObjects::PeakShapeBase::frame ( ) const
overridevirtual

Get the coordinate frame.

PeakShapeBase::frame.

Returns
The coordinate frame used

Implements Mantid::Geometry::PeakShape.

Definition at line 22 of file PeakShapeBase.cpp.

References m_frame.

Referenced by buildCommon(), and operator==().

◆ operator=()

PeakShapeBase & Mantid::DataObjects::PeakShapeBase::operator= ( const PeakShapeBase )
protecteddefault

Assignment operator.

◆ operator==()

bool Mantid::DataObjects::PeakShapeBase::operator== ( const PeakShapeBase other) const
protected

Member Data Documentation

◆ m_algorithmName

std::string Mantid::DataObjects::PeakShapeBase::m_algorithmName
protected

Generating algorithm name.

Definition at line 50 of file PeakShapeBase.h.

Referenced by algorithmName().

◆ m_algorithmVersion

int Mantid::DataObjects::PeakShapeBase::m_algorithmVersion
protected

Generating algorithm version.

Definition at line 53 of file PeakShapeBase.h.

Referenced by algorithmVersion().

◆ m_frame

Mantid::Kernel::SpecialCoordinateSystem Mantid::DataObjects::PeakShapeBase::m_frame
protected

Special coordinate system.

Definition at line 47 of file PeakShapeBase.h.

Referenced by frame().


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