Qucs-core  0.0.19
check_zvr.h
Go to the documentation of this file.
00001 /*
00002  * check_zvr.h - checker definitions for a zvr file
00003  *
00004  * Copyright (C) 2006 Stefan Jahn <stefan@lkcc.org>
00005  *
00006  * This is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  *
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this package; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  * $Id$
00022  *
00023  */
00024 
00025 #ifndef __CHECK_ZVR_H__
00026 #define __CHECK_ZVR_H__
00027 
00028 // forward declarations
00029 namespace qucs {
00030   class dataset;
00031   class vector;
00032 }
00033 
00034 /* Externalize variables used by the scanner and parser. */
00035 extern int zvr_lineno;
00036 extern FILE * zvr_in;
00037 void zvr_restart (FILE *);
00038 
00039 __BEGIN_DECLS
00040 
00041 /* Available functions of the checker. */
00042 int  zvr_check (void);
00043 int  zvr_parse (void);
00044 int  zvr_error (const char *);
00045 int  zvr_lex (void);
00046 int  zvr_lex_destroy (void);
00047 void zvr_destroy (void);
00048 void zvr_init (void);
00049 
00050 __END_DECLS
00051 
00052 /* Declaration of ZVR data structures. */
00053 extern qucs::dataset * zvr_result;
00054 extern struct zvr_data_t * zvr_root;
00055 
00056 struct zvr_header_t {
00057   double zref;
00058   double start;
00059   double stop;
00060   char * funit;
00061   int points;
00062   char * d_TYP;
00063   char * d_UNT;
00064   char * d_FMT;
00065 };
00066 
00067 struct zvr_vector_t {
00068   char * n1;
00069   char * n2;
00070   char * nf;
00071   qucs::vector * vi;
00072   qucs::vector * vd;
00073 };
00074 
00075 struct zvr_line_t {
00076   double d;
00077   double r, i;
00078   struct zvr_line_t * next;
00079 };
00080 
00081 struct zvr_data_t {
00082   struct zvr_header_t * h;
00083   struct zvr_vector_t * v;
00084   struct zvr_line_t * d;
00085   struct zvr_data_t * next;
00086 };
00087 
00088 
00089 #endif /* __CHECK_ZVR_H__ */