Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
module.h
Go to the documentation of this file.
1 /*
2  * module.h - module class definitions
3  *
4  * Copyright (C) 2008 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id$
22  *
23  */
24 
25 #ifndef __MODULE_H__
26 #define __MODULE_H__
27 
28 #include <list>
29 
30 #include "hash.h"
31 
32 namespace qucs {
33 
34 class circuit;
35 class analysis;
36 
37 // function typedefs for circuits and analyses
38 typedef circuit * (* circuit_creator_t) (void);
39 typedef analysis * (* analysis_creator_t) (void);
40 typedef struct define_t * (* circuit_definer_t) (void);
41 typedef struct define_t * (* analysis_definer_t) (void);
42 typedef struct define_t * (* misc_definer_t) (void);
43 
44 class module
45 {
46  public:
47  module ();
48  ~module ();
49 
51  static void registerModules (void);
52  static void unregisterModules (void);
53  static struct define_t * getModule (char *);
54  static void print (void);
55 
56  static void registerDynamicModules (char *proj, std::list<std::string> modlist);
57  static void closeDynamicLibs (void);
58 
59  private:
61  static void registerModule (struct define_t *);
62  static void registerModule (misc_definer_t);
63  static void registerModule (const char *, module *);
64 
65  public:
67 
68  public:
69  struct define_t * definition;
72 
73 };
74 
75 } // namespace qucs
76 
77 #endif /* __MODULE_H__ */
static void registerDynamicModules(char *proj, std::list< std::string > modlist)
Definition: module.cpp:441
struct define_t *(* analysis_definer_t)(void)
Definition: module.h:41
circuit *(* circuit_creator_t)(void)
Definition: module.h:38
static void registerModules(void)
Definition: module.cpp:156
circuit_creator_t circreate
Definition: module.h:70
base class for qucs circuit elements.
Definition: circuit.h:92
static struct define_t * getModule(char *)
Definition: module.cpp:139
static qucs::hash< module > modules
Definition: module.h:66
struct define_t *(* circuit_definer_t)(void)
Definition: module.h:40
static void closeDynamicLibs(void)
Definition: module.cpp:553
class for performing circuit analyses.
Definition: analysis.h:82
analysis *(* analysis_creator_t)(void)
Definition: module.h:39
struct define_t * definition
Definition: module.h:69
static void unregisterModules(void)
Definition: module.cpp:323
analysis_creator_t anacreate
Definition: module.h:71
static void registerModule(circuit_definer_t, circuit_creator_t)
static void print(void)
struct define_t *(* misc_definer_t)(void)
Definition: module.h:42