This file is indexed.

/usr/include/marble/GeoDataObject.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
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
//
// 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 2007      Murad Tagirov <tmurad@gmail.com>
// Copyright 2008      Jens-Michael Hoffmann <jensmh@gmx.de>
//


#ifndef MARBLE_GEODATAOBJECT_H
#define MARBLE_GEODATAOBJECT_H

#include "geodata_export.h"

#include "GeoDocument.h" 
#include "Serializable.h"

#include <QMetaType>

namespace Marble
{

class GeoDataObjectPrivate;

/**
 * @short A base class for all geodata objects
 *
 * GeoDataObject is the base class for all geodata classes. It is
 * never instantiated by itself, but is always used as part of a
 * derived object.
 *
 * The Geodata objects are all modeled after the Google KML files as
 * defined in
 * http://code.google.com/apis/kml/documentation/kml_tags_21.html.
 *
 * A GeoDataObject contains 2 properties, both corresponding directly
 * to tags in the KML files: the <b>id</b>, which is a unique
 * identifier of the object, and a <b>targetId</b> which is used to
 * reference other objects that have already been loaded.
 *
 * The <b>id</b> property must only be set if the <b>Update</b>
 * mechanism of KML is used, which is currently not supported by
 * Marble.
 */
class GEODATA_EXPORT GeoDataObject : public GeoNode,
                      public Serializable
{
public:
    GeoDataObject();
    GeoDataObject( const GeoDataObject & );
    GeoDataObject & operator=( const GeoDataObject & );
    ~GeoDataObject() override;

    /// Provides the parent of the object in GeoDataContainers
    const GeoDataObject *parent() const;
    GeoDataObject *parent();

    /// Sets the parent of the object
    void setParent(GeoDataObject *parent);

    /**
     * @brief Get the id of the object.
     */
    QString id() const;
    /**
     * @brief Set the id of the object
     * @param value the new id value
     */
    void setId( const QString &value );

    /**
     * @brief Get the targetId of the object to be replaced
     */
    QString targetId() const;
    /**
     * @brief set a new targetId of this object
     * @param value the new targetId value
     */
    void setTargetId( const QString &value );

    QString resolvePath( const QString &relativePath ) const;

    /// Reimplemented from Serializable
    void pack( QDataStream& stream ) const override;
    /// Reimplemented from Serializable
    void unpack( QDataStream& steam ) override;

 private:

    GeoDataObjectPrivate * d;

 protected:
    /**
     * @brief Compares the value of id and targetId of the two objects
     * @return true if they these values are equal or false otherwise
     */
    virtual bool equals(const GeoDataObject &other) const;
};


/**
 * Returns the given node cast to type T if the node was instantiated as type T; otherwise returns 0.
 * If node is 0 then it will also return 0.
 *
 * @param node pointer to GeoNode object to be casted
 * @return the given node as type T if cast is successfull, otherwise 0
 */
template<typename T>
T *geodata_cast(GeoNode *node)
{
    if (node == nullptr) {
        return nullptr;
    }

    if (node->nodeType() == T().nodeType()) {
        return static_cast<T *>(node);
    }

    return nullptr;
}

/**
 * Returns the given node cast to type const T if the node was instantiated as type T; otherwise returns 0.
 * If node is 0 then it will also return 0.
 *
 * @param node pointer to GeoNode object to be casted
 * @return the given node as type const T if cast is successfull, otherwise 0
 */
template<typename T>
const T *geodata_cast(const GeoNode *node)
{
    if (node == nullptr) {
        return nullptr;
    }

    if (node->nodeType() == T().nodeType()) {
        return static_cast<const T *>(node);
    }

    return nullptr;
}

}

Q_DECLARE_METATYPE( Marble::GeoDataObject* )

#endif