Coverage Report

Created: 2026-08-14 09:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/ogr/ogrsf_frmts/kml/kmlvector.h
Line
Count
Source
1
/******************************************************************************
2
 *
3
 * Project:  KML Driver
4
 * Purpose:  Specialization of the kml class, only for vectors in kml files.
5
 * Author:   Jens Oberender, j.obi@troja.net
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 2007, Jens Oberender
9
 *
10
 * SPDX-License-Identifier: MIT
11
 ****************************************************************************/
12
#ifndef OGR_KMLVECTOR_H_INCLUDED
13
#define OGR_KMLVECTOR_H_INCLUDED
14
15
#ifdef HAVE_EXPAT
16
17
#include "kml.h"
18
#include "kmlnode.h"
19
20
#include "ogr_feature.h"
21
22
// std
23
#include <map>
24
#include <string>
25
26
class KMLVector final : public KML
27
{
28
  public:
29
    // Container - FeatureContainer - Feature
30
    bool isFeature(std::string const &sIn) const override;
31
    bool isFeatureContainer(std::string const &sIn) const override;
32
    bool isContainer(std::string const &sIn) const override;
33
    bool isLeaf(std::string const &sIn) const override;
34
    bool isRest(std::string const &sIn) const override;
35
    void findLayers(KMLNode *poNode, int bKeepEmptyContainers);
36
    void findSchemas(KMLNode *poNode = nullptr);
37
38
    const std::map<std::string, std::vector<std::unique_ptr<OGRFieldDefn>>> &
39
    GetSchemas() const
40
445
    {
41
445
        return oMapSchemas_;
42
445
    }
43
44
  private:
45
    std::map<std::string, std::vector<std::unique_ptr<OGRFieldDefn>>>
46
        oMapSchemas_{};
47
};
48
49
#endif  // HAVE_EXPAT
50
51
#endif /* OGR_KMLVECTOR_H_INCLUDED */