bes  Updated for version 3.20.6
TabularSequence.h
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) 2002,2003 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 //
23 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24 
25 // (c) COPYRIGHT URI/MIT 1994-1999
26 // Please read the full copyright statement in the file COPYRIGHT_URI.
27 //
28 // Authors:
29 // jhrg,jimg James Gallagher <jgallagher@gso.uri.edu>
30 
31 // Interface for the class Sequence. A sequence contains a single set
32 // of variables, all at the same lexical level just like a structure
33 // (and like a structure, it may contain other ctor types...). Unlike
34 // a structure, a sequence defines a pattern that is repeated N times
35 // for a sequence of N elements. Thus, Sequence { String name; Int32
36 // age; } person; means a sequence of N persons where each contain a
37 // name and age. The sequence can be arbitrarily long (i.e., you don't
38 // know N by looking at the sequence declaration.
39 //
40 // jhrg 9/14/94
41 
42 #ifndef _tabular_sequence_h
43 #define _tabular_sequence_h 1
44 
45 #include <Sequence.h>
46 
47 namespace libdap {
48 class ConstraintEvaluator;
49 class DDS;
50 class Marshaller;
51 }
52 
53 namespace functions {
54 
59 class TabularSequence: public libdap::Sequence
60 {
61 private:
62 protected:
63  void load_prototypes_with_values(libdap::BaseTypeRow &btr, bool safe = true);
64 
65 public:
74  TabularSequence(const string &n) : Sequence(n) { }
75 
86  TabularSequence(const string &n, const string &d) : Sequence(n, d) { }
87 
89  TabularSequence(const TabularSequence &rhs) : Sequence(rhs) { }
90 
91  virtual ~TabularSequence() { }
92 
93  virtual BaseType *ptr_duplicate() { return new TabularSequence(*this); }
94 
95  TabularSequence &operator=(const TabularSequence &rhs) {
96  if (this == &rhs)
97  return *this;
98 
99  static_cast<Sequence &>(*this) = rhs; // run Sequence=
100 
101  return *this;
102  }
103 
104  virtual bool serialize(libdap::ConstraintEvaluator &eval, libdap::DDS &dds, libdap::Marshaller &m, bool ce_eval = true);
105  virtual void intern_data(libdap::ConstraintEvaluator &eval, libdap::DDS &dds);
106 
107  virtual void dump(ostream &strm) const;
108 };
109 
110 } // namespace functions
111 
112 #endif //_tabular_sequence_h
functions::TabularSequence::dump
virtual void dump(ostream &strm) const
dumps information about this object
Definition: TabularSequence.cc:251
functions::TabularSequence::TabularSequence
TabularSequence(const string &n, const string &d)
The Sequence server-side constructor.
Definition: TabularSequence.h:86
functions::TabularSequence::TabularSequence
TabularSequence(const TabularSequence &rhs)
The Sequence copy constructor.
Definition: TabularSequence.h:89
functions::TabularSequence::intern_data
virtual void intern_data(libdap::ConstraintEvaluator &eval, libdap::DDS &dds)
Definition: TabularSequence.cc:195
libdap
Definition: BESDapFunctionResponseCache.h:35
functions::TabularSequence::TabularSequence
TabularSequence(const string &n)
The Sequence constructor.
Definition: TabularSequence.h:74
functions::TabularSequence
Specialization of Sequence for tables of data.
Definition: TabularSequence.h:59
functions::TabularSequence::serialize
virtual bool serialize(libdap::ConstraintEvaluator &eval, libdap::DDS &dds, libdap::Marshaller &m, bool ce_eval=true)
Definition: TabularSequence.cc:142