cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
module.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef MODULE_H_
5 #define MODULE_H_
6 
7 class module;
8 class t_warnings;
9 
10 class module_list : public Singleton<module_list>
11 {
12  friend class Singleton<module_list>;
13 public:
14  vector<module *> m_l;
15 protected:
17 public:
18  void use(module *m)
19  {
20  m_l.push_back(m);
21  }
22  void zero() const;
23  void comment(t_warnings&) const;
24 };
25 
26 class module
27 {
28 public:
30  {
31  module_list::Inst().use(this);
32  }
33  virtual void zero() = 0;
34  virtual void comment(t_warnings&) = 0;
35  virtual const char* chName() const = 0;
36  virtual ~module() {}
37 };
38 
39 #endif /* MODULE_ */
module()
Definition: module.h:29
virtual ~module()
Definition: module.h:36
virtual void comment(t_warnings &)=0
vector< module * > m_l
Definition: module.h:14
virtual void zero()=0
void zero() const
Definition: module.cpp:8
static module_list & Inst()
Definition: cddefines.h:209
void use(module *m)
Definition: module.h:18
module_list()
Definition: module.h:16
virtual const char * chName() const =0
void comment(t_warnings &) const
Definition: module.cpp:16
Definition: module.h:26