libdap++  Updated for version 3.8.2
gse_parser.h
Go to the documentation of this file.
1 // -*- mode: c++; c-basic-offset:4 -*-
2 
3 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
4 // Access Protocol.
5 
6 // Copyright (c) 2006 OPeNDAP, Inc.
7 // Author: James Gallagher <jgallagher@opendap.org>
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 //
23 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24 
25 #ifndef _gseclause_h
26 #include "GSEClause.h"
27 #endif
28 
29 #define YYDEBUG 1
30 #undef YYERROR_VERBOSE
31 #define YY_NO_UNPUT 1
32 
33 #define ID_MAX 256
34 
35 #ifndef TRUE
36 #define TRUE 1
37 #define FALSE 0
38 #endif
39 
40 namespace libdap
41 {
42 
45 struct gse_arg
46 {
47  GSEClause *_gsec; // The gse parsed.
48  Grid *_grid; // The Grid being constrained.
49  int _status; // The parser's status.
50 
51  gse_arg(): _gsec(0), _grid(0), _status(1)
52  {}
53  gse_arg(Grid *g): _gsec(0), _grid(g), _status(1)
54  {}
55  virtual ~gse_arg()
56  {}
57 
58  void set_gsec(GSEClause *gsec)
59  {
60  _gsec = gsec;
61  }
63  {
64  return _gsec;
65  }
66  void set_grid(Grid *g)
67  {
68  _grid = g;
69  }
71  {
72  return _grid;
73  }
74  void set_status(int stat)
75  {
76  _status = stat;
77  }
78  int get_status()
79  {
80  return _status;
81  }
82 };
83 
84 } // namespace libdap