My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
check_mdl.h
Go to the documentation of this file.
1 /*
2  * check_mdl.h - checker definitions for an IC-CAP MDL file
3  *
4  * Copyright (C) 2006 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: check_mdl.h 1825 2011-03-11 20:42:14Z ela $
22  *
23  */
24 
25 #ifndef __CHECK_MDL_H__
26 #define __CHECK_MDL_H__
27 
28 class dataset;
29 class vector;
30 
31 /* Externalize variables used by the scanner and parser. */
32 extern int mdl_lineno;
33 extern FILE * mdl_in;
34 void mdl_restart (FILE *);
35 
36 __BEGIN_DECLS
37 
38 /* Available functions of the checker. */
39 int mdl_check (void);
40 int mdl_parse (void);
41 int mdl_error (char *);
42 int mdl_lex (void);
43 int mdl_lex_destroy (void);
44 void mdl_destroy (void);
45 void mdl_init (void);
46 
47 __END_DECLS
48 
49 /* Declaration of MDL data structures. */
50 extern dataset * mdl_result;
51 extern struct mdl_link_t * mdl_root;
52 extern struct mdl_sync_t * mdl_sync_root;
53 
54 struct mdl_point_t {
55  int n;
56  int x;
57  int y;
58  double r;
59  double i;
60  struct mdl_point_t * next;
61 };
62 
64  char * type;
65  int size;
66  int x;
67  int y;
68 };
69 
70 struct mdl_element_t {
71  int number;
72  char * name;
73  char * value;
74  char * attr;
75  struct mdl_element_t * next;
76 };
77 
79  char * name;
80  struct mdl_element_t * data;
81 };
82 
83 struct mdl_table_t {
84  char * name;
85  struct mdl_element_t * data;
86 };
87 
88 struct mdl_dataset_t {
89  char * type1;
90  struct mdl_point_t * data1;
91  char * type2;
92  struct mdl_point_t * data2;
94 };
95 
96 struct mdl_link_t {
97  struct mdl_link_t * parent;
98  char * name;
99  char * type;
101  struct mdl_link_t * next;
102 };
103 
105  int type;
106  union {
107  struct mdl_link_t * link;
108  struct mdl_data_t * data;
109  struct mdl_table_t * table;
110  };
112 };
113 
114 struct mdl_data_t {
116 };
117 
119  int type;
120  union {
121  struct mdl_dataset_t * data;
123  };
125 };
126 
127 struct mdl_sync_t {
128  char * master;
129  char * name;
130  double ratio;
131  double offset;
132  struct mdl_sync_t * next;
133 };
134 
135 #endif /* __CHECK_MDL_H__ */