• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • runner
  • osm
  • handlers
OsmNodeFactory.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Konstantin Oblaukhov <oblaukhov.konstantin@gmail.com>
9 //
10 
11 #include "OsmNodeFactory.h"
12 #include "GeoDataPoint.h"
13 
14 namespace Marble
15 {
16 namespace osm
17 {
18 QMap<quint64, GeoDataPoint *> OsmNodeFactory::m_points;
19 
20 // This is a class for keeping all the nodes accessible
21 // for when needed by ways. Ways have only the ids of
22 // nodes so with that id the GeoDataPoint is returned
23 
24 void OsmNodeFactory::appendPoint( quint64 id, GeoDataPoint* p )
25 {
26  m_points[id] = p;
27 }
28 
29 GeoDataPoint* OsmNodeFactory::getPoint( quint64 id )
30 {
31  return m_points.value( id );
32 }
33 
34 void OsmNodeFactory::clear()
35 {
36  foreach( GeoDataPoint *p, m_points )
37  {
38  delete p;
39  }
40  m_points.clear();
41 }
42 
43 }
44 }
Marble::GeoDataPoint
A Geometry object representing a 3d point.
Definition: GeoDataPoint.h:47
OsmNodeFactory.h
Marble::osm::OsmNodeFactory::getPoint
static GeoDataPoint * getPoint(quint64 id)
Definition: OsmNodeFactory.cpp:29
GeoDataPoint.h
Marble::osm::OsmNodeFactory::clear
static void clear()
Clean up nodes Removes all nodes from factory.
Definition: OsmNodeFactory.cpp:34
Marble::osm::OsmNodeFactory::appendPoint
static void appendPoint(quint64 id, GeoDataPoint *p)
Definition: OsmNodeFactory.cpp:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal