STIR  6.2.0
ParsingObject.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
21 #ifndef __stir_ParsingObject_H__
22 #define __stir_ParsingObject_H__
23 
24 #include "stir/KeyParser.h"
25 
26 START_NAMESPACE_STIR
27 
45 {
46 public:
47  ParsingObject();
49  ParsingObject& operator=(const ParsingObject&);
50  virtual ~ParsingObject() {}
51 
57  bool parse(std::istream& f);
58  bool parse(const char* const filename);
60 
61  void ask_parameters();
62 
63  virtual std::string parameter_info();
64 
65 protected:
67  virtual void set_defaults();
69  virtual void initialise_keymap();
71 
72  virtual bool post_processing();
73 
75 
85  virtual void set_key_values();
86 
87 private:
88  bool keymap_is_initialised;
89 
90 protected:
91  KeyParser parser;
92 };
93 
94 END_NAMESPACE_STIR
95 
96 #endif
A class to parse Interfile headers.
Definition: KeyParser.h:161
Declaration of class stir::KeyParser.
A base class for objects that want to be able to parse parameter files.
Definition: ParsingObject.h:44