Coverage Report

Created: 2025-06-13 06:29

/src/proj/src/wkt_parser.hpp
Line
Count
Source
1
/******************************************************************************
2
 * Project:  PROJ
3
 * Purpose:  WKT parser common routines
4
 * Author:   Even Rouault, <even.rouault at spatialys.com>
5
 *
6
 ******************************************************************************
7
 * Copyright (c) 2018 Even Rouault, <even.rouault at spatialys.com>
8
 *
9
 * Permission is hereby granted, free of charge, to any person obtaining a
10
 * copy of this software and associated documentation files (the "Software"),
11
 * to deal in the Software without restriction, including without limitation
12
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
 * and/or sell copies of the Software, and to permit persons to whom the
14
 * Software is furnished to do so, subject to the following conditions:
15
 *
16
 * The above copyright notice and this permission notice shall be included
17
 * in all copies or substantial portions of the Software.
18
 *
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25
 * DEALINGS IN THE SOFTWARE.
26
 ****************************************************************************/
27
28
#ifndef PJ_WKT_PARSER_H_INCLUDED
29
#define PJ_WKT_PARSER_H_INCLUDED
30
31
//! @cond Doxygen_Suppress
32
33
#include <string>
34
35
struct pj_wkt_parse_context {
36
    const char *pszInput = nullptr;
37
    const char *pszLastSuccess = nullptr;
38
    const char *pszNext = nullptr;
39
    std::string errorMsg{};
40
41
10.9k
    pj_wkt_parse_context() = default;
42
    pj_wkt_parse_context(const pj_wkt_parse_context &) = delete;
43
    pj_wkt_parse_context &operator=(const pj_wkt_parse_context &) = delete;
44
};
45
46
void pj_wkt_error(pj_wkt_parse_context *context, const char *msg);
47
48
//! @endcond
49
50
#endif // PJ_WKT_PARSER_H_INCLUDED