libdap++  Updated for version 3.13.1
BaseType.cc
Go to the documentation of this file.
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 BaseType.
33 //
34 // jhrg 9/6/94
35 
36 #include "config.h"
37 
38 #include <cstdio> // for stdin and stdout
39 
40 #include <sstream>
41 #include <string>
42 
43 //#define DODS_DEBUG
44 
45 #include "BaseType.h"
46 #include "Byte.h"
47 #include "Int16.h"
48 #include "UInt16.h"
49 #include "Int32.h"
50 #include "UInt32.h"
51 #include "Float32.h"
52 #include "Float64.h"
53 #include "Str.h"
54 #include "Url.h"
55 #include "Array.h"
56 #include "Structure.h"
57 #include "Sequence.h"
58 #include "Grid.h"
59 
60 #include "InternalErr.h"
61 
62 #include "util.h"
63 #include "escaping.h"
64 
65 #include "debug.h"
66 
67 using namespace std;
68 
69 namespace libdap {
70 
71 // Protected copy mfunc
72 
79 void
80 BaseType::m_duplicate(const BaseType &bt)
81 {
82  DBG2(cerr << "BaseType::_duplicate: " << bt.d_name << " send_p: "
83  << bt.d_is_send << endl);
84  d_name = bt.d_name;
85  d_type = bt.d_type;
86  d_dataset = bt.d_dataset;
87  d_is_read = bt.d_is_read; // added, reza
88  d_is_send = bt.d_is_send; // added, reza
89  d_in_selection = bt.d_in_selection;
90  d_is_synthesized = bt.d_is_synthesized; // 5/11/2001 jhrg
91 
92  d_parent = bt.d_parent; // copy pointers 6/4/2001 jhrg
93 
94  d_attr = bt.d_attr; // Deep copy.
95 
96 #if DAP4
97  // FIXME How to copy? these are pointers
98  d_dims = bt.d_dims;
99  d_maps = bt.d_maps;
100 #endif
101 }
102 
103 // Public mfuncs
104 
117 BaseType::BaseType(const string &n, const Type &t, bool is_dap4)
118  : d_name(n), d_type(t), d_dataset(""), d_is_read(false), d_is_send(false),
119  d_in_selection(false), d_is_synthesized(false), d_parent(0),
120  d_is_dap4(is_dap4)
121 {}
122 
135 BaseType::BaseType(const string &n, const string &d, const Type &t, bool is_dap4)
136  : d_name(n), d_type(t), d_dataset(d), d_is_read(false), d_is_send(false),
137  d_in_selection(false), d_is_synthesized(false), d_parent(0),
138  d_is_dap4(is_dap4)
139 {}
140 #if 0
141 
152 BaseType::BaseType(const string &n, const Type &t, bool is_dap4)
153  : d_name(n), d_type(t), d_dataset(""), d_is_read(false), d_is_send(false),
154  d_in_selection(false), d_is_synthesized(false), d_parent(0),
155  d_is_dap4(is_dap4)
156 {}
157 
171 BaseType::BaseType(const string &n, const string &d, const Type &t, bool is_dap4)
172  : d_name(n), d_type(t), d_dataset(d), d_is_read(false), d_is_send(false),
173  d_in_selection(false), d_is_synthesized(false), d_parent(0),
174  d_is_dap4(is_dap4)
175 {}
176 #endif
177 
178 BaseType::BaseType(const BaseType &copy_from) : DapObj()
179 {
180  m_duplicate(copy_from);
181 }
182 
184 {
185  DBG2(cerr << "Entering ~BaseType (" << this << ")" << endl);
186  DBG2(cerr << "Exiting ~BaseType" << endl);
187 }
188 
189 BaseType &
191 {
192  if (this == &rhs)
193  return *this;
194 
195  m_duplicate(rhs);
196 
197  return *this;
198 }
199 
204 string
206 {
207  ostringstream oss;
208  oss << "BaseType (" << this << "):" << endl
209  << " _name: " << d_name << endl
210  << " _type: " << type_name() << endl
211  << " _dataset: " << d_dataset << endl
212  << " _read_p: " << d_is_read << endl
213  << " _send_p: " << d_is_send << endl
214  << " _synthesized_p: " << d_is_synthesized << endl
215  << " d_parent: " << d_parent << endl
216  << " d_attr: " << hex << &d_attr << dec << endl;
217 
218  return oss.str();
219 }
220 
229 void
230 BaseType::dump(ostream &strm) const
231 {
232  strm << DapIndent::LMarg << "BaseType::dump - ("
233  << (void *)this << ")" << endl ;
235 
236  strm << DapIndent::LMarg << "name: " << d_name << endl ;
237  strm << DapIndent::LMarg << "type: " << type_name() << endl ;
238  strm << DapIndent::LMarg << "dataset: " << d_dataset << endl ;
239  strm << DapIndent::LMarg << "read_p: " << d_is_read << endl ;
240  strm << DapIndent::LMarg << "send_p: " << d_is_send << endl ;
241  strm << DapIndent::LMarg << "synthesized_p: " << d_is_synthesized << endl ;
242  strm << DapIndent::LMarg << "parent: " << (void *)d_parent << endl ;
243  strm << DapIndent::LMarg << "attributes: " << endl ;
245  d_attr.dump(strm) ;
247 
249 }
250 
253 string
255 {
256  return d_name;
257 }
258 
260 void
261 BaseType::set_name(const string &n)
262 {
263  string name = n;
264  d_name = www2id(name); // www2id writes into its param.
265 }
266 
274 string
276 {
277  return d_dataset;
278 }
279 
281 Type
283 {
284  return d_type;
285 }
286 
288 void
290 {
291  d_type = t;
292 }
293 
295 string
297 {
298  return libdap::type_name(d_type);
299 #if 0
300  switch (d_type) {
301  case dods_null_c:
302  return string("Null");
303  case dods_byte_c:
304  return string("Byte");
305  case dods_int16_c:
306  return string("Int16");
307  case dods_uint16_c:
308  return string("UInt16");
309  case dods_int32_c:
310  return string("Int32");
311  case dods_uint32_c:
312  return string("UInt32");
313  case dods_float32_c:
314  return string("Float32");
315  case dods_float64_c:
316  return string("Float64");
317  case dods_str_c:
318  return string("String");
319  case dods_url_c:
320  return string("Url");
321  case dods_array_c:
322  return string("Array");
323  case dods_structure_c:
324  return string("Structure");
325  case dods_sequence_c:
326  return string("Sequence");
327  case dods_grid_c:
328  return string("Grid");
329 
330  case dods_int8_c:
331  return string("Int8");
332  case dods_uint8_c:
333  return string("UInt8");
334  case dods_int64_c:
335  return string("Int64");
336  case dods_uint64_c:
337  return string("UInt64");
338  case dods_url4_c:
339  return string("URL");
340  case dods_group_c:
341  return string("Group");
342  case dods_enum_c:
343  return string("Enum");
344 
345  default:
346  cerr << "BaseType::type_name: Undefined type" << endl;
347  return string("");
348  }
349 #endif
350 }
351 
357 bool
359 {
360  return libdap::is_simple_type(type());
361 #if 0
362  switch (type()) {
363  case dods_null_c:
364  case dods_byte_c:
365 
366  case dods_int8_c:
367  case dods_uint8_c:
368 
369  case dods_int16_c:
370  case dods_uint16_c:
371  case dods_int32_c:
372  case dods_uint32_c:
373 
374  case dods_int64_c:
375  case dods_uint64_c:
376 
377  case dods_float32_c:
378  case dods_float64_c:
379  case dods_str_c:
380  case dods_url_c:
381 
382  case dods_url4_c:
383  case dods_enum_c:
384  return true;
385 
386  case dods_array_c:
387  case dods_structure_c:
388  case dods_sequence_c:
389  case dods_grid_c:
390  case dods_group_c:
391  return false;
392  }
393 
394  return false;
395 #endif
396 }
397 
401 bool
403 {
404  return libdap::is_vector_type(type());
405 #if 0
406  switch (type()) {
407  case dods_null_c:
408  case dods_byte_c:
409 
410  case dods_int8_c:
411  case dods_uint8_c:
412 
413  case dods_int16_c:
414  case dods_uint16_c:
415  case dods_int32_c:
416  case dods_uint32_c:
417 
418  case dods_int64_c:
419  case dods_uint64_c:
420 
421  case dods_float32_c:
422  case dods_float64_c:
423  case dods_str_c:
424  case dods_url_c:
425 
426  case dods_url4_c:
427  case dods_enum_c:
428  return false;
429 
430  case dods_array_c:
431  return true;
432 
433  case dods_structure_c:
434  case dods_sequence_c:
435  case dods_grid_c:
436  case dods_group_c:
437  return false;
438  }
439 
440  return false;
441 #endif
442 }
443 
448 bool
450 {
452 #if 0
453  switch (type()) {
454  case dods_null_c:
455  case dods_byte_c:
456 
457  case dods_int8_c:
458  case dods_uint8_c:
459 
460  case dods_int16_c:
461  case dods_uint16_c:
462  case dods_int32_c:
463  case dods_uint32_c:
464 
465  case dods_int64_c:
466  case dods_uint64_c:
467 
468  case dods_float32_c:
469  case dods_float64_c:
470  case dods_str_c:
471  case dods_url_c:
472 
473  case dods_url4_c:
474  case dods_enum_c:
475 
476  case dods_array_c:
477  return false;
478 
479  case dods_structure_c:
480  case dods_sequence_c:
481  case dods_grid_c:
482  case dods_group_c:
483  return true;
484  }
485 
486  return false;
487 #endif
488 }
489 
490 #if 0
491 
497 bool
498 BaseType::is_dap4_only_type()
499 {
500  return false;
501 }
502 
509 bool
510 BaseType::is_dap2_only_type()
511 {
512  return false;
513 }
514 #endif
515 
541 int
543 {
544  return 1;
545 }
546 
550 bool
552 {
553  return d_is_synthesized;
554 }
555 
561 void
563 {
564  d_is_synthesized = state;
565 }
566 
567 // Return the state of d_is_read (true if the value of the variable has been
568 // read (and is in memory) false otherwise).
569 
578 bool
580 {
581  return d_is_read;
582 }
583 
617 void
619 {
620  if (! d_is_synthesized) {
621  DBG2(cerr << "Changing read_p state of " << name() << " to "
622  << state << endl);
623  d_is_read = state;
624  }
625 }
626 
637 bool
639 {
640  return d_is_send;
641 }
642 
651 void
653 {
654  DBG2(cerr << "Calling BaseType::set_send_p() for: " << this->name()
655  << endl);
656  d_is_send = state;
657 }
658 
659 
665 AttrTable &
667 {
668  return d_attr;
669 }
670 
673 void
675 {
676  d_attr = at;
677 }
678 
706  AttrTable *at = at_container->get_attr_table(name());
707 
708  DBG(cerr << "In BaseType::transfer_attributes; processing " << name() << endl);
709 
710  if (at) {
711  at->set_is_global_attribute(false);
712  DBG(cerr << "Processing AttrTable: " << at->get_name() << endl);
713 
714  AttrTable::Attr_iter at_p = at->attr_begin();
715  while (at_p != at->attr_end()) {
716  DBG(cerr << "About to append " << "attr name, type:" << at->get_name(at_p) << ", " << at->get_type(at_p) << endl);
717 
718  if (at->get_attr_type(at_p) == Attr_container)
719  get_attr_table().append_container(new AttrTable(*at->get_attr_table(at_p)), at->get_name(at_p));
720  else
721  get_attr_table().append_attr(at->get_name(at_p), at->get_type(at_p), at->get_attr_vector(at_p));
722 
723  at_p++;
724  }
725  }
726 }
727 
739 bool
741 {
742  return d_in_selection;
743 }
744 
754 void
756 {
757  d_in_selection = state;
758 }
759 
760 // Protected method.
769 void
771 {
772  if (!dynamic_cast<Constructor *>(parent)
773  && !dynamic_cast<Vector *>(parent)
774  && parent != 0)
775  throw InternalErr("Call to set_parent with incorrect variable type.");
776 
777  d_parent = parent;
778 }
779 
780 // Public method.
781 
787 BaseType *
789 {
790  return d_parent;
791 }
792 
793 // Documented in the header file.
794 BaseType *
795 BaseType::var(const string &/*name*/, bool /*exact_match*/, btp_stack */*s*/)
796 {
797  return static_cast<BaseType *>(0);
798 }
799 
816 BaseType *
817 BaseType::var(const string &, btp_stack &)
818 {
819  return static_cast<BaseType *>(0);
820 }
821 
851 void
853 {
854  throw InternalErr(__FILE__, __LINE__, "BaseType::add_var unimplemented");
855 }
856 
922 bool
924 {
925  if (d_is_read)
926  return false;
927 
928  throw InternalErr("Unimplemented BaseType::read() method called for the variable named: " + name());
929 }
930 
931 void
933 {
934  dds.timeout_on();
935  DBG2(cerr << "BaseType::intern_data: " << name() << endl);
936  if (!read_p())
937  read(); // read() throws Error and InternalErr
938 
939  dds.timeout_off();
940 }
941 
984 void
985 BaseType::print_decl(FILE *out, string space, bool print_semi,
986  bool constraint_info, bool constrained)
987 {
988  ostringstream oss;
989  print_decl(oss, space, print_semi, constraint_info, constrained);
990  fwrite(oss.str().data(), sizeof(char), oss.str().length(), out);
991 }
992 
1035 void
1036 BaseType::print_decl(ostream &out, string space, bool print_semi,
1037  bool constraint_info, bool constrained)
1038 {
1039  // if printing the constrained declaration, exit if this variable was not
1040  // selected.
1041  if (constrained && !send_p())
1042  return;
1043 
1044  out << space << type_name() << " " << id2www(d_name) ;
1045 
1046  if (constraint_info) {
1047  if (send_p())
1048  out << ": Send True" ;
1049  else
1050  out << ": Send False" ;
1051  }
1052 
1053  if (print_semi)
1054  out << ";\n" ;
1055 }
1056 
1064 void
1065 BaseType::print_xml(FILE *out, string space, bool constrained)
1066 {
1067  XMLWriter xml(space);
1068  print_xml_writer(xml, constrained);
1069  fwrite(xml.get_doc(), sizeof(char), xml.get_doc_size(), out);
1070 }
1071 
1079 void
1080 BaseType::print_xml(ostream &out, string space, bool constrained)
1081 {
1082  XMLWriter xml(space);
1083  print_xml_writer(xml, constrained);
1084  out << xml.get_doc();
1085 }
1086 
1093 void
1094 BaseType::print_xml_writer(XMLWriter &xml, bool constrained)
1095 {
1096  if (constrained && !send_p())
1097  return;
1098 
1099  if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*)type_name().c_str()) < 0)
1100  throw InternalErr(__FILE__, __LINE__, "Could not write " + type_name() + " element");
1101 
1102  if (!d_name.empty())
1103  if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0)
1104  throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name");
1105 
1106  if (get_attr_table().get_size() > 0)
1108 
1109  if (xmlTextWriterEndElement(xml.get_writer()) < 0)
1110  throw InternalErr(__FILE__, __LINE__, "Could not end " + type_name() + " element");
1111 }
1112 
1113 // Compares the object's current state with the semantics of a particular
1114 // type. This will typically be defined in ctor classes (which have
1115 // complicated semantics). For BaseType, an object is semantically correct if
1116 // it has both a non-null name and type.
1117 //
1118 // NB: This is not the same as an invariant -- during the parse objects exist
1119 // but have no name. Also, the bool ALL defaults to false for BaseType. It is
1120 // used by children of CtorType.
1121 //
1122 // Returns: true if the object is semantically correct, false otherwise.
1123 
1152 bool
1153 BaseType::check_semantics(string &msg, bool)
1154 {
1155  bool sem = (d_type != dods_null_c && d_name.length());
1156 
1157  if (!sem)
1158  msg = "Every variable must have both a name and a type\n";
1159 
1160  return sem;
1161 }
1162 
1197 bool
1199 {
1200  // Even though ops is a public method, it can never be called because
1201  // they will never have a BaseType object since this class is abstract,
1202  // however any of the child classes could by mistake call BaseType::ops
1203  // so this is an internal error. Jose Garcia
1204  throw InternalErr(__FILE__, __LINE__, "Unimplemented operator.");
1205 }
1206 
1207 // FIXME update this comment if the removal of width() works
1217 unsigned int
1218 BaseType::width(bool /* constrained */)
1219 {
1220  throw InternalErr(__FILE__, __LINE__, "not implemented");
1221 #if 0
1222  return width(constrained);
1223 #endif
1224 }
1225 
1226 } // namespace libdap
std::vector< entry * >::iterator Attr_iter
Definition: AttrTable.h:237
virtual bool read()
Read data into a local buffer.
Definition: BaseType.cc:923
virtual bool read_p()
Has this variable been read?
Definition: BaseType.cc:579
static void UnIndent()
Definition: DapIndent.cc:51
virtual void print_decl(FILE *out, string space=" ", bool print_semi=true, bool constraint_info=false, bool constrained=false)
Print an ASCII representation of the variable structure.
Definition: BaseType.cc:985
xmlTextWriterPtr get_writer()
Definition: XMLWriter.h:60
virtual Attr_iter attr_end()
Definition: AttrTable.cc:724
virtual ~BaseType()
Definition: BaseType.cc:183
virtual void print_xml(FILE *out, string space=" ", bool constrained=false)
Definition: BaseType.cc:1065
Part
Names the parts of multi-section constructor data types.
Definition: BaseType.h:95
BaseType & operator=(const BaseType &rhs)
Definition: BaseType.cc:190
bool is_constructor_type(Type t)
Returns true if the instance is a constructor (i.e., Structure, Sequence or Grid) type variable...
Definition: util.cc:668
Contains the attributes for a dataset.
Definition: AttrTable.h:150
virtual void set_name(const string &n)
Sets the name of the class instance.
Definition: BaseType.cc:261
virtual string get_type(const string &name)
Get the type name of an attribute within this attribute table.
Definition: AttrTable.cc:618
virtual void intern_data(ConstraintEvaluator &eval, DDS &dds)
Definition: BaseType.cc:932
virtual void print_xml_writer(XMLWriter &xml, bool constrained=false)
Definition: BaseType.cc:1094
virtual BaseType * get_parent()
Definition: BaseType.cc:788
BaseType(const string &n, const Type &t, bool is_dap4=false)
The BaseType constructor.
Definition: BaseType.cc:117
bool is_vector_type(Type t)
Returns true if the instance is a vector (i.e., array) type variable.
Definition: util.cc:622
virtual void set_is_global_attribute(bool ga)
Definition: AttrTable.h:285
void print_xml_writer(XMLWriter &xml)
Definition: AttrTable.cc:1415
void timeout_off()
Definition: DDS.cc:862
virtual void add_var(BaseType *bt, Part part=nil)
Add a variable.
Definition: BaseType.cc:852
Type
Identifies the data type.
Definition: BaseType.h:137
Type type() const
Returns the type of the class instance.
Definition: BaseType.cc:282
virtual string get_name() const
Get the name of this attribute table.
Definition: AttrTable.cc:242
virtual string toString()
Definition: BaseType.cc:205
#define DBG2(x)
Definition: debug.h:73
virtual void set_in_selection(bool state)
Definition: BaseType.cc:755
virtual bool is_in_selection()
Is this variable part of the current selection?
Definition: BaseType.cc:740
stack< BaseType * > btp_stack
Definition: BaseType.h:233
virtual void set_parent(BaseType *parent)
Definition: BaseType.cc:770
A class for software fault reporting.
Definition: InternalErr.h:64
virtual bool is_vector_type()
Returns true if the instance is a vector (i.e., array) type variable.
Definition: BaseType.cc:402
virtual bool is_constructor_type()
Returns true if the instance is a constructor (i.e., Structure, Sequence or Grid) type variable...
Definition: BaseType.cc:449
string dataset() const
Returns the name of the dataset used to create this instance.
Definition: BaseType.cc:275
virtual BaseType * var(const string &name="", bool exact_match=true, btp_stack *s=0)
Returns a pointer to a member of a constructor class.
Definition: BaseType.cc:795
#define DBG(x)
Definition: debug.h:58
string type_name() const
Returns the type of the class instance as a string.
Definition: BaseType.cc:296
virtual int element_count(bool leaves=false)
Count the members of constructor types.
Definition: BaseType.cc:542
virtual void set_send_p(bool state)
Definition: BaseType.cc:652
virtual AttrTable * append_container(const string &name)
Add a container to the attribute table.
Definition: AttrTable.cc:414
const char * get_doc()
Definition: XMLWriter.cc:105
static void Indent()
Definition: DapIndent.cc:45
virtual AttrTable * get_attr_table(const string &name)
Get an attribute container.
Definition: AttrTable.cc:612
virtual void dump(ostream &strm) const
dumps information about this object
Definition: BaseType.cc:230
void set_type(const Type &t)
Sets the type of the class instance.
Definition: BaseType.cc:289
virtual void set_read_p(bool state)
Sets the value of the read_p property.
Definition: BaseType.cc:618
bool is_simple_type(Type t)
Returns true if the instance is a numeric, string or URL type variable.
Definition: util.cc:580
virtual bool synthesized_p()
Definition: BaseType.cc:551
string name() const
Returns the name of the class instance.
Definition: BaseType.cc:254
virtual Attr_iter attr_begin()
Definition: AttrTable.cc:716
string www2id(const string &in, const string &escape, const string &except)
Definition: escaping.cc:220
void timeout_on()
Definition: DDS.cc:854
void m_duplicate(const BaseType &bt)
Perform a deep copy.
Definition: BaseType.cc:80
Evaluate a constraint expression.
static ostream & LMarg(ostream &strm)
Definition: DapIndent.cc:80
virtual AttrTable & get_attr_table()
Definition: BaseType.cc:666
virtual unsigned int append_attr(const string &name, const string &type, const string &value)
Add an attribute to the table.
Definition: AttrTable.cc:311
The basic data type for the DODS DAP types.
Definition: BaseType.h:199
libdap base object for common functionality of libdap objects
Definition: DapObj.h:55
virtual AttrType get_attr_type(const string &name)
Get the type of an attribute.
Definition: AttrTable.cc:626
virtual void set_attr_table(const AttrTable &at)
Definition: BaseType.cc:674
virtual void dump(ostream &strm) const
dumps information about this object
Definition: AttrTable.cc:1489
virtual unsigned int width(bool constrained=false)
Definition: BaseType.cc:1218
virtual bool ops(BaseType *b, int op)
Evaluate relational operators.
Definition: BaseType.cc:1198
virtual vector< string > * get_attr_vector(const string &name)
Get a vector-valued attribute.
Definition: AttrTable.cc:658
virtual bool is_simple_type()
Returns true if the instance is a numeric, string or URL type variable.
Definition: BaseType.cc:358
string type_name(Type t)
Returns the type of the class instance as a string.
Definition: util.cc:522
virtual void transfer_attributes(AttrTable *at)
Definition: BaseType.cc:705
virtual bool send_p()
Should this variable be sent?
Definition: BaseType.cc:638
string id2www(string in, const string &allowable)
Definition: escaping.cc:153
unsigned int get_doc_size()
Definition: XMLWriter.cc:129
virtual bool check_semantics(string &msg, bool all=false)
Compare an object's current state with the semantics of its type.
Definition: BaseType.cc:1153
virtual void set_synthesized_p(bool state)
Definition: BaseType.cc:562