Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #10904. Expose PeakShape to python.
- Loading branch information
1 parent
43d4e25
commit bf27026
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
Code/Mantid/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "MantidGeometry/Crystal/PeakShape.h" | ||
#include <boost/python/class.hpp> | ||
#include <boost/python/register_ptr_to_python.hpp> | ||
|
||
using Mantid::Geometry::PeakShape; | ||
using namespace boost::python; | ||
|
||
|
||
void export_PeakShape() | ||
{ | ||
register_ptr_to_python<PeakShape*>(); | ||
|
||
class_<PeakShape, boost::noncopyable>("PeakShape", no_init) | ||
.def("toJSON", &PeakShape::toJSON, "Serialize object to JSON") | ||
.def("shapeName", &PeakShape::shapeName, "Shape name for type of shape") | ||
.def("algorithmVersion", &PeakShape::algorithmVersion, "Number of source integration algorithm version") | ||
.def("algorithmName", &PeakShape::algorithmName, "Name of source integration algorithm") | ||
; | ||
} |