28#include "D4Dimensions.h"
31#include "InternalErr.h"
40 d_array =
dynamic_cast<Array *
>(root->
find_var(d_array_path));
42 throw InternalErr(__FILE__, __LINE__, std::string(
"Failed to find an array at: ").append(d_array_path));
48 if (xmlTextWriterStartElement(xml.get_writer(), (
const xmlChar *)
"Map") < 0)
49 throw InternalErr(__FILE__, __LINE__,
"Could not write Map element");
51 if (xmlTextWriterWriteAttribute(xml.get_writer(), (
const xmlChar *)
"name",
52 (
const xmlChar *)(d_array ? d_array->
FQN().c_str() : d_name.c_str())) < 0)
53 throw InternalErr(__FILE__, __LINE__,
"Could not write attribute for name");
55 if (xmlTextWriterEndElement(xml.get_writer()) < 0)
56 throw InternalErr(__FILE__, __LINE__,
"Could not end Map element");
A multidimensional array of identical data types.
virtual std::string FQN() const
BaseType * find_var(const string &name)
Array * array() const
Only use this accessor in code that can deal with a nullptr return!
A class for software fault reporting.
top level DAP object to house generic methods