-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare basic infrastructure to handle Changeset objects
- Loading branch information
1 parent
b5a6e92
commit 8345f3c
Showing
16 changed files
with
202 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2024, University of Freiburg | ||
// Authors: Axel Lehmann <[email protected]>. | ||
|
||
// This file is part of osm2rdf. | ||
// | ||
// osm2rdf is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// osm2rdf is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with osm2rdf. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
#ifndef OSM2RDF_OSM_CHANGESET_H_ | ||
#define OSM2RDF_OSM_CHANGESET_H_ | ||
|
||
#include "osmium/osm/changeset.hpp" | ||
|
||
namespace osm2rdf::osm { | ||
|
||
class Changeset { | ||
public: | ||
typedef uint32_t id_t; | ||
Changeset(); | ||
explicit Changeset(const osmium::Changeset& changeset); | ||
[[nodiscard]] id_t id() const noexcept; | ||
|
||
protected: | ||
id_t _id; | ||
}; | ||
|
||
} // namespace osm2rdf::osm | ||
|
||
#endif // OSM2RDF_OSM_CHANGESET_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2024, University of Freiburg | ||
// Authors: Axel Lehmann <[email protected]> | ||
|
||
// This file is part of osm2rdf. | ||
// | ||
// osm2rdf is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// osm2rdf is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with osm2rdf. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
#include "osm2rdf/osm/Changeset.h" | ||
|
||
#include <iostream> | ||
#include <limits> | ||
|
||
#include "osmium/osm/changeset.hpp" | ||
|
||
// ____________________________________________________________________________ | ||
osm2rdf::osm::Changeset::Changeset() { | ||
_id = std::numeric_limits<osm2rdf::osm::Changeset::id_t>::max(); | ||
} | ||
// ____________________________________________________________________________ | ||
osm2rdf::osm::Changeset::Changeset(const osmium::Changeset& changeset) | ||
: Changeset() { | ||
_id = changeset.id(); | ||
} | ||
|
||
// ____________________________________________________________________________ | ||
osm2rdf::osm::Changeset::id_t osm2rdf::osm::Changeset::id() const noexcept { | ||
return _id; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.