libdap Updated for version 3.20.11
libdap4 is an implementation of OPeNDAP's DAP protocol.
XMLWriter.h
1
2// This file is part of libdap, A C++ implementation of the OPeNDAP Data
3// Access Protocol.
4
5// Copyright (c) 2010 OPeNDAP, Inc.
6// Author: James Gallagher <jgallagher@opendap.org>
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Lesser General Public
10// License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Lesser General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
23/*
24 * XMLWriter.h
25 *
26 * Created on: Jul 28, 2010
27 * Author: jimg
28 */
29
30#ifndef XMLWRITER_H_
31#define XMLWRITER_H_
32
33#include <libxml/xmlwriter.h>
34
35#include <string>
36
37namespace libdap {
38
39class XMLWriter {
40private:
41 // Various xml writer stuff
42 xmlTextWriterPtr d_writer;
43 xmlBufferPtr d_doc_buf;
44 bool d_started;
45 bool d_ended;
46
47 std::string d_doc;
48
49 void m_cleanup() ;
50
51public:
52 XMLWriter(const std::string &pad = " ");
53 virtual ~XMLWriter();
54
55 xmlTextWriterPtr get_writer() const { return d_writer; }
56 const char *get_doc();
57 unsigned int get_doc_size();
58};
59
60} // namespace libdap
61
62#endif /* XMLWRITER_H_ */
top level DAP object to house generic methods
Definition: AlarmHandler.h:36