-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVsink.h
54 lines (39 loc) · 1.23 KB
/
Vsink.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**************************************************************************
VSink.h JJS 8/29/95
part of CONICAL, the Computational Neuroscience Class Library
A VSink, or voltage sink, is an object which can can receive current
through a Current.
Requires:
nothing
**************************************************************************/
#ifndef VSINK_H
#define VSINK_H
class Current;
#ifndef NULL
#define NULL 0
#endif
// define a "CurrentNode" class which will be used to keep
// a list of Currents to this VSink...
// NOTE: though a public class, this CurrentNode should NOT be used
// by users! Its implementation may change in the future.
class CurrentNode
{
public:
CurrentNode( Current *pCurrent ) { itsCurrent=pCurrent; itsNext=NULL; }
Current *itsCurrent;
CurrentNode *itsNext;
};
class VSink
{
friend class Current;
public:
VSink( void ); // constructor
~VSink( void ); // destructor
protected:
CurrentNode *itsCurrentList; // list of Currents
virtual void AddCurrent( Current *pCurrent ); // add a Current to the list
virtual void RemoveCurrent( Current *pCurrent ); // remove a Current
// (happens automatically when the Current dies)
char isDying;
};
#endif