Skip to content
Snippets Groups Projects
Commit b22b67eb authored by WHITFIELDRE email's avatar WHITFIELDRE email
Browse files

Disable clang-format for PythonInterface exports.

parent c34fff30
No related merge requests found
Showing
with 48 additions and 0 deletions
...@@ -38,7 +38,9 @@ namespace ...@@ -38,7 +38,9 @@ namespace
BOOST_PYTHON_FUNCTION_OVERLOADS(declarePropertyType3_Overload, PythonAlgorithm::declarePyAlgProperty, 4, 5) BOOST_PYTHON_FUNCTION_OVERLOADS(declarePropertyType3_Overload, PythonAlgorithm::declarePyAlgProperty, 4, 5)
} }
// clang-format off
void export_leaf_classes() void export_leaf_classes()
// clang-format on
{ {
register_ptr_to_python<boost::shared_ptr<Algorithm>>(); register_ptr_to_python<boost::shared_ptr<Algorithm>>();
......
...@@ -107,7 +107,9 @@ GCC_DIAG_OFF(cast-qual) ...@@ -107,7 +107,9 @@ GCC_DIAG_OFF(cast-qual)
GCC_DIAG_ON(cast-qual) GCC_DIAG_ON(cast-qual)
// clang-format on // clang-format on
// clang-format off
void export_AlgorithmFactory() void export_AlgorithmFactory()
// clang-format on
{ {
class_<AlgorithmFactoryImpl,boost::noncopyable>("AlgorithmFactoryImpl", no_init) class_<AlgorithmFactoryImpl,boost::noncopyable>("AlgorithmFactoryImpl", no_init)
......
...@@ -54,7 +54,9 @@ boost::python::object getPropertiesAsList(AlgorithmHistory& self) ...@@ -54,7 +54,9 @@ boost::python::object getPropertiesAsList(AlgorithmHistory& self)
return names; return names;
} }
// clang-format off
void export_AlgorithmHistory() void export_AlgorithmHistory()
// clang-format on
{ {
register_ptr_to_python<Mantid::API::AlgorithmHistory_sptr >(); register_ptr_to_python<Mantid::API::AlgorithmHistory_sptr >();
......
...@@ -64,7 +64,9 @@ namespace ...@@ -64,7 +64,9 @@ namespace
///@endcond ///@endcond
} }
// clang-format off
void export_AlgorithmManager() void export_AlgorithmManager()
// clang-format on
{ {
typedef class_<AlgorithmManagerImpl,boost::noncopyable> PythonType; typedef class_<AlgorithmManagerImpl,boost::noncopyable> PythonType;
......
...@@ -38,7 +38,9 @@ namespace ...@@ -38,7 +38,9 @@ namespace
} }
// clang-format off
void export_AlgorithmProperty() void export_AlgorithmProperty()
// clang-format on
{ {
// AlgorithmProperty has base PropertyWithValue<boost::shared_ptr<IAlgorithm>> // AlgorithmProperty has base PropertyWithValue<boost::shared_ptr<IAlgorithm>>
// which must be exported // which must be exported
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
using namespace Mantid::API; using namespace Mantid::API;
using namespace boost::python; using namespace boost::python;
// clang-format off
void export_algorithm_proxy() void export_algorithm_proxy()
// clang-format on
{ {
register_ptr_to_python<boost::shared_ptr<AlgorithmProxy>>(); register_ptr_to_python<boost::shared_ptr<AlgorithmProxy>>();
......
...@@ -65,7 +65,9 @@ namespace ...@@ -65,7 +65,9 @@ namespace
} }
// clang-format off
void export_AnalysisDataService() void export_AnalysisDataService()
// clang-format on
{ {
typedef DataServiceExporter<AnalysisDataServiceImpl, Workspace_sptr> ADSExporter; typedef DataServiceExporter<AnalysisDataServiceImpl, Workspace_sptr> ADSExporter;
auto pythonClass = ADSExporter::define("AnalysisDataServiceImpl"); auto pythonClass = ADSExporter::define("AnalysisDataServiceImpl");
......
...@@ -78,7 +78,9 @@ namespace ...@@ -78,7 +78,9 @@ namespace
} }
// clang-format off
void export_Axis() void export_Axis()
// clang-format on
{ {
register_ptr_to_python<Axis*>(); register_ptr_to_python<Axis*>();
...@@ -119,7 +121,9 @@ Axis* createNumericAxis(int length) ...@@ -119,7 +121,9 @@ Axis* createNumericAxis(int length)
return new Mantid::API::NumericAxis(length); return new Mantid::API::NumericAxis(length);
} }
// clang-format off
void export_NumericAxis() void export_NumericAxis()
// clang-format on
{ {
/// Exported so that Boost.Python can give back a NumericAxis class when an Axis* is returned /// Exported so that Boost.Python can give back a NumericAxis class when an Axis* is returned
class_< NumericAxis, bases<Axis>, boost::noncopyable >("NumericAxis", no_init) class_< NumericAxis, bases<Axis>, boost::noncopyable >("NumericAxis", no_init)
...@@ -143,7 +147,9 @@ Axis* createBinEdgeAxis(int length) ...@@ -143,7 +147,9 @@ Axis* createBinEdgeAxis(int length)
return new Mantid::API::BinEdgeAxis(length); return new Mantid::API::BinEdgeAxis(length);
} }
// clang-format off
void export_BinEdgeAxis() void export_BinEdgeAxis()
// clang-format on
{ {
/// Exported so that Boost.Python can give back a BinEdgeAxis class when an Axis* is returned /// Exported so that Boost.Python can give back a BinEdgeAxis class when an Axis* is returned
class_< BinEdgeAxis, bases<NumericAxis>, boost::noncopyable >("BinEdgeAxis", no_init) class_< BinEdgeAxis, bases<NumericAxis>, boost::noncopyable >("BinEdgeAxis", no_init)
...@@ -168,7 +174,9 @@ Axis* createTextAxis(int length) ...@@ -168,7 +174,9 @@ Axis* createTextAxis(int length)
} }
// clang-format off
void export_TextAxis() void export_TextAxis()
// clang-format on
{ {
class_< TextAxis, bases<Axis>, boost::noncopyable >("TextAxis", no_init) class_< TextAxis, bases<Axis>, boost::noncopyable >("TextAxis", no_init)
.def("setLabel", & TextAxis::setLabel, "Set the label at the given entry") .def("setLabel", & TextAxis::setLabel, "Set the label at the given entry")
......
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
namespace Policies = Mantid::PythonInterface::Policies; namespace Policies = Mantid::PythonInterface::Policies;
// clang-format off
void export_BinaryOperations() void export_BinaryOperations()
// clang-format on
{ {
using namespace Mantid::API; using namespace Mantid::API;
using boost::python::return_value_policy; using boost::python::return_value_policy;
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
using Mantid::API::BoxController; using Mantid::API::BoxController;
using namespace boost::python; using namespace boost::python;
// clang-format off
void export_BoxController() void export_BoxController()
// clang-format on
{ {
register_ptr_to_python<boost::shared_ptr<BoxController>>(); register_ptr_to_python<boost::shared_ptr<BoxController>>();
......
...@@ -19,7 +19,9 @@ boost::python::object getActiveSessionsAsList(CatalogManagerImpl& self) ...@@ -19,7 +19,9 @@ boost::python::object getActiveSessionsAsList(CatalogManagerImpl& self)
return sessions; return sessions;
} }
// clang-format off
void export_CatalogManager() void export_CatalogManager()
// clang-format on
{ {
register_ptr_to_python<CatalogManagerImpl*>(); register_ptr_to_python<CatalogManagerImpl*>();
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
using Mantid::API::CatalogSession; using Mantid::API::CatalogSession;
using namespace boost::python; using namespace boost::python;
// clang-format off
void export_CatalogSession() void export_CatalogSession()
// clang-format on
{ {
register_ptr_to_python<boost::shared_ptr<CatalogSession> >(); register_ptr_to_python<boost::shared_ptr<CatalogSession> >();
......
...@@ -14,7 +14,9 @@ namespace ...@@ -14,7 +14,9 @@ namespace
typedef Workspace_sptr(DataProcessorAdapter::*loadOverload2)(const std::string&, const bool); typedef Workspace_sptr(DataProcessorAdapter::*loadOverload2)(const std::string&, const bool);
} }
// clang-format off
void export_DataProcessorAlgorithm() void export_DataProcessorAlgorithm()
// clang-format on
{ {
// for strings will actually create a list // for strings will actually create a list
using Mantid::PythonInterface::Policies::VectorToNumpy; using Mantid::PythonInterface::Policies::VectorToNumpy;
......
...@@ -50,7 +50,9 @@ namespace ...@@ -50,7 +50,9 @@ namespace
}; };
} }
// clang-format off
void export_DeprecatedAlgorithmChecker() void export_DeprecatedAlgorithmChecker()
// clang-format on
{ {
class_<DeprecatedAlgorithmChecker>("DeprecatedAlgorithmChecker", no_init) class_<DeprecatedAlgorithmChecker>("DeprecatedAlgorithmChecker", no_init)
.def(init<const std::string&,int>((arg("algName"),arg("version")),"Constructs a DeprecatedAlgorithmChecker for the given algorithm & version. (-1 indicates latest version)")) .def(init<const std::string&,int>((arg("algName"),arg("version")),"Constructs a DeprecatedAlgorithmChecker for the given algorithm & version. (-1 indicates latest version)"))
......
...@@ -13,7 +13,9 @@ using namespace boost::python; ...@@ -13,7 +13,9 @@ using namespace boost::python;
/// Overload generator for getInstrumentFilename /// Overload generator for getInstrumentFilename
BOOST_PYTHON_FUNCTION_OVERLOADS(getInstrumentFilename_Overload, ExperimentInfo::getInstrumentFilename, 1, 2) BOOST_PYTHON_FUNCTION_OVERLOADS(getInstrumentFilename_Overload, ExperimentInfo::getInstrumentFilename, 1, 2)
// clang-format off
void export_ExperimentInfo() void export_ExperimentInfo()
// clang-format on
{ {
register_ptr_to_python<boost::shared_ptr<ExperimentInfo>>(); register_ptr_to_python<boost::shared_ptr<ExperimentInfo>>();
......
...@@ -11,7 +11,9 @@ namespace { ...@@ -11,7 +11,9 @@ namespace {
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getFullPathOverloader, getFullPath, 1, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getFullPathOverloader, getFullPath, 1, 2)
} }
// clang-format off
void export_FileFinder() void export_FileFinder()
// clang-format on
{ {
class_<FileFinderImpl, boost::noncopyable>("FileFinderImpl", no_init) class_<FileFinderImpl, boost::noncopyable>("FileFinderImpl", no_init)
.def("getFullPath", &FileFinderImpl::getFullPath, .def("getFullPath", &FileFinderImpl::getFullPath,
......
...@@ -17,7 +17,9 @@ using Mantid::Kernel::PropertyWithValue; ...@@ -17,7 +17,9 @@ using Mantid::Kernel::PropertyWithValue;
using Mantid::PythonInterface::Converters::PySequenceToVector; using Mantid::PythonInterface::Converters::PySequenceToVector;
namespace bpl = boost::python; namespace bpl = boost::python;
// clang-format off
void export_ActionEnum() void export_ActionEnum()
// clang-format on
{ {
bpl::enum_<FileProperty::FileAction>("FileAction") bpl::enum_<FileProperty::FileAction>("FileAction")
.value("Save", FileProperty::Save) .value("Save", FileProperty::Save)
...@@ -63,7 +65,9 @@ namespace ...@@ -63,7 +65,9 @@ namespace
} }
// clang-format off
void export_FileProperty() void export_FileProperty()
// clang-format on
{ {
bpl::class_<FileProperty, bpl::bases<PropertyWithValue<std::string> >, boost::noncopyable>("FileProperty", bpl::no_init) bpl::class_<FileProperty, bpl::bases<PropertyWithValue<std::string> >, boost::noncopyable>("FileProperty", bpl::no_init)
.def("__init__", .def("__init__",
......
...@@ -8,7 +8,9 @@ using Mantid::API::FrameworkManagerImpl; ...@@ -8,7 +8,9 @@ using Mantid::API::FrameworkManagerImpl;
using Mantid::API::FrameworkManager; using Mantid::API::FrameworkManager;
using namespace boost::python; using namespace boost::python;
// clang-format off
void export_FrameworkManager() void export_FrameworkManager()
// clang-format on
{ {
class_<FrameworkManagerImpl,boost::noncopyable>("FrameworkManagerImpl", no_init) class_<FrameworkManagerImpl,boost::noncopyable>("FrameworkManagerImpl", no_init)
.def("setNumOMPThreadsToConfigValue", &FrameworkManagerImpl::setNumOMPThreadsToConfigValue, .def("setNumOMPThreadsToConfigValue", &FrameworkManagerImpl::setNumOMPThreadsToConfigValue,
......
...@@ -86,7 +86,9 @@ namespace ...@@ -86,7 +86,9 @@ namespace
///@endcond ///@endcond
} }
// clang-format off
void export_FunctionFactory() void export_FunctionFactory()
// clang-format on
{ {
class_<FunctionFactoryImpl,boost::noncopyable>("FunctionFactoryImpl", no_init) class_<FunctionFactoryImpl,boost::noncopyable>("FunctionFactoryImpl", no_init)
......
...@@ -8,7 +8,9 @@ using Mantid::Kernel::PropertyWithValue; ...@@ -8,7 +8,9 @@ using Mantid::Kernel::PropertyWithValue;
using Mantid::PythonInterface::PropertyWithValueExporter; using Mantid::PythonInterface::PropertyWithValueExporter;
using namespace boost::python; using namespace boost::python;
// clang-format off
void export_FunctionProperty() void export_FunctionProperty()
// clang-format on
{ {
// FuncitonProperty has base PropertyWithValue<boost::shared_ptr<IFunction>> // FuncitonProperty has base PropertyWithValue<boost::shared_ptr<IFunction>>
// which must be exported // which must be exported
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment