bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
vlsa_util.h
1// This file is part of bes, A C++ back-end server implementation framework
2// for the OPeNDAP Data Access Protocol.
3
4// Copyright (c) 2023 OPeNDAP
5// Author: Nathan Potter <ndp@opendap.org>
6//
7// This library is free software; you can redistribute it and/or
8// modify it under the terms of the GNU Lesser General Public
9// License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11//
12// This library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15// Lesser General Public License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public
18// License along with this library; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
21//
22// Created by ndp on 11/11/23.
23//
24
25#ifndef BES_VLSA_UTIL_H
26#define BES_VLSA_UTIL_H
27
28#include <string>
29#include "DmrppArray.h"
30
31namespace vlsa {
32
33std::string zlib_msg(int retval);
34std::string encode(const std::string &source_string);
35std::string decode(const std::string &encoded, uint64_t expected_size);
36
37void write_value(libdap::XMLWriter &xml, const std::string &value, uint64_t dup_count);
38void write(libdap::XMLWriter &xml, const std::vector<std::string> &values);
39void write(libdap::XMLWriter &xml, dmrpp::DmrppArray &a);
40
41string read_value(const pugi::xml_node &v);
42void read(const pugi::xml_node &vlsa_element, std::vector<std::string> &entries);
43}
44#endif //BES_VLSA_UTIL_H