LCOV - code coverage report
Current view: top level - src - nodelist.h (source / functions) Hit Total Coverage
Test: qucs-core-0.0.19 Code Coverage Lines: 1 1 100.0 %
Date: 2015-01-05 16:01:02 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * nodelist.h - node list class definitions
       3                 :            :  *
       4                 :            :  * Copyright (C) 2003, 2004, 2008 Stefan Jahn <stefan@lkcc.org>
       5                 :            :  *
       6                 :            :  * This is free software; you can redistribute it and/or modify
       7                 :            :  * it under the terms of the GNU General Public License as published by
       8                 :            :  * the Free Software Foundation; either version 2, or (at your option)
       9                 :            :  * any later version.
      10                 :            :  *
      11                 :            :  * This software is distributed in the hope that it will be useful,
      12                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 :            :  * GNU General Public License for more details.
      15                 :            :  *
      16                 :            :  * You should have received a copy of the GNU General Public License
      17                 :            :  * along with this package; see the file COPYING.  If not, write to
      18                 :            :  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
      19                 :            :  * Boston, MA 02110-1301, USA.
      20                 :            :  *
      21                 :            :  * $Id$
      22                 :            :  *
      23                 :            :  */
      24                 :            : 
      25                 :            : #ifndef __NODELIST_H__
      26                 :            : #define __NODELIST_H__
      27                 :            : 
      28                 :            : namespace qucs {
      29                 :            : 
      30                 :            : class node;
      31                 :            : class net;
      32                 :            : 
      33                 :            : struct nodelist_t {
      34                 :            :   int n;
      35                 :            :   char * name;
      36                 :            :   node ** nodes;
      37                 :            :   int nNodes;
      38                 :            :   int nAlloc;
      39                 :            :   int internal;
      40                 :            :   struct nodelist_t * next;
      41                 :            : };
      42                 :            : 
      43                 :            : class nodelist
      44                 :            : {
      45                 :            :  public:
      46                 :            :   nodelist ();
      47                 :            :   nodelist (net *);
      48                 :            :   nodelist (const nodelist &);
      49                 :            :   ~nodelist ();
      50                 :            :   void add (char *, int intern = 0);
      51                 :            :   void append (char *, int intern = 0);
      52                 :      22700 :   struct nodelist_t * getRoot (void) { return root; }
      53                 :            :   int length (void);
      54                 :            :   int contains (char *);
      55                 :            :   int getNodeNr (char *);
      56                 :            :   char * get (int);
      57                 :            :   int isInternal (int);
      58                 :            :   void addCircuitNode (struct nodelist_t *, node *);
      59                 :            :   void assignNodes (void);
      60                 :            :   void print (void);
      61                 :            :   struct nodelist_t * getNode (int);
      62                 :            :   struct nodelist_t * getLastNode (void);
      63                 :            :   char * getNodeString (int);
      64                 :            :   void sort (void);
      65                 :            :   struct nodelist_t * copy (struct nodelist_t *);
      66                 :            :   void add (struct nodelist_t *);
      67                 :            :   void append (struct nodelist_t *);
      68                 :            :   void release (struct nodelist_t *);
      69                 :            :   void remove (char *);
      70                 :            :   void remove (struct nodelist_t *, int keep = 0);
      71                 :            :   void remove (circuit *);
      72                 :            :   struct nodelist_t * create (char *, int);
      73                 :            :   void insert (struct nodelist_t *);
      74                 :            :   void insert (circuit *);
      75                 :            :   void delCircuitNode (struct nodelist_t *, node *);
      76                 :            :   void sortedNodes (node **, node **);
      77                 :            :   struct nodelist_t * getNode (char *);
      78                 :            : 
      79                 :            :  private:
      80                 :            :   struct nodelist_t ** narray;
      81                 :            :   struct nodelist_t * root;
      82                 :            :   struct nodelist_t * last;
      83                 :            :   char * txt;
      84                 :            :   int sorting;
      85                 :            : };
      86                 :            : 
      87                 :            : } // namespace qucs
      88                 :            : 
      89                 :            : #endif /* __NODELIST_H__ */

Generated by: LCOV version 1.11