From 0a51bd241c9f0a9fb0fd3df8bf8a46a3076337b2 Mon Sep 17 00:00:00 2001 From: Felix Salfelder Date: Wed, 2 Sep 2015 16:12:15 +0200 Subject: [PATCH] turn {DEV,MODEL}_SUBCKT into base class now it's possible to implement custom subcircuits --- include/d_subckt.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/d_subckt.h b/include/d_subckt.h index 0c193e53..ae066cdb 100644 --- a/include/d_subckt.h +++ b/include/d_subckt.h @@ -31,7 +31,7 @@ //BUG// fixed limit on number of ports /*--------------------------------------------------------------------------*/ class INTERFACE MODEL_SUBCKT : public COMPONENT { -private: +protected: explicit MODEL_SUBCKT(const MODEL_SUBCKT&p); public: explicit MODEL_SUBCKT(); @@ -69,7 +69,7 @@ private: /*--------------------------------------------------------------------------*/ class DEV_SUBCKT : public BASE_SUBCKT { friend class MODEL_SUBCKT; -private: +protected: explicit DEV_SUBCKT(const DEV_SUBCKT&); public: explicit DEV_SUBCKT(); @@ -84,7 +84,9 @@ private: // override virtual int net_nodes()const {return _net_nodes;} CARD* clone()const {return new DEV_SUBCKT(*this);} void precalc_first(); +protected: void expand(); +private: void precalc_last(); double tr_probe_num(const std::string&)const; int param_count_dont_print()const {return common()->COMMON_COMPONENT::param_count();} @@ -98,8 +100,9 @@ private: // override virtual } public: static int count() {return _count;} -private: +protected: const MODEL_SUBCKT* _parent; +private: node_t _nodes[PORTS_PER_SUBCKT]; static int _count; }; -- 2.11.4.GIT