This file is indexed.

/usr/include/marble/GeoWriter.h is in libmarble-dev 4:17.12.3-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2009      Andrew Manson <g.real.ate@gmail.com>
//

#ifndef MARBLE_GEOWRITER_H
#define MARBLE_GEOWRITER_H

#include "marble_export.h"

#include <QXmlStreamWriter>
#include <QVariant>

namespace Marble
{

class GeoNode;

/**
 * @brief Standard Marble way of writing XML
 * This class is intended to be a standardised way of writing XML for marble.
 * It works with the GeoData classes and writes XML based on the type of output
 * format that the writer is currently working with.
 */
class MARBLE_EXPORT GeoWriter : public QXmlStreamWriter
{
public:
    GeoWriter();

    /**
     * @brief The main API call to use the XML writer.
     * To use the XML writer you need to provide an IODevice to write the XML to
     * and a QList of GeoDataFeatures which contains the data you wish to write.
     * To define the type of XML document that is to be written you need to set
     * the current Document Type for this GeoWriter. See @see setDocumentType()
     */
    bool write( QIODevice* device, const GeoNode *feature);

    /**
     * @brief Set the current document type.
     * The current Document Type defines which set of handlers are to be used
     * when writing the GeoDocument. This string should correspond with the
     * string used to register the required Tag Writers in @see GeoTagWriter
     */
    void setDocumentType( const QString& documentType );

    /**
     * @brief Convenience method to write <key>value</key> with key prefixed format
     * @p namespaceUri
     */
    void writeElement( const QString &namespaceUri, const QString &key, const QString &value );

    /**
     * @brief Convenience method to write <key>value</key>
     *
     **/
    void writeElement( const QString &key, const QString &value );

    /**
     * @brief Convenience method to write <key>value</key> if value is
     *   not equal to defaultValue. Otherwise, nothing is written.
     *
     **/
    void writeOptionalElement(const QString &key, const QString &value , const QString &defaultValue = QString() );

    /**
     * @brief writeOptionalAttribute Convenience method to write k=v attributes
     * if value is not equal to defaultValue
     */
    void writeOptionalAttribute( const QString &key, const QString &value, const QString &defaultValue = QString() );

    template<class T>
    void writeOptionalElement( const QString &key, const T &value , const T &defaultValue = T() )
    {
        if ( value != defaultValue ) {
            writeElement( key, QVariant::fromValue( value ).toString() );
        }
    }

private:
    friend class GeoTagWriter;
    friend class GeoDataDocumentWriter;
    bool writeElement( const GeoNode* object );

private:
    QString m_documentType;
};

}

#endif