Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
net.h
Go to the documentation of this file.
1 /*
2  * net.h - net class definitions
3  *
4  * Copyright (C) 2003, 2004, 2005, 2006, 2007 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 __NET_H__
26 #define __NET_H__
27 
28 namespace qucs {
29 
30 class circuit;
31 class node;
32 class nodelist;
33 class nodeset;
34 class analysis;
35 class dataset;
36 class environment;
37 template <class type_t> class ptrlist;
38 
39 class net : public object
40 {
41  public:
42  net ();
43  net (const char *);
44  net (net &);
45  ~net ();
46  circuit * getRoot (void) { return root; }
47  void setRoot (circuit * c) { root = c; }
48  void insertCircuit (circuit *);
49  void removeCircuit (circuit *, int dropping = 1);
50  int containsCircuit (circuit *);
51  int checkCircuitChain (void);
52  void list (void);
53  void reducedCircuit (circuit *);
56  void insertedCircuit (circuit *);
57  void insertedNode (node *);
58  void insertAnalysis (analysis *);
59  void removeAnalysis (analysis *);
60  dataset * runAnalysis (int &);
61  void getDroppedCircuits (nodelist * nodes = NULL);
62  void deleteUnusedCircuits (nodelist * nodes = NULL);
63  int getPorts (void) { return nPorts; }
64  int getReduced (void) { return reduced; }
65  void setReduced (int r) { reduced = r; }
66  int getVoltageSources (void) { return nSources; }
67  void setVoltageSources (int n) { nSources = n; }
68  analysis * findAnalysis (char *);
69  analysis * findAnalysis (int);
70  analysis * findSecondOrder (void);
72  char * getChild (analysis *);
73  void orderAnalysis (void);
75  ptrlist<analysis> * findLastOrderChildren (analysis *);
76  void sortChildAnalyses (analysis *);
77  int containsAnalysis (analysis *, int);
78  environment * getEnv (void) { return env; }
79  void setEnv (environment * e) { env = e; }
80  int countPorts (void);
81  int countNodes (void);
82  int isNonLinear (void);
83  void addNodeset (nodeset *);
84  void delNodeset (void);
85  nodeset * getNodeset (void) { return nset; }
86  void setSrcFactor (nr_double_t f) { srcFactor = f; }
87  nr_double_t getSrcFactor (void) { return srcFactor; }
88  void setActionNet(int, net *);
89  int getNActions(void);
90 
91  private:
95  ptrlist<analysis> * actions;
96  ptrlist<analysis> * orgacts;
98  int nPorts;
99  int nSources;
101  int reduced;
102  int inserted;
104  nr_double_t srcFactor;
105 };
106 
107 } // namespace qucs
108 
109 #endif /* __NET_H__ */
int nCircuits
Definition: net.h:100
circuit * drop
Definition: net.h:93
void removeAnalysis(analysis *)
Definition: net.cpp:190
circuit * getRoot(void)
Definition: net.h:46
nr_double_t getSrcFactor(void)
Definition: net.h:87
int containsCircuit(circuit *)
Definition: net.cpp:175
environment * env
Definition: net.h:97
void insertAnalysis(analysis *)
Definition: net.cpp:183
void setSrcFactor(nr_double_t f)
Definition: net.h:86
net()
Definition: net.cpp:57
int nSources
Definition: net.h:99
analysis * findSecondOrder(void)
Definition: net.cpp:285
void deleteUnusedCircuits(nodelist *nodes=NULL)
Definition: net.cpp:413
ptrlist< analysis > * findLastOrderChildren(analysis *)
Definition: net.cpp:390
Houses the settings for netlist evaluation.
Definition: environment.h:51
int checkCircuitChain(void)
Definition: net.cpp:497
n
Definition: parse_citi.y:147
r
Definition: parse_mdl.y:515
int getVoltageSources(void)
Definition: net.h:66
int nPorts
Definition: net.h:98
int getNActions(void)
Definition: net.cpp:576
ptrlist< analysis > * orgacts
Definition: net.h:96
nodeset * nset
Definition: net.h:92
analysis * findAnalysis(char *)
Definition: net.cpp:197
dataset * runAnalysis(int &)
Definition: net.cpp:234
void list(void)
base class for qucs circuit elements.
Definition: circuit.h:92
analysis * getChildAnalysis(analysis *)
Definition: net.cpp:375
void setVoltageSources(int n)
Definition: net.h:67
int countPorts(void)
Definition: net.cpp:518
void sortChildAnalyses(analysis *)
Definition: net.cpp:354
void insertCircuit(circuit *)
Definition: net.cpp:111
node * findConnectedCircuitNode(node *)
Definition: net.cpp:427
int isNonLinear(void)
Definition: net.cpp:538
generic object class.
Definition: object.h:52
int reduced
Definition: net.h:101
void removeCircuit(circuit *, int dropping=1)
Definition: net.cpp:140
int containsAnalysis(analysis *, int)
Definition: net.cpp:220
nodes
void insertedCircuit(circuit *)
Definition: net.cpp:479
node * findConnectedNode(node *)
Definition: net.cpp:452
int countNodes(void)
Definition: net.cpp:528
void getDroppedCircuits(nodelist *nodes=NULL)
Definition: net.cpp:401
Definition: net.h:39
ptrlist< analysis > * actions
Definition: net.h:95
class for performing circuit analyses.
Definition: analysis.h:82
void setRoot(circuit *c)
Definition: net.h:47
analysis * findLastOrder(analysis *)
Definition: net.cpp:380
void insertedNode(node *)
Definition: net.cpp:488
nr_double_t srcFactor
Definition: net.h:104
void addNodeset(nodeset *)
Definition: net.cpp:548
void setActionNet(int, net *)
Definition: net.cpp:565
char * getChild(analysis *)
Definition: net.cpp:367
circuit * root
Definition: net.h:94
node
void delNodeset(void)
Definition: net.cpp:555
int inserted
Definition: net.h:102
void setEnv(environment *e)
Definition: net.h:79
int getPorts(void)
Definition: net.h:63
void orderAnalysis(void)
Definition: net.cpp:313
int getReduced(void)
Definition: net.h:64
environment * getEnv(void)
Definition: net.h:78
int insertedNodes
Definition: net.h:103
~net()
Definition: net.cpp:81
void reducedCircuit(circuit *)
Definition: net.cpp:471
nodeset * getNodeset(void)
Definition: net.h:85
void setReduced(int r)
Definition: net.h:65