STIR  6.2.0
RegisteredObject.h
Go to the documentation of this file.
1 //
2 //
12 /*
13  Copyright (C) 2000-2009, Hammersmith Imanet Ltd
14  This file is part of STIR.
15 
16  SPDX-License-Identifier: Apache-2.0
17 
18  See STIR/LICENSE.txt for details
19 */
20 #ifndef __stir_RegisteredObject_H__
21 #define __stir_RegisteredObject_H__
22 
24 #include "stir/FactoryRegistry.h"
26 #include <iostream>
27 #include <string>
28 
29 START_NAMESPACE_STIR
30 
94 template <typename Root>
96 {
97 public:
98  inline RegisteredObject();
99 
107  inline static Root* read_registered_object(std::istream* in, const std::string& registered_name);
108 
110 
116  inline static Root* ask_type_and_parameters();
117 
119 
120  inline static void list_registered_names(std::ostream& stream);
121 
122 protected:
124  typedef Root* (*RootFactory)(std::istream*);
127 
129 
133  inline static RegistryType& registry();
134 };
135 
136 END_NAMESPACE_STIR
137 #include "stir/RegisteredObject.inl"
138 
139 #endif
Declaration of class stir::FactoryRegistry.
Inline implementations for class stir::RegisteredObject.
This class can be used to store &#39;factories&#39; and their corresponding keys. It is essentially a map...
Definition: FactoryRegistry.h:52
FactoryRegistry< std::string, RootFactory, interfile_less > RegistryType
The type of the registry.
Definition: RegisteredObject.h:126
Helper class to provide registry mechanisms to a Base classSuppose you have a hierarchy of classes wi...
Definition: RegisteredObject.h:95
Base class for all classes that can parse .par files (and more?)The only reason that this class exist...
Definition: RegisteredObjectBase.h:40
Functions useful for manipulating Interfile keywords.
Declaration of class stir::RegisteredObjectBase.