Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
geometry
src
Exports
PeakShape.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 +
7
#include "
MantidGeometry/Crystal/PeakShape.h
"
8
#include "
MantidPythonInterface/core/GetPointer.h
"
9
#include <boost/python/class.hpp>
10
#include <boost/python/register_ptr_to_python.hpp>
11
12
using
Mantid::Geometry::PeakShape
;
13
using namespace
boost::python
;
14
15
GET_POINTER_SPECIALIZATION
(
PeakShape
)
16
17
void
export_PeakShape
() {
18
register_ptr_to_python<Mantid::Geometry::PeakShape_sptr>();
19
20
class_<PeakShape, boost::noncopyable>(
"PeakShape"
, no_init)
21
.def(
"toJSON"
, &
PeakShape::toJSON
, arg(
"self"
),
"Serialize object to JSON"
)
22
.def(
"shapeName"
, &
PeakShape::shapeName
, arg(
"self"
),
"Shape name for type of shape"
)
23
.def(
"algorithmVersion"
, &
PeakShape::algorithmVersion
, arg(
"self"
),
24
"Number of source integration algorithm version"
)
25
.def(
"algorithmName"
, &
PeakShape::algorithmName
, arg(
"self"
),
"Name of source integration algorithm"
);
26
}
GetPointer.h
GET_POINTER_SPECIALIZATION
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition
GetPointer.h:17
export_PeakShape
void export_PeakShape()
Definition
PeakShape.cpp:17
PeakShape.h
Mantid::Geometry::PeakShape
PeakShape : Abstract type to describes the shape of a peak.
Definition
PeakShape.h:20
Mantid::Geometry::PeakShape::toJSON
virtual std::string toJSON() const =0
Serialize.
Mantid::Geometry::PeakShape::algorithmVersion
virtual int algorithmVersion() const =0
Algorithm Version.
Mantid::Geometry::PeakShape::shapeName
virtual std::string shapeName() const =0
Shape name.
Mantid::Geometry::PeakShape::algorithmName
virtual std::string algorithmName() const =0
Algorithm.
boost::python
Definition
NDArray.h:50
Generated by
1.9.8