| 1 | /***************************************************************************
|
|---|
| 2 | * Copyright (C) 2008 by Daniel Wendt *
|
|---|
| 3 | * gentoo.murray@gmail.com *
|
|---|
| 4 | * *
|
|---|
| 5 | * This program is free software; you can redistribute it and/or modify *
|
|---|
| 6 | * it under the terms of the GNU General Public License as published by *
|
|---|
| 7 | * the Free Software Foundation; either version 2 of the License, or *
|
|---|
| 8 | * (at your option) any later version. *
|
|---|
| 9 | * *
|
|---|
| 10 | * This program is distributed in the hope that it will be useful, *
|
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|---|
| 13 | * GNU General Public License for more details. *
|
|---|
| 14 | * *
|
|---|
| 15 | * You should have received a copy of the GNU General Public License *
|
|---|
| 16 | * along with this program; if not, write to the *
|
|---|
| 17 | * Free Software Foundation, Inc., *
|
|---|
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|---|
| 19 | ***************************************************************************/
|
|---|
| 20 |
|
|---|
| 21 | #ifndef OSMDOCUMENT_H
|
|---|
| 22 | #define OSMDOCUMENT_H
|
|---|
| 23 | |
|---|
| 24 | #include "Configuration.h" |
|---|
| 25 |
|
|---|
| 26 | namespace osm
|
|---|
| 27 | {
|
|---|
| 28 |
|
|---|
| 29 | |
|---|
| 30 | class Node;
|
|---|
| 31 | class Way;
|
|---|
| 32 |
|
|---|
| 33 | /**
|
|---|
| 34 | An osm-document.
|
|---|
| 35 | */
|
|---|
| 36 | class OSMDocument
|
|---|
| 37 | {
|
|---|
| 38 | public:
|
|---|
| 39 | //! Map, which saves the parsed nodes
|
|---|
| 40 | std::map<long long, Node*> m_Nodes;
|
|---|
| 41 | //! parsed ways
|
|---|
| 42 | std::vector<Way*> m_Ways;
|
|---|
| 43 | //! splitted ways
|
|---|
| 44 | std::vector<Way*> m_SplittedWays;
|
|---|
| 45 | Configuration& m_rConfig; |
|---|
| 46 | public:
|
|---|
| 47 |
|
|---|
| 48 | //! Constructor
|
|---|
| 49 | OSMDocument( Configuration& config);
|
|---|
| 50 | //! Destructor
|
|---|
| 51 | virtual ~OSMDocument();
|
|---|
| 52 | //! add node to the map
|
|---|
| 53 | void AddNode( Node* n );
|
|---|
| 54 | //! add way to the map
|
|---|
| 55 | void AddWay( Way* w );
|
|---|
| 56 | //! find node by using an ID
|
|---|
| 57 | Node* FindNode( long long nodeRefId ) const;
|
|---|
| 58 | //! split the ways
|
|---|
| 59 | void SplitWays();
|
|---|
| 60 | //Node* getNode( long long nodeRefId );
|
|---|
| 61 | };
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 | } // end namespace osm
|
|---|
| 65 | #endif
|
|---|