bes  Updated for version 3.20.6
focovjson_utils.h
1 // -*- mode: c++; c-basic-offset:4 -*-
2 //
3 // focovjson_utils.h
4 //
5 // This file is part of BES CovJSON File Out Module
6 //
7 // Copyright (c) 2018 OPeNDAP, Inc.
8 // Author: Corey Hemphill <hemphilc@oregonstate.edu>
9 // Author: River Hendriksen <hendriri@oregonstate.edu>
10 // Author: Riley Rimer <rrimer@oregonstate.edu>
11 //
12 // Adapted from the File Out JSON module implemented by Nathan Potter
13 //
14 // This library is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU Lesser General Public
16 // License as published by the Free Software Foundation; either
17 // version 2.1 of the License, or (at your option) any later version.
18 //
19 // This library is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 // Lesser General Public License for more details.
23 //
24 // You should have received a copy of the GNU Lesser General Public
25 // License along with this library; if not, write to the Free Software
26 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 //
28 
29 #ifndef FOCOVJSON_UTILS_H_
30 #define FOCOVJSON_UTILS_H_ 1
31 
32 #include <string>
33 #include <vector>
34 
35 #include <Array.h>
36 
37 namespace focovjson {
38 
47 void removeSubstring(string& str, const string subStr);
48 
58 long computeConstrainedShape(libdap::Array *a, std::vector<unsigned int> *shape);
59 
60 std::string escape_for_covjson(const std::string &source);
61 
66 #if 0
67 std::string backslash_escape(std::string source, char char_to_escape);
68 #endif
69 
70 } // namespace focovjson
71 
72 #endif /* FOCOVJSON_UTILS_H_ */