My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
module.h
Go to the documentation of this file.
1 /***************************************************************************
2  module.h
3  ----------
4  begin : Thu Nov 5 2009
5  copyright : (C) 2009 by Stefan Jahn
6  email : stefan@lkcc.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef MODULE_H
19 #define MODULE_H
20 
21 // function typedefs for circuits and analyses
22 typedef Element * (* pInfoFunc) (QString&, char * &, bool);
23 typedef Component * (* pCreatorFunc) ();
24 
25 class Module
26 {
27  public:
28  Module ();
29  ~Module ();
30  static void registerModule (QString, pInfoFunc);
31  static void registerComponent (QString, pInfoFunc);
32  static void intoCategory (Module *);
33  static Component * getComponent (QString);
34 
35  public:
36  static QDict<Module> Modules;
37 
38  public:
39  static void registerModules (void);
40  static void unregisterModules (void);
41 
42  public:
44  QString category;
45 };
46 
47 class Category
48 {
49  public:
50  Category ();
51  Category (const QString);
52  ~Category ();
53 
54  public:
55  static QPtrList<Category> Categories;
56 
57  public:
58  static QStringList getCategories (void);
59  static QPtrList<Module> getModules (QString);
60  static int getModulesNr (QString);
61 
62  public:
63  QString Name;
64  QPtrList<Module> Content;
65 };
66 
67 #endif /* __MODULE_H__ */