Osmium
0.1
|
00001 #ifndef OSMIUM_OSM_TAG_HPP 00002 #define OSMIUM_OSM_TAG_HPP 00003 00004 /* 00005 00006 Copyright 2011 Jochen Topf <jochen@topf.org> and others (see README). 00007 00008 This file is part of Osmium (https://github.com/joto/osmium). 00009 00010 Osmium is free software: you can redistribute it and/or modify it under the 00011 terms of the GNU Lesser General Public License or (at your option) the GNU 00012 General Public License as published by the Free Software Foundation, either 00013 version 3 of the Licenses, or (at your option) any later version. 00014 00015 Osmium is distributed in the hope that it will be useful, but WITHOUT ANY 00016 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 00017 PARTICULAR PURPOSE. See the GNU Lesser General Public License and the GNU 00018 General Public License for more details. 00019 00020 You should have received a copy of the Licenses along with Osmium. If not, see 00021 <http://www.gnu.org/licenses/>. 00022 00023 */ 00024 00025 #include <cstring> 00026 #include <string> 00027 00028 namespace Osmium { 00029 00030 namespace OSM { 00031 00038 class Tag { 00039 00040 public: 00041 00042 static const int max_utf16_length_key = 2 * (255 + 1); 00043 static const int max_utf16_length_value = 2 * (255 + 1); 00044 00045 Tag(const char* key, const char* value) : m_key(key), m_value(value) { 00046 } 00047 00048 const char* key() const { 00049 return m_key.c_str(); 00050 } 00051 00052 const char* value() const { 00053 return m_value.c_str(); 00054 } 00055 00056 private: 00057 00058 std::string m_key; 00059 std::string m_value; 00060 00061 }; 00062 00063 } // namespace OSM 00064 00065 } // namespace Osmium 00066 00067 #endif // OSMIUM_OSM_TAG_HPP