Mantid
Loading...
Searching...
No Matches
PropertyManager.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#ifdef _MSC_VER
8#pragma warning(disable : 4250) // Disable warning regarding inheritance via
9 // dominance, we have no way around it with the
10 // design
11#endif
16
17#include <boost/python/class.hpp>
18#include <boost/python/make_constructor.hpp>
19
24
25using namespace boost::python;
26
28
30
31 // The second argument defines the actual type held within the Python object.
32 // This means that when a PropertyManager is constructed in Python
33 // it actually used a shared_ptr to the object rather than a raw pointer.
34 // This knowledge is used by DataServiceExporter::extractCppValue to assume
35 // that it can always extract a shared_ptr type
36 class_<PropertyManager, PropertyManager_sptr, bases<IPropertyManager>, boost::noncopyable>("PropertyManager")
37 .def("__init__", make_constructor(&createPropertyManager))
38 .def("getInvalidValuesFilterLogName", &PropertyManager::getInvalidValuesFilterLogName)
39 .staticmethod("getInvalidValuesFilterLogName")
40 .def("getLogNameFromInvalidValuesFilter", &PropertyManager::getLogNameFromInvalidValuesFilter)
41 .staticmethod("getLogNameFromInvalidValuesFilter")
42 .def("isAnInvalidValuesFilterLog", &PropertyManager::isAnInvalidValuesFilterLog)
43 .staticmethod("isAnInvalidValuesFilterLog");
44}
45
46#ifdef _MSC_VER
47#pragma warning(default : 4250)
48#endif
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_PropertyManager()
Interface to PropertyManager.
Property manager helper class.
static bool isAnInvalidValuesFilterLog(const std::string &logName)
static std::string getInvalidValuesFilterLogName(const std::string &logName)
Gets the correct log name for the matching invalid values log for a given log name.
static std::string getLogNameFromInvalidValuesFilter(const std::string &logName)
std::shared_ptr< PropertyManager > PropertyManager_sptr
Typedef for a shared pointer to a PropertyManager.
std::shared_ptr< Kernel::PropertyManager > createPropertyManager(const boost::python::dict &mapping)
Create a C++ PropertyMananager from a Python dictionary.