21 #ifndef __stir_RegisteredParsingObject_H__ 22 #define __stir_RegisteredParsingObject_H__ 76 template <
typename Derived,
typename Base,
typename Parent = Base>
82 #if !defined(SWIG) || (SWIG_VERSION >= 0x040300) 94 inline static Base* read_from_stream(std::istream*);
97 inline std::string get_registered_name()
const override;
99 inline std::string parameter_info()
override;
111 Parent::registry().add_to_registry(Derived::registered_name, &read_from_stream);
124 cerr <<
"In RegisterIt destructor for " << Derived::registered_name<<endl;
125 cerr <<
"Current keys: ";
126 Parent::registry().list_keys(cerr);
127 Parent::registry().remove_from_registry(Derived::registered_name);
Declaration of class stir::ParsingObject.
Inline implementations for class stir::RegisteredParsingObject.
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
~RegisterIt()
Destructor should remove it from the registry.
Definition: RegisteredParsingObject.h:119
RegisterIt()
Default constructor adds the type to the registry.
Definition: RegisteredParsingObject.h:107
A helper class to allow automatic registration.
Definition: RegisteredParsingObject.h:104