#include <elements.h>
Inheritance diagram for branch::

Public Methods | |
| branch (int b=3) | |
| Default constructor creates a 3-port branch. More... | |
| int | size () |
| branch& | set_branches (int) |
| Wrapper function to change the number of branches. More... | |
| int | get_branches () const |
Private Methods | |
| void | calc () |
| The calculation is done here. More... | |
| void | recalc () |
| recalc() doesn't need to do anything. More... | |
Private Attributes | |
| int | branches |
| The number of branches in this device. More... | |
The default branch has 3 ports. The constructor can take a single int argument to set the number of ports in the branch to some other value:
branch b; // default, 3-port branch named "b"
branch c(4); // this branch has 4 ports
To change the number of ports of the branch once you have declared it, use a member function or assignment as follows:
c.set_branches(2); // now c has only 2 ports
b = branch(5); // now branch b has 5 ports
To find out how many ports a branch has, use either of the following two member functions (each returns an int):
size();
get_branches();
Definition at line 687 of file elements.h.
|
|
Default constructor creates a 3-port branch.
Definition at line 110 of file elements.cc. |
|
|
The calculation is done here. It is called whenever the number of branches is changed. Definition at line 127 of file elements.cc. Referenced by branch(), and set_branches().
|
|
|
Definition at line 708 of file elements.h. |
|
|
recalc() doesn't need to do anything.
Reimplemented from nport. Definition at line 721 of file elements.h. |
|
|
Wrapper function to change the number of branches.
Definition at line 118 of file elements.cc. |
|
|
Reimplemented from nport. Definition at line 698 of file elements.h. |
|
|
The number of branches in this device. Default value is 3. Definition at line 712 of file elements.h. |
Please direct comments and corrections to
supermix@submm.caltech.edu
Go to the supermix home page
Generated by
1.2.7