Mantid
Loading...
Searching...
No Matches
IsNone.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 <boost/python/object.hpp>
10
19namespace Mantid {
20namespace PythonInterface {
21
26inline bool isNone(PyObject *ptr) { return (ptr == Py_None); }
27
32inline bool isNone(const boost::python::object &obj) {
33#ifdef BOOST_PYTHON_OBJECT_HAS_IS_NONE
34 return obj.is_none();
35#else
36 return isNone(obj.ptr());
37#endif
38}
39} // namespace PythonInterface
40} // namespace Mantid
double obj
the value of the quadratic function
bool isNone(PyObject *ptr)
Definition: IsNone.h:26
Helper class which provides the Collimation Length for SANS instruments.