OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
TabularSequence.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) 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 
57 {
58 private:
59 protected:
60  void load_prototypes_with_values(BaseTypeRow &btr, bool safe = true);
61 
62 public:
63  TabularSequence(const string &n) : Sequence(n) { }
64  TabularSequence(const string &n, const string &d) : Sequence(n, d) { }
65 
66  TabularSequence(const TabularSequence &rhs) : Sequence(rhs) { }
67 
68  virtual ~TabularSequence() { }
69 
70  virtual BaseType *ptr_duplicate() { return new TabularSequence(*this); }
71 
73  if (this == &rhs)
74  return *this;
75 
76  static_cast<Sequence &>(*this) = rhs; // run Sequence=
77 
78  return *this;
79  }
80 
81  virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval = true);
82  virtual void intern_data(ConstraintEvaluator &eval, DDS &dds);
83 
84  virtual void dump(ostream &strm) const;
85 };
86 
87 } // namespace libdap
88 
89 #endif //_tabular_sequence_h
TabularSequence(const string &n)
virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval=true)
Specialized version of Sequence::serialize() for tables that already hold their data.
virtual BaseType * ptr_duplicate()
virtual void dump(ostream &strm) const
dumps information about this object
static class NCMLUtil overview
TabularSequence(const TabularSequence &rhs)
TabularSequence(const string &n, const string &d)
TabularSequence & operator=(const TabularSequence &rhs)
Specialization of Sequence for tables of data.
virtual void intern_data(ConstraintEvaluator &eval, DDS &dds)
Specialized intern_data().
void load_prototypes_with_values(BaseTypeRow &btr, bool safe=true)