/usr/include/marble/GeoDataContainer.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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | //
// 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 2007 Inge Wallin <inge@lysator.liu.se>
// Copyright 2009 Patrick Spendrin <ps_ml@gmx.de>
//
#ifndef MARBLE_GEODATACONTAINER_H
#define MARBLE_GEODATACONTAINER_H
#include <QVector>
#include "geodata_export.h"
#include "GeoDataFeature.h"
namespace Marble
{
class GeoDataContainerPrivate;
class GeoDataFolder;
class GeoDataPlacemark;
class GeoDataLatLonAltBox;
/**
* @short A base class that can hold GeoDataFeatures
*
* GeoDataContainer is the base class for the GeoData container
* classes GeoDataFolder and GeoDataDocument. It is never
* instantiated by itself, but is always used as part of a derived
* class.
*
* It is based on GeoDataFeature, and it only adds a
* QVector<GeodataFeature *> to it, making it a Feature that can hold
* other Features.
*
* @see GeoDataFolder
* @see GeoDataDocument
*/
class GEODATA_EXPORT GeoDataContainer : public GeoDataFeature
{
public:
/// Default constructor
GeoDataContainer();
GeoDataContainer( const GeoDataContainer& other );
/// Destruct the GeoDataContainer
~GeoDataContainer() override;
GeoDataContainer& operator=(const GeoDataContainer& other);
/**
* @brief A convenience function that returns the LatLonAltBox of all
* placemarks in this container.
* @return The GeoDataLatLonAltBox
*
* @see GeoDataLatLonAltBox
*/
GeoDataLatLonAltBox latLonAltBox() const;
/**
* @brief A convenience function that returns all folders in this container.
* @return A QVector of GeoDataFolder
*
* @see GeoDataFolder
*/
QVector<GeoDataFolder*> folderList() const;
/**
* @brief A convenience function that returns all features in this container.
* @return A QVector of GeoDataFeature
*
* @see GeoDataFeature
*/
QVector<GeoDataFeature*> featureList() const;
/**
* @brief A convenience function that returns all placemarks in this container.
* @return A QVector of GeoDataPlacemark
*
* @see GeoDataPlacemark
*/
QVector<GeoDataPlacemark*> placemarkList() const;
/**
* @brief returns the requested child item
*/
GeoDataFeature* child( int );
/**
* @brief returns the requested child item
*/
const GeoDataFeature* child( int ) const;
/**
* @brief returns the position of an item in the list
*/
int childPosition( const GeoDataFeature *child) const;
/**
* @brief inserts @p feature at position @p index in the container
*/
void insert( int index, GeoDataFeature *feature );
GEODATA_DEPRECATED void insert(GeoDataFeature *other, int index);
/**
* @brief add an element
*/
void append( GeoDataFeature *other );
void remove( int index );
void remove(int index, int count);
int removeAll(GeoDataFeature* feature);
void removeAt(int index);
void removeFirst();
void removeLast();
bool removeOne( GeoDataFeature *feature );
/**
* @brief size of the container
*/
int size() const;
/**
* @brief Returns true if the container has size 0; otherwise returns false.
*/
bool isEmpty() const;
/**
* @brief return the reference of the element at a specific position
*/
GeoDataFeature& at( int pos );
const GeoDataFeature& at( int pos ) const;
/**
* @brief return the reference of the last element for convenience
*/
GeoDataFeature& last();
const GeoDataFeature& last() const;
/**
* @brief return the reference of the last element for convenience
*/
GeoDataFeature& first();
const GeoDataFeature& first() const;
QVector<GeoDataFeature*>::Iterator begin();
QVector<GeoDataFeature*>::Iterator end();
QVector<GeoDataFeature*>::ConstIterator constBegin() const;
QVector<GeoDataFeature*>::ConstIterator constEnd() const;
void clear();
/**
* @brief Serialize the container to a stream.
* @param stream the stream
*/
void pack( QDataStream& stream ) const override;
/**
* @brief Unserialize the container from a stream
* @param stream the stream
*/
void unpack( QDataStream& stream ) override;
protected:
explicit GeoDataContainer(GeoDataContainerPrivate *priv);
GeoDataContainer(const GeoDataContainer& other, GeoDataContainerPrivate *priv);
bool equals( const GeoDataContainer &other ) const;
using GeoDataFeature::equals;
private:
Q_DECLARE_PRIVATE(GeoDataContainer)
};
}
#endif
|