Mantid
Loading...
Searching...
No Matches
TypeRegistry.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
10#include <typeinfo>
11
12namespace Mantid {
13namespace PythonInterface {
14
15namespace Registry {
16//-----------------------------------------------------------------------
17// Forward declarations
18//-----------------------------------------------------------------------
19struct PropertyValueHandler;
20
32public:
34 static void registerBuiltins();
36 template <typename HandlerType> static void subscribe() {
37 subscribe(typeid(typename HandlerType::HeldType), new HandlerType);
38 }
40 static void subscribe(const std::type_info &typeInfo, PropertyValueHandler *handler);
42 static const PropertyValueHandler &retrieve(const std::type_info &typeInfo);
43};
44} // namespace Registry
45} // namespace PythonInterface
46} // namespace Mantid
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
The values that are held within a given C++ property type all have a fixed type, required by static t...
Definition: TypeRegistry.h:31
static void subscribe()
Subscribe a handler object for given template type.
Definition: TypeRegistry.h:36
Helper class which provides the Collimation Length for SANS instruments.
This class provides a base-class objects that are able to take a python object and set it on an algor...