Mantid
Loading...
Searching...
No Matches
PyObjectToV3D.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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#pragma once
8
9#include "MantidKernel/V3D.h"
10#include "MantidPythonInterface/core/DllConfig.h"
11#include <boost/python/object.hpp>
12
13namespace Mantid {
14namespace PythonInterface {
15namespace Converters {
22struct MANTID_PYTHONINTERFACE_CORE_DLL PyObjectToV3D {
23 PyObjectToV3D(const boost::python::object &p);
25 Kernel::V3D operator()();
26
27private:
29 const boost::python::object &m_obj;
32};
33} // namespace Converters
34} // namespace PythonInterface
35} // namespace Mantid
Class for 3D vectors.
Definition V3D.h:35
Helper class which provides the Collimation Length for SANS instruments.
Takes a Python object and if it supports indexing and is of length 3 then it will attempt to convert ...
const boost::python::object & m_obj
A reference to the object.
bool m_alreadyV3D
Is the object a wrapped instance of V3D.