File: externalreferenceparser.h

package info (click to toggle)
libcitygml 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,200 kB
  • sloc: cpp: 8,666; makefile: 15
file content (31 lines) | stat: -rw-r--r-- 1,345 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include <functional>
#include "parser/gmlobjectparser.h"
#include <citygml/externalreference.h>


namespace citygml {
    class ExternalReferenceParser: public GMLObjectElementParser {
    public:
        ExternalReferenceParser(CityGMLDocumentParser& documentParser, CityGMLFactory& factory, std::shared_ptr<CityGMLLogger> logger, std::function<void(ExternalReference *)> callback);
        
        // ElementParser interface
        virtual std::string elementParserName() const override;
        virtual bool handlesElement(NodeType::XMLNode const& node) const override;
        
    protected:
        // CityGMLElementParser interaface
        virtual bool parseElementStartTag(NodeType::XMLNode const& node, Attributes & attribute) override;
        virtual bool parseElementEndTag(NodeType::XMLNode const& node, std::string const& characters) override;
        virtual bool parseChildElementStartTag(NodeType::XMLNode const& node, Attributes & attributes) override;
        virtual bool parseChildElementEndTag(NodeType::XMLNode const& node, std::string const& characters) override;
        
        // GMLObjectElementParser interface
        virtual Object* getObject() override;
        
    private:
        std::unique_ptr<ExternalReference> model;
        std::function<void(ExternalReference *)> callback;
    };
}