-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathd_gpolyk_wrap.cc
60 lines (59 loc) · 2.26 KB
/
d_gpolyk_wrap.cc
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
55
56
57
58
59
60
/* -*- C++ -*-
* Copyright (C) 2001 Albert Davis
* 2015-18 Felix Salfelder
* Author: Albert Davis <aldavis@gnu.org>
*
* This file is part of "Gnucap", the Gnu Circuit Analysis Package
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
/*--------------------------------------------------------------------------*/
#include <globals.h>
#include <e_compon.h>
#include <e_node.h>
/*--------------------------------------------------------------------------*/
#ifndef HAVE_UINT_T
typedef int uint_t;
#endif
/*--------------------------------------------------------------------------*/
namespace {
/*--------------------------------------------------------------------------*/
class DEV_G_POLY_K : public COMPONENT {
node_t* _n{nullptr};
node_t& n_(int i)const override { untested(); return _n[i]; }
public:
std::string value_name()const override { untested(); return "dummy"; }
std::string port_name(uint_t)const override { untested(); return "dummy"; }
CARD* clone()const override { untested();
const CARD* c = device_dispatcher["cpoly_g"];
assert(c);
CARD* c2 = c->clone();
COMPONENT* d = prechecked_cast<COMPONENT*>(c2);
assert(d);
const COMMON_COMPONENT* b = bm_dispatcher["poly_k"];
assert(b);
COMMON_COMPONENT* bc = b->clone();
d->attach_common(bc);
// d->set_dev_type("g_poly_k");
// assert(d->dev_type() == "g_poly_k");
return d;
}
private:
bool print_type_in_spice()const override {untested(); return false; }
}p1;
DISPATCHER<CARD>::INSTALL d1(&device_dispatcher, "g_poly_k|G_poly", &p1);
/*--------------------------------------------------------------------------*/
}