libdap
Updated for version 3.17.0
|
00001 // -*- mode: c++; c-basic-offset:4 -*- 00002 00003 // This file is part of libdap, A C++ implementation of the OPeNDAP Data 00004 // Access Protocol. 00005 00006 // Copyright (c) 2013 OPeNDAP, Inc. 00007 // Author: James Gallagher <jgallagher@opendap.org> 00008 // 00009 // This library is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public 00011 // License as published by the Free Software Foundation; either 00012 // version 2.1 of the License, or (at your option) any later version. 00013 // 00014 // This library is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00022 // 00023 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112. 00024 00025 #include "config.h" 00026 00027 #include "XMLWriter.h" 00028 #include "InternalErr.h" 00029 #include "D4Maps.h" 00030 00031 using namespace libdap; 00032 00033 void 00034 D4Map::print_dap4(XMLWriter &xml) 00035 { 00036 if (xmlTextWriterStartElement(xml.get_writer(), (const xmlChar*) "Map") < 0) 00037 throw InternalErr(__FILE__, __LINE__, "Could not write Map element"); 00038 00039 if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar*) "name", (const xmlChar*)d_name.c_str()) < 0) 00040 throw InternalErr(__FILE__, __LINE__, "Could not write attribute for name"); 00041 00042 if (xmlTextWriterEndElement(xml.get_writer()) < 0) 00043 throw InternalErr(__FILE__, __LINE__, "Could not end Map element"); 00044 00045 } 00046 00047 D4Maps& 00048 D4Maps::operator=(const D4Maps &rhs) 00049 { 00050 if (this == &rhs) return *this; 00051 m_duplicate(rhs); 00052 return *this; 00053 }