libdap  Updated for version 3.20.3
libdap4 is an implementation of OPeNDAP's DAP protocol.
Structure.cc
1 
2 // -*- mode: c++; c-basic-offset:4 -*-
3 
4 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
5 // Access Protocol.
6 
7 // Copyright (c) 2002,2003 OPeNDAP, Inc.
8 // Author: James Gallagher <jgallagher@opendap.org>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 //
24 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25 
26 // (c) COPYRIGHT URI/MIT 1994-1999
27 // Please read the full copyright statement in the file COPYRIGHT_URI.
28 //
29 // Authors:
30 // jhrg,jimg James Gallagher <jgallagher@gso.uri.edu>
31 
32 // Implementation for the class Structure
33 //
34 // jhrg 9/14/94
35 
36 //#define DODS_DEBUG
37 
38 #include "config.h"
39 
40 #include <sstream>
41 
42 #include "Byte.h"
43 #include "Int16.h"
44 #include "UInt16.h"
45 #include "Int32.h"
46 #include "UInt32.h"
47 #include "Float32.h"
48 #include "Float64.h"
49 #include "Str.h"
50 #include "Url.h"
51 #include "Array.h"
52 #include "Structure.h"
53 #include "Sequence.h"
54 #include "Grid.h"
55 
56 #include "DDS.h"
57 #include "ConstraintEvaluator.h"
58 
59 #include "D4Attributes.h"
60 #include "D4Group.h"
61 
62 #include "XDRStreamMarshaller.h"
63 #include "util.h"
64 #include "debug.h"
65 #include "InternalErr.h"
66 #include "escaping.h"
67 #include "DapIndent.h"
68 
69 using std::cerr;
70 using std::endl;
71 
72 namespace libdap {
73 
74 #if 0
75 
79 void
80 Structure::m_duplicate(const Structure &s)
81 {
82  Constructor::m_duplicate(s);
83 #if 0
84  Structure &cs = const_cast<Structure &>(s);
85 
86  DBG(cerr << "Copying structure: " << name() << endl);
87 
88  for (Vars_iter i = cs.d_vars.begin(); i != cs.d_vars.end(); i++) {
89  DBG(cerr << "Copying field: " << (*i)->name() << endl);
90  // Jose Garcia
91  // I think this assert here is part of a debugging
92  // process since it is going along with a DBG call
93  // I leave it here since it can be remove by defining NDEBUG.
94  // assert(*i);
95  BaseType *btp = (*i)->ptr_duplicate();
96  btp->set_parent(this);
97  d_vars.push_back(btp);
98  }
99 #endif
100 }
101 #endif
102 
110 Structure::Structure(const string &n) : Constructor(n, dods_structure_c)
111 {}
112 
122 Structure::Structure(const string &n, const string &d)
123  : Constructor(n, d, dods_structure_c)
124 {}
125 
128 {
129  DBG(cerr << "In Structure::copy_ctor for " << name() << endl);
130  //m_duplicate(rhs);
131 }
132 
133 Structure::~Structure()
134 {
135 }
136 
137 BaseType *
139 {
140  return new Structure(*this);
141 }
142 
152 void
154 {
155  DBG(cerr << __func__ <<"() - BEGIN" << endl;);
156  // Here we create a new Structure and then use it
157  // as the target container for the transformed versions of
158  // all the member variables by calling Constructor::transform_to_dap4() and
159  // passing our new target Structure in as the target container.
160  Structure *dest = new Structure(name());
161  DBG(cerr << __func__ <<"() - Calling Constructor::transform_to_dap4("<<
162  "'" << root->name() << "':" << (void*)root << ","
163  "'" << dest->name() << "':" << (void*)dest << ")"
164  << endl; );
165  Constructor::transform_to_dap4(root, dest);
166  container->add_var_nocopy(dest);
167  DBG(cerr << __func__ <<"() - Added new Structure '" << dest->name() << "' (" << (void*)dest <<
168  ") to the container '" << container->name() <<"'" << endl;);
169  DBG(cerr << __func__ <<"() - END"<< endl;);
170 }
171 
172 
179 vector<BaseType *> *
181 {
182  DBG(cerr << " " << __func__ << " BEGIN" << endl);
183  Structure *dest = new Structure(name());
184 
185  // convert the Structure's d4 attributes to a dap2 attribute table.
186  AttrTable *attrs = this->attributes()->get_AttrTable(name());
187  dest->set_is_dap4(false);
188 
189  vector<BaseType *> dropped_vars;
190  for (Structure::Vars_citer i = var_begin(), e = var_end(); i != e; ++i) {
191  vector<BaseType *> *new_vars = (*i)->transform_to_dap2(attrs);
192  if (new_vars) { // Might be un-mappable
193  // It's not so game on..
194  vector<BaseType*>::iterator vIter = new_vars->begin();
195  vector<BaseType*>::iterator end = new_vars->end();
196  for( ; vIter!=end ; vIter++ ){
197  BaseType *new_var = (*vIter);
198  new_var->set_parent(dest);
199  dest->add_var_nocopy(new_var);
200  (*vIter) = NULL;
201  }
202  delete new_vars;
203 
204  }
205  else {
206  // Got a NULL, so we are dropping this var.
207  dropped_vars.push_back(*i);
208  }
209  }
210 
211  AttrTable *dv_attr_table = make_dropped_vars_attr_table(&dropped_vars);
212  if(dv_attr_table){
213  DBG(cerr << " " << __func__ << "() - Adding "<< dv_attr_table->get_name() << " AttrTable" << endl);
214  attrs->append_container(dv_attr_table,dv_attr_table->get_name());
215  }
216  DBG(attrs->print(cerr,"",true););
217  // Since this does a copy we gotta delete the attrs when done
218  dest->set_attr_table(*attrs);
219  delete attrs;
220 
221  vector<BaseType *> *result = new vector<BaseType *>();
222  result->push_back(dest);
223  DBG(cerr << " " << __func__ << " END" << endl);
224  return result;
225 }
226 
227 
228 
229 
230 
231 Structure &
232 Structure::operator=(const Structure &rhs)
233 {
234  DBG(cerr << "Entering Structure::operator=" << endl);
235  if (this == &rhs)
236  return *this;
237 
238  dynamic_cast<Constructor &>(*this) = rhs; // run Constructor=
239 
240  //m_duplicate(rhs);
241 
242  DBG(cerr << "Exiting Structure::operator=" << endl);
243  return *this;
244 }
245 
246 #if 0
247 int
248 Structure::element_count(bool leaves)
249 {
250  if (!leaves)
251  return d_vars.size();
252  else {
253  int i = 0;
254  for (Vars_iter j = d_vars.begin(); j != d_vars.end(); j++) {
255  i += (*j)->element_count(leaves);
256  }
257  return i;
258  }
259 }
260 #endif
261 
262 bool
264 {
265  bool linear = true;
266  for (Vars_iter i = d_vars.begin(); linear && i != d_vars.end(); i++) {
267  if ((*i)->type() == dods_structure_c)
268  linear = linear && static_cast<Structure*>((*i))->is_linear();
269  else
270  linear = linear && (*i)->is_simple_type();
271  }
272 
273  return linear;
274 }
275 
276 #if 0
277 void
278 Structure::set_send_p(bool state)
279 {
280  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
281  (*i)->set_send_p(state);
282  }
283 
284  BaseType::set_send_p(state);
285 }
286 
287 void
288 Structure::set_read_p(bool state)
289 {
290  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
291  (*i)->set_read_p(state);
292  }
293 
294  BaseType::set_read_p(state);
295 }
296 #endif
297 #if 0
298 
303 void
304 Structure::set_in_selection(bool state)
305 {
306  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
307  (*i)->set_in_selection(state);
308  }
309 
311 }
312 #endif
313 
314 void
316 {
317  for (Vars_iter i = var_begin(); i != var_end(); i++) {
318  if ((*i)->type() == dods_sequence_c)
319  static_cast<Sequence&>(**i).set_leaf_sequence(++level);
320  else if ((*i)->type() == dods_structure_c)
321  static_cast<Structure&>(**i).set_leaf_sequence(level);
322  }
323 }
324 
325 #if 0
326 
330 void
332 {
333  // Jose Garcia
334  // Passing and invalid pointer to an object is a developer's error.
335  if (!bt)
336  throw InternalErr(__FILE__, __LINE__, "The BaseType parameter cannot be null.");
337 
338  if (bt->is_dap4_only_type())
339  throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Structure.");
340 
341  // Jose Garcia
342  // Now we add a copy of bt so the external user is able to destroy bt as
343  // he/she wishes. The policy is: "If it is allocated outside, it is
344  // deallocated outside, if it is allocated inside, it is deallocated
345  // inside"
346  BaseType *btp = bt->ptr_duplicate();
347  btp->set_parent(this);
348  d_vars.push_back(btp);
349 }
350 
355 void
356 Structure::add_var_nocopy(BaseType *bt, Part)
357 {
358  if (!bt)
359  throw InternalErr(__FILE__, __LINE__, "The BaseType parameter cannot be null.");
360 
361  if (bt->is_dap4_only_type())
362  throw InternalErr(__FILE__, __LINE__, "Attempt to add a DAP4 type to a DAP2 Structure.");
363 
364  bt->set_parent(this);
365  d_vars.push_back(bt);
366 }
367 
368 
372 void
373 Structure::del_var(const string &n)
374 {
375  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
376  if ((*i)->name() == n) {
377  BaseType *bt = *i ;
378  d_vars.erase(i) ;
379  delete bt ; bt = 0;
380  return;
381  }
382  }
383 }
384 #endif
385 #if 0
386 
391 bool Structure::read()
392 {
393  if (!read_p()) {
394  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
395  (*i)->read();
396  }
397  set_read_p(true);
398  }
399 
400  return false;
401 }
402 #endif
403 #if 0
404 // TODO Recode to use width(bool)
405 unsigned int
407 {
408  unsigned int sz = 0;
409 
410  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
411  sz += (*i)->width();
412  }
413 
414  return sz;
415 }
416 
424 unsigned int
425 Structure::width(bool constrained)
426 {
427  unsigned int sz = 0;
428 
429  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
430  if (constrained) {
431  if ((*i)->send_p())
432  sz += (*i)->width(constrained);
433  }
434  else {
435  sz += (*i)->width(constrained);
436  }
437  }
438 
439  return sz;
440 }
441 #endif
442 
443 #if 0
444 void
445 Structure::intern_data(ConstraintEvaluator & eval, DDS & dds)
446 {
447  DBG(cerr << "Structure::intern_data: " << name() << endl);
448  if (!read_p())
449  read(); // read() throws Error and InternalErr
450 
451  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
452  if ((*i)->send_p()) {
453  (*i)->intern_data(eval, dds);
454  }
455  }
456 }
457 
458 bool
459 Structure::serialize(ConstraintEvaluator &eval, DDS &dds,
460  Marshaller &m, bool ce_eval)
461 {
462 #if USE_LOCAL_TIMEOUT_SCHEME
463  dds.timeout_on();
464 #endif
465  if (!read_p())
466  read(); // read() throws Error and InternalErr
467 
468 #if EVAL
469  if (ce_eval && !eval.eval_selection(dds, dataset()))
470  return true;
471 #endif
472 #if USE_LOCAL_TIMEOUT_SCHEME
473  dds.timeout_off();
474 #endif
475  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
476  if ((*i)->send_p()) {
477 #ifdef CHECKSUMS
478  XDRStreamMarshaller *sm = dynamic_cast<XDRStreamMarshaller*>(&m);
479  if (sm && sm->checksums() && (*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
480  sm->reset_checksum();
481 
482  (*i)->serialize(eval, dds, m, false);
483 
484  if (sm && sm->checksums() && (*i)->type() != dods_structure_c && (*i)->type() != dods_grid_c)
485  sm->get_checksum();
486 #else
487  (*i)->serialize(eval, dds, m, false);
488 #endif
489  }
490  }
491 
492  return true;
493 }
494 
495 bool
496 Structure::deserialize(UnMarshaller &um, DDS *dds, bool reuse)
497 {
498  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
499  (*i)->deserialize(um, dds, reuse);
500  }
501 
502  return false;
503 }
504 #endif
505 #if 0
506 
515 unsigned int
516 Structure::val2buf(void *, bool)
517 {
518  return sizeof(Structure);
519 }
520 
524 unsigned int
525 Structure::buf2val(void **)
526 {
527  return sizeof(Structure);
528 }
529 #endif
530 
531 #if 0
532 BaseType *
533 Structure::var(const string &name, bool exact_match, btp_stack *s)
534 {
535  string n = www2id(name);
536 
537  if (exact_match)
538  return m_exact_match(n, s);
539  else
540  return m_leaf_match(n, s);
541 }
542 
544 BaseType *
545 Structure::var(const string &n, btp_stack &s)
546 {
547  string name = www2id(n);
548 
549  BaseType *btp = m_exact_match(name, &s);
550  if (btp)
551  return btp;
552 
553  return m_leaf_match(name, &s);
554 }
555 #endif
556 #if 0
557 // Private method to find a variable using the shorthand name. This
558 // should be moved to Constructor.
559 BaseType *
560 Structure::m_leaf_match(const string &name, btp_stack *s)
561 {
562  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
563  if ((*i)->name() == name) {
564  if (s) {
565  DBG(cerr << "Pushing " << this->name() << endl);
566  s->push(static_cast<BaseType *>(this));
567  }
568  return *i;
569  }
570  if ((*i)->is_constructor_type()) {
571  BaseType *btp = (*i)->var(name, false, s);
572  if (btp) {
573  if (s) {
574  DBG(cerr << "Pushing " << this->name() << endl);
575  s->push(static_cast<BaseType *>(this));
576  }
577  return btp;
578  }
579  }
580  }
581 
582  return 0;
583 }
584 
585 // Breadth-first search for NAME. If NAME contains one or more dots (.)
586 // TODO The btp_stack is not needed since there are 'back pointers' in
587 // BaseType.
588 BaseType *
589 Structure::m_exact_match(const string &name, btp_stack *s)
590 {
591  // Look for name at the top level first.
592  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
593  if ((*i)->name() == name) {
594  if (s)
595  s->push(static_cast<BaseType *>(this));
596 
597  return *i;
598  }
599  }
600 
601  // If it was not found using the simple search, look for a dot and
602  // search the hierarchy.
603  string::size_type dot_pos = name.find("."); // zero-based index of `.'
604  if (dot_pos != string::npos) {
605  string aggregate = name.substr(0, dot_pos);
606  string field = name.substr(dot_pos + 1);
607 
608  BaseType *agg_ptr = var(aggregate);
609  if (agg_ptr) {
610  if (s)
611  s->push(static_cast<BaseType *>(this));
612 
613  return agg_ptr->var(field, true, s); // recurse
614  }
615  else
616  return 0; // qualified names must be *fully* qualified
617  }
618 
619  return 0;
620 }
621 #endif
622 #if 0
623 void
624 Structure::print_val(FILE *out, string space, bool print_decl_p)
625 {
626  ostringstream oss;
627  print_val(oss, space, print_decl_p);
628  fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
629 }
630 
631 void
632 Structure::print_val(ostream &out, string space, bool print_decl_p)
633 {
634  if (print_decl_p) {
635  print_decl(out, space, false);
636  out << " = " ;
637  }
638 
639  out << "{ " ;
640  for (Vars_citer i = d_vars.begin(); i != d_vars.end();
641  i++, (void)(i != d_vars.end() && out << ", ")) {
642  (*i)->print_val(out, "", false);
643  }
644 
645  out << " }" ;
646 
647  if (print_decl_p)
648  out << ";\n" ;
649 }
650 #endif
651 
652 #if 0
653 bool
654 Structure::check_semantics(string &msg, bool all)
655 {
656  if (!BaseType::check_semantics(msg))
657  return false;
658 
659  bool status = true;
660 
661  if (!unique_names(d_vars, name(), type_name(), msg))
662  return false;
663 
664  if (all) {
665  for (Vars_iter i = d_vars.begin(); i != d_vars.end(); i++) {
666  //assert(*i);
667  if (!(*i)->check_semantics(msg, true)) {
668  status = false;
669  goto exit;
670  }
671  }
672  }
673 
674 exit:
675  return status;
676 }
677 #endif
678 
687 void
688 Structure::dump(ostream &strm) const
689 {
690  strm << DapIndent::LMarg << "Structure::dump - ("
691  << (void *)this << ")" << endl ;
692  DapIndent::Indent() ;
693  Constructor::dump(strm) ;
694  DapIndent::UnIndent() ;
695 }
696 
697 } // namespace libdap
698 
libdap::BaseType::set_attr_table
virtual void set_attr_table(const AttrTable &at)
Definition: BaseType.cc:582
libdap::BaseType::ptr_duplicate
virtual BaseType * ptr_duplicate()=0
libdap::Constructor::set_read_p
virtual void set_read_p(bool state)
Sets the value of the read_p property.
Definition: Constructor.cc:218
libdap::Constructor::width
virtual unsigned int width(bool constrained=false) const
Definition: Constructor.cc:249
libdap::Constructor::var_end
Vars_iter var_end()
Definition: Constructor.cc:364
libdap::Structure::transform_to_dap2
virtual vector< BaseType * > * transform_to_dap2(AttrTable *parent_attr_table)
DAP4 to DAP2 transform.
Definition: Structure.cc:180
libdap::BaseType::name
virtual string name() const
Returns the name of the class instance.
Definition: BaseType.cc:312
libdap::Structure::ptr_duplicate
virtual BaseType * ptr_duplicate()
Definition: Structure.cc:138
libdap::Constructor::add_var
virtual void add_var(BaseType *bt, Part part=nil)
Definition: Constructor.cc:407
libdap::Constructor::del_var
virtual void del_var(const string &name)
Definition: Constructor.cc:448
libdap::Structure::transform_to_dap4
virtual void transform_to_dap4(D4Group *root, Constructor *container)
Definition: Structure.cc:153
libdap::InternalErr
A class for software fault reporting.
Definition: InternalErr.h:65
libdap::Part
Part
Names the parts of multi-section constructor data types.
Definition: Type.h:48
libdap::Constructor::element_count
virtual int element_count(bool leaves=false)
Count the members of constructor types.
Definition: Constructor.cc:194
libdap::Constructor::deserialize
virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse=false)
Receive data from the net.
Definition: Constructor.cc:540
libdap::Sequence
Holds a sequence.
Definition: Sequence.h:163
libdap::Structure::dump
virtual void dump(ostream &strm) const
dumps information about this object
Definition: Structure.cc:688
libdap::D4Group
Definition: D4Group.h:43
libdap::Structure::Structure
Structure(const string &n)
Definition: Structure.cc:110
libdap::BaseType::attributes
virtual D4Attributes * attributes()
Definition: BaseType.cc:591
libdap::Sequence::set_leaf_sequence
virtual void set_leaf_sequence(int lvl=1)
Mark the Sequence which holds the leaf elements.
Definition: Sequence.cc:1236
libdap::BaseType::BaseType
BaseType(const string &n, const Type &t, bool is_dap4=false)
The BaseType constructor.
Definition: BaseType.cc:126
libdap::Constructor::add_var_nocopy
virtual void add_var_nocopy(BaseType *bt, Part part=nil)
Definition: Constructor.cc:432
libdap::D4Attributes::get_AttrTable
AttrTable * get_AttrTable(const std::string name)
copy attributes from DAP4 to DAP2
Definition: D4Attributes.cc:347
libdap::Constructor::read
virtual bool read()
simple implementation of read that iterates through vars and calls read on them
Definition: Constructor.cc:476
libdap
top level DAP object to house generic methods
Definition: AlarmHandler.h:36
libdap::Constructor::check_semantics
virtual bool check_semantics(string &msg, bool all=false)
Compare an object's current state with the semantics of its type.
Definition: Constructor.cc:792
libdap::BaseType::check_semantics
virtual bool check_semantics(string &msg, bool all=false)
Compare an object's current state with the semantics of its type.
Definition: BaseType.cc:1201
libdap::Constructor::dump
virtual void dump(ostream &strm) const
dumps information about this object
Definition: Constructor.cc:913
libdap::BaseType::set_parent
virtual void set_parent(BaseType *parent)
Definition: BaseType.cc:725
libdap::Constructor::intern_data
virtual void intern_data()
Read data into this variable.
Definition: Constructor.cc:556
libdap::BaseType::dataset
virtual string dataset() const
Returns the name of the dataset used to create this instance.
Definition: BaseType.cc:350
libdap::BaseType::set_in_selection
virtual void set_in_selection(bool state)
Definition: BaseType.cc:710
libdap::Constructor::set_send_p
virtual void set_send_p(bool state)
Definition: Constructor.cc:208
libdap::BaseType::read_p
virtual bool read_p()
Has this variable been read?
Definition: BaseType.cc:472
libdap::AttrTable
Contains the attributes for a dataset.
Definition: AttrTable.h:143
libdap::Constructor
Definition: Constructor.h:44
libdap::Structure
Holds a structure (aggregate) type.
Definition: Structure.h:84
libdap::Structure::set_leaf_sequence
virtual void set_leaf_sequence(int level=1)
Traverse Structure, set Sequence leaf nodes.
Definition: Structure.cc:315
libdap::AttrTable::print
virtual void print(FILE *out, string pad=" ", bool dereference=false)
Prints the attribute table.
Definition: AttrTable.cc:1243
libdap::Constructor::set_in_selection
virtual void set_in_selection(bool state)
Set the in_selection property.
Definition: Constructor.cc:834
libdap::Constructor::transform_to_dap4
virtual void transform_to_dap4(D4Group *root, Constructor *dest)
DAP2 to DAP4 transform.
Definition: Constructor.cc:141
libdap::www2id
string www2id(const string &in, const string &escape, const string &except)
Definition: escaping.cc:220
libdap::BaseType::set_read_p
virtual void set_read_p(bool state)
Sets the value of the read_p property.
Definition: BaseType.cc:508
libdap::Constructor::serialize
virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval=true)
Move data to the net, then remove them from the object.
Definition: Constructor.cc:504
libdap::Constructor::buf2val
virtual unsigned int buf2val(void **)
Reads the class data.
Definition: Constructor.h:118
libdap::BaseType
The basic data type for the DODS DAP types.
Definition: BaseType.h:118
libdap::AttrTable::append_container
virtual AttrTable * append_container(const string &name)
Add a container to the attribute table.
Definition: AttrTable.cc:410
libdap::Constructor::print_decl
virtual void print_decl(ostream &out, string space=" ", bool print_semi=true, bool constraint_info=false, bool constrained=false)
Print an ASCII representation of the variable structure.
Definition: Constructor.cc:626
libdap::Constructor::print_val
virtual void print_val(FILE *out, string space="", bool print_decl_p=true)
Prints the value of the variable.
Definition: Constructor.cc:650
libdap::Constructor::var_begin
Vars_iter var_begin()
Definition: Constructor.cc:356
libdap::Structure::is_linear
virtual bool is_linear()
Check to see whether this variable can be printed simply.
Definition: Structure.cc:263
libdap::Constructor::val2buf
virtual unsigned int val2buf(void *, bool)
Loads class data.
Definition: Constructor.h:115
libdap::AttrTable::get_name
virtual string get_name() const
Get the name of this attribute table.
Definition: AttrTable.cc:238
libdap::BaseType::type_name
virtual string type_name() const
Returns the type of the class instance as a string.
Definition: BaseType.cc:371
libdap::Constructor::var
virtual BaseType * var(const string &name, bool exact_match=true, btp_stack *s=0)
btp_stack no longer needed; use back pointers (BaseType::get_parent())
Definition: Constructor.cc:267
libdap::BaseType::set_send_p
virtual void set_send_p(bool state)
Definition: BaseType.cc:560