LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/kml - kmlvector.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 2 2 100.0 %
Date: 2026-06-27 16:33:51 Functions: 1 1 100.0 %

          Line data    Source code
       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          24 :     GetSchemas() const
      40             :     {
      41          24 :         return oMapSchemas_;
      42             :     }
      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 */

Generated by: LCOV version 1.14