File: u_prblst.h

package info (click to toggle)
gnucap 1%3A0.36~20171003-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 9,336 kB
  • sloc: cpp: 29,323; sh: 319; makefile: 172
file content (73 lines) | stat: -rw-r--r-- 2,837 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
/*$Id: u_prblst.h,v 26.138 2013/04/24 02:32:27 al Exp $ -*- C++ -*-
 * Copyright (C) 2001 Albert Davis
 * 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.
 *------------------------------------------------------------------
 * list of probes
 */
//testing=script,complete 2006.09.28
#ifndef U_PRBLST_H
#define U_PRBLST_H
#include "mode.h"
#include "u_probe.h"
/*--------------------------------------------------------------------------*/
class CARD_LIST;
/*--------------------------------------------------------------------------*/
class INTERFACE PROBELIST {
private:
  typedef std::vector<PROBE> _container;
  _container bag;

  explicit PROBELIST(const PROBELIST&) {unreachable();incomplete();}
public:
  explicit PROBELIST() {}
  ~PROBELIST() {}

  typedef _container::iterator	     iterator;
  typedef _container::const_iterator const_iterator;
  void	   listing(const std::string&)const;
  void     clear();

  void	   remove_list(CS&);
  void     remove_one(CKT_BASE*);
  void     add_list(CS&);
  int	   size()const		{return static_cast<int>(bag.size());}
  const_iterator begin()const	{return bag.begin();}
  const_iterator end()const	{return bag.end();}
  iterator begin()		{return bag.begin();}
  iterator end()		{return bag.end();}
private:
  void	  erase(iterator b, iterator e) {bag.erase(b,e);}
  void	  push_new_probe(const std::string& param, const CKT_BASE* object);
  bool    add_branches(const std::string&,const std::string&,const CARD_LIST*);
  void    add_all_nodes(const std::string&);
};
/*--------------------------------------------------------------------------*/
class INTERFACE PROBE_LISTS {
public:
  PROBELIST alarm[sCOUNT]; // list of alarm probes
  PROBELIST plot[sCOUNT];  // list of plot probes
  PROBELIST print[sCOUNT]; // list of print probes
  PROBELIST store[sCOUNT]; // list of probes to store for postproc
  void purge(CKT_BASE*);
};
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
#endif
// vim:ts=8:sw=2:noet: