[Pkg-electronics-commits] [gnucap] 18/47: turn {DEV, MODEL}_SUBCKT into base class

felix salfelder felix-guest at moszumanska.debian.org
Mon Sep 26 10:35:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository gnucap.

commit 0a51bd241c9f0a9fb0fd3df8bf8a46a3076337b2
Author: Felix Salfelder <felix at salfelder.org>
Date:   Wed Sep 2 16:12:15 2015 +0200

    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 0c193e5..ae066cd 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;
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gnucap.git



More information about the Pkg-electronics-commits mailing list