{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/49997049","id":49997049,"diff_hunk":"@@ -0,0 +1,47 @@\n+#pragma once\n+\n+#include \"editor/server_api.hpp\"\n+#include \"editor/xml_feature.hpp\"\n+\n+#include \"base/exception.hpp\"\n+\n+class FeatureType;\n+\n+namespace osm\n+{\n+\n+struct ClientToken;\n+\n+class ChangesetWrapper\n+{\n+public:\n+  DECLARE_EXCEPTION(ChangesetWrapperException, RootException);\n+  DECLARE_EXCEPTION(NetworkErrorException, ChangesetWrapperException);\n+  DECLARE_EXCEPTION(HttpErrorException, ChangesetWrapperException);\n+  DECLARE_EXCEPTION(OsmXmlParseException, ChangesetWrapperException);\n+  DECLARE_EXCEPTION(OsmObjectWasDeletedException, ChangesetWrapperException);\n+  DECLARE_EXCEPTION(CreateChangeSetFailedException, ChangesetWrapperException);\n+  DECLARE_EXCEPTION(ModifyNodeFailedException, ChangesetWrapperException);\n+  DECLARE_EXCEPTION(LinearFeaturesAreNotSupportedException, ChangesetWrapperException);\n+\n+  ChangesetWrapper(TKeySecret const & keySecret, ServerApi06::TKeyValueTags const & comments);\n+  ~ChangesetWrapper();\n+\n+  /// Throws many exceptions, including XMLNode's parsing ones.\n+  /// OsmObjectWasDeletedException means that node was deleted from OSM server by someone else.\n+  editor::XMLFeature GetMatchingFeatureFromOSM(editor::XMLFeature const & ourPatch, FeatureType const & feature);\n+\n+  /// Throws.\n+  void ModifyNode(editor::XMLFeature node);\n+\n+private:\n+  // Unfortunately, pugi can't return xml_documents from methods.\n+  void LoadXmlFromOSM(ms::LatLon const & ll, pugi::xml_document & doc);\n+\n+  ServerApi06::TKeyValueTags m_changesetComments;\n+  ServerApi06 m_api;\n+  static constexpr int const kInvalidChangesetId = 0;","path":"editor/changeset_wrapper.hpp","position":43,"original_position":43,"commit_id":"7aeaea780a83e9af915b09b56ee4bd95b619ea2d","original_commit_id":"7aeaea780a83e9af915b09b56ee4bd95b619ea2d","user":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"body":"Мой косяк, поправлю и уберу const тоже. Хотя он не мешает на мой взгляд (а единообразный код проще читать).\n\n> On Jan 18, 2016, at 14:59, Ilya Zverev <notifications@github.com> wrote:\n> \n> In editor/changeset_wrapper.hpp <https://github.com/mapsme/omim/pull/1395#discussion_r49990600>:\n> \n> > +  ~ChangesetWrapper();\n> > +\n> > +  /// Throws many exceptions, including XMLNode's parsing ones.\n> > +  /// OsmObjectWasDeletedException means that node was deleted from OSM server by someone else.\n> > +  editor::XMLFeature GetMatchingFeatureFromOSM(editor::XMLFeature const & ourPatch, FeatureType const & feature);\n> > +\n> > +  /// Throws.\n> > +  void ModifyNode(editor::XMLFeature node);\n> > +\n> > +private:\n> > +  // Unfortunately, pugi can't return xml_documents from methods.\n> > +  void LoadXmlFromOSM(ms::LatLon const & ll, pugi::xml_document & doc);\n> > +\n> > +  ServerApi06::TKeyValueTags m_changesetComments;\n> > +  ServerApi06 m_api;\n> > +  static constexpr int const kInvalidChangesetId = 0;\n> Ты же видишь, что статья касается только сложных типов, но не int и подобных. Кстати, почему не uint64_t?\n> \n> —\n> Reply to this email directly or view it on GitHub <https://github.com/mapsme/omim/pull/1395/files#r49990600>.\n> \n\n","created_at":"2016-01-18T13:15:51Z","updated_at":"2016-01-18T13:15:51Z","html_url":"https://github.com/mapsme/omim/pull/1395#discussion_r49997049","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/1395","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/49997049"},"html":{"href":"https://github.com/mapsme/omim/pull/1395#discussion_r49997049"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1395"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/1395","id":56024213,"html_url":"https://github.com/mapsme/omim/pull/1395","diff_url":"https://github.com/mapsme/omim/pull/1395.diff","patch_url":"https://github.com/mapsme/omim/pull/1395.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/1395","number":1395,"state":"open","locked":false,"title":"OSM editor changes & iOS integration.","user":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"body":"@mgsergio @vng PTAL please","created_at":"2016-01-14T11:39:58Z","updated_at":"2016-01-18T13:15:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b5aee6328152419ce11c90481247acaad2714c0","assignee":{"login":"mgsergio","id":6658987,"avatar_url":"https://avatars.githubusercontent.com/u/6658987?v=3","gravatar_id":"","url":"https://api.github.com/users/mgsergio","html_url":"https://github.com/mgsergio","followers_url":"https://api.github.com/users/mgsergio/followers","following_url":"https://api.github.com/users/mgsergio/following{/other_user}","gists_url":"https://api.github.com/users/mgsergio/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsergio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsergio/subscriptions","organizations_url":"https://api.github.com/users/mgsergio/orgs","repos_url":"https://api.github.com/users/mgsergio/repos","events_url":"https://api.github.com/users/mgsergio/events{/privacy}","received_events_url":"https://api.github.com/users/mgsergio/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/1395/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/1395/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/1395/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/7aeaea780a83e9af915b09b56ee4bd95b619ea2d","head":{"label":"deathbaba:osm-editor-changes","ref":"osm-editor-changes","sha":"7aeaea780a83e9af915b09b56ee4bd95b619ea2d","user":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"repo":{"id":43427531,"name":"omim","full_name":"deathbaba/omim","owner":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deathbaba/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/deathbaba/omim","forks_url":"https://api.github.com/repos/deathbaba/omim/forks","keys_url":"https://api.github.com/repos/deathbaba/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deathbaba/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deathbaba/omim/teams","hooks_url":"https://api.github.com/repos/deathbaba/omim/hooks","issue_events_url":"https://api.github.com/repos/deathbaba/omim/issues/events{/number}","events_url":"https://api.github.com/repos/deathbaba/omim/events","assignees_url":"https://api.github.com/repos/deathbaba/omim/assignees{/user}","branches_url":"https://api.github.com/repos/deathbaba/omim/branches{/branch}","tags_url":"https://api.github.com/repos/deathbaba/omim/tags","blobs_url":"https://api.github.com/repos/deathbaba/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deathbaba/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deathbaba/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/deathbaba/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deathbaba/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/deathbaba/omim/languages","stargazers_url":"https://api.github.com/repos/deathbaba/omim/stargazers","contributors_url":"https://api.github.com/repos/deathbaba/omim/contributors","subscribers_url":"https://api.github.com/repos/deathbaba/omim/subscribers","subscription_url":"https://api.github.com/repos/deathbaba/omim/subscription","commits_url":"https://api.github.com/repos/deathbaba/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/deathbaba/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/deathbaba/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/deathbaba/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/deathbaba/omim/contents/{+path}","compare_url":"https://api.github.com/repos/deathbaba/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deathbaba/omim/merges","archive_url":"https://api.github.com/repos/deathbaba/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deathbaba/omim/downloads","issues_url":"https://api.github.com/repos/deathbaba/omim/issues{/number}","pulls_url":"https://api.github.com/repos/deathbaba/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/deathbaba/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/deathbaba/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deathbaba/omim/labels{/name}","releases_url":"https://api.github.com/repos/deathbaba/omim/releases{/id}","created_at":"2015-09-30T10:45:37Z","updated_at":"2015-09-30T10:48:10Z","pushed_at":"2016-01-18T06:08:35Z","git_url":"git://github.com/deathbaba/omim.git","ssh_url":"git@github.com:deathbaba/omim.git","clone_url":"https://github.com/deathbaba/omim.git","svn_url":"https://github.com/deathbaba/omim","homepage":null,"size":1992586,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:osm-editor","ref":"osm-editor","sha":"96e3e598959c06288a9284b04e766c2b608b160f","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","created_at":"2015-09-20T02:57:13Z","updated_at":"2016-01-17T17:50:49Z","pushed_at":"2016-01-18T13:15:34Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":null,"size":2060471,"stargazers_count":1582,"watchers_count":1582,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":108,"forks":209,"open_issues":108,"watchers":1582,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1395"},"html":{"href":"https://github.com/mapsme/omim/pull/1395"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/1395"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/1395/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1395/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1395/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/7aeaea780a83e9af915b09b56ee4bd95b619ea2d"}}}}