{"action":"created","comment":{"url":"https://api.github.com/repos/valhalla/baldr/pulls/comments/26838868","id":26838868,"diff_hunk":"@@ -0,0 +1,90 @@\n+#ifndef VALHALLA_BALDR_ADMININFO_H_\n+#define VALHALLA_BALDR_ADMININFO_H_\n+\n+#include <vector>\n+#include <string>\n+#include <ostream>\n+#include <iostream>\n+\n+#include <valhalla/midgard/pointll.h>\n+#include <valhalla/midgard/util.h>\n+#include <valhalla/baldr/graphid.h>\n+\n+using namespace valhalla::midgard;\n+\n+namespace valhalla {\n+namespace baldr {\n+\n+constexpr size_t kMaxNames = 255;\n+\n+/**\n+ * Admin information\n+ */\n+class AdminInfo {\n+ public:\n+  AdminInfo() = delete;\n+  AdminInfo(const AdminInfo& other) = delete;\n+\n+  /**\n+   * Constructor\n+   *\n+   * @param pointer to a bit of memory that has the info for this admin\n+   */\n+  AdminInfo(char* ptr, const char* names_list, const size_t names_list_length);\n+\n+  /**\n+   * Destructor\n+   *\n+   */\n+  virtual ~AdminInfo();\n+\n+  // Returns the name count\n+  const uint32_t name_count() const;\n+\n+  // Returns the admin level\n+  //const uint32_t admin_level() const;\n+\n+  // Returns the name index at the specified index.\n+  const uint32_t GetNameOffset(uint8_t index) const;\n+\n+  /**\n+   * Convenience method to get the names for an admin\n+   * @return   Returns a list (vector) of names.\n+   */\n+  const std::vector<std::string> GetNames() const;\n+\n+  // Operator EqualTo.\n+  bool operator ==(const AdminInfo& rhs) const;\n+\n+  // Packed items: counts for names and level\n+  union PackedItem {\n+    struct Fields {\n+      uint32_t name_count          :8;\n+      uint32_t timezone            :6;\n+      uint32_t dst                 :1;\n+      uint32_t spare               :17;\n+\n+    } fields;\n+    uint32_t value;\n+  };\n+\n+ protected:\n+\n+  // Where we keep the statistics about how large the vectors below are\n+  PackedItem* item_;\n+\n+  // List of name indexes\n+  uint32_t* name_offset_list_;\n+\n+  // The list of names within the tile\n+  const char* names_list_;","path":"valhalla/baldr/admininfo.h","position":80,"original_position":80,"commit_id":"4755586c319d9ce58366846813bb4d3f9ffd98a2","original_commit_id":"4755586c319d9ce58366846813bb4d3f9ffd98a2","user":{"login":"gknisely","id":2676277,"avatar_url":"https://avatars.githubusercontent.com/u/2676277?v=3","gravatar_id":"","url":"https://api.github.com/users/gknisely","html_url":"https://github.com/gknisely","followers_url":"https://api.github.com/users/gknisely/followers","following_url":"https://api.github.com/users/gknisely/following{/other_user}","gists_url":"https://api.github.com/users/gknisely/gists{/gist_id}","starred_url":"https://api.github.com/users/gknisely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gknisely/subscriptions","organizations_url":"https://api.github.com/users/gknisely/orgs","repos_url":"https://api.github.com/users/gknisely/repos","events_url":"https://api.github.com/users/gknisely/events{/privacy}","received_events_url":"https://api.github.com/users/gknisely/received_events","type":"User","site_admin":false},"body":"old code...removing.  good catch","created_at":"2015-03-20T13:30:50Z","updated_at":"2015-03-20T13:30:50Z","html_url":"https://github.com/valhalla/baldr/pull/119#discussion_r26838868","pull_request_url":"https://api.github.com/repos/valhalla/baldr/pulls/119","_links":{"self":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/comments/26838868"},"html":{"href":"https://github.com/valhalla/baldr/pull/119#discussion_r26838868"},"pull_request":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/119"}}},"pull_request":{"url":"https://api.github.com/repos/valhalla/baldr/pulls/119","id":31612800,"html_url":"https://github.com/valhalla/baldr/pull/119","diff_url":"https://github.com/valhalla/baldr/pull/119.diff","patch_url":"https://github.com/valhalla/baldr/pull/119.patch","issue_url":"https://api.github.com/repos/valhalla/baldr/issues/119","number":119,"state":"open","locked":false,"title":"Admins","user":{"login":"gknisely","id":2676277,"avatar_url":"https://avatars.githubusercontent.com/u/2676277?v=3","gravatar_id":"","url":"https://api.github.com/users/gknisely","html_url":"https://github.com/gknisely","followers_url":"https://api.github.com/users/gknisely/followers","following_url":"https://api.github.com/users/gknisely/following{/other_user}","gists_url":"https://api.github.com/users/gknisely/gists{/gist_id}","starred_url":"https://api.github.com/users/gknisely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gknisely/subscriptions","organizations_url":"https://api.github.com/users/gknisely/orgs","repos_url":"https://api.github.com/users/gknisely/repos","events_url":"https://api.github.com/users/gknisely/events{/privacy}","received_events_url":"https://api.github.com/users/gknisely/received_events","type":"User","site_admin":false},"body":"@dgearhart @dnesbitt61 @kevinkreiser \r\n\r\nAdmin updates for baldr.","created_at":"2015-03-20T13:21:36Z","updated_at":"2015-03-20T13:30:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1204efb1cbb3d851a5d2069ab4f9bbf7685778f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/valhalla/baldr/pulls/119/commits","review_comments_url":"https://api.github.com/repos/valhalla/baldr/pulls/119/comments","review_comment_url":"https://api.github.com/repos/valhalla/baldr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/valhalla/baldr/issues/119/comments","statuses_url":"https://api.github.com/repos/valhalla/baldr/statuses/4755586c319d9ce58366846813bb4d3f9ffd98a2","head":{"label":"valhalla:admins","ref":"admins","sha":"4755586c319d9ce58366846813bb4d3f9ffd98a2","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186324,"name":"baldr","full_name":"valhalla/baldr","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/baldr","description":"Routing-specific data structures distilled into a library for use within other parts of the system","fork":false,"url":"https://api.github.com/repos/valhalla/baldr","forks_url":"https://api.github.com/repos/valhalla/baldr/forks","keys_url":"https://api.github.com/repos/valhalla/baldr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/baldr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/baldr/teams","hooks_url":"https://api.github.com/repos/valhalla/baldr/hooks","issue_events_url":"https://api.github.com/repos/valhalla/baldr/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/baldr/events","assignees_url":"https://api.github.com/repos/valhalla/baldr/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/baldr/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/baldr/tags","blobs_url":"https://api.github.com/repos/valhalla/baldr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/baldr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/baldr/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/baldr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/baldr/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/baldr/languages","stargazers_url":"https://api.github.com/repos/valhalla/baldr/stargazers","contributors_url":"https://api.github.com/repos/valhalla/baldr/contributors","subscribers_url":"https://api.github.com/repos/valhalla/baldr/subscribers","subscription_url":"https://api.github.com/repos/valhalla/baldr/subscription","commits_url":"https://api.github.com/repos/valhalla/baldr/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/baldr/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/baldr/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/baldr/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/baldr/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/baldr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/baldr/merges","archive_url":"https://api.github.com/repos/valhalla/baldr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/baldr/downloads","issues_url":"https://api.github.com/repos/valhalla/baldr/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/baldr/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/baldr/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/baldr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/baldr/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/baldr/releases{/id}","created_at":"2014-12-18T14:18:18Z","updated_at":"2015-03-19T22:39:23Z","pushed_at":"2015-03-20T13:21:37Z","git_url":"git://github.com/valhalla/baldr.git","ssh_url":"git@github.com:valhalla/baldr.git","clone_url":"https://github.com/valhalla/baldr.git","svn_url":"https://github.com/valhalla/baldr","homepage":null,"size":3244,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"valhalla:master","ref":"master","sha":"75abef7bf0740586e7ca2ef0bbb1ea33e0381727","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186324,"name":"baldr","full_name":"valhalla/baldr","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/baldr","description":"Routing-specific data structures distilled into a library for use within other parts of the system","fork":false,"url":"https://api.github.com/repos/valhalla/baldr","forks_url":"https://api.github.com/repos/valhalla/baldr/forks","keys_url":"https://api.github.com/repos/valhalla/baldr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/baldr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/baldr/teams","hooks_url":"https://api.github.com/repos/valhalla/baldr/hooks","issue_events_url":"https://api.github.com/repos/valhalla/baldr/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/baldr/events","assignees_url":"https://api.github.com/repos/valhalla/baldr/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/baldr/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/baldr/tags","blobs_url":"https://api.github.com/repos/valhalla/baldr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/baldr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/baldr/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/baldr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/baldr/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/baldr/languages","stargazers_url":"https://api.github.com/repos/valhalla/baldr/stargazers","contributors_url":"https://api.github.com/repos/valhalla/baldr/contributors","subscribers_url":"https://api.github.com/repos/valhalla/baldr/subscribers","subscription_url":"https://api.github.com/repos/valhalla/baldr/subscription","commits_url":"https://api.github.com/repos/valhalla/baldr/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/baldr/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/baldr/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/baldr/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/baldr/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/baldr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/baldr/merges","archive_url":"https://api.github.com/repos/valhalla/baldr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/baldr/downloads","issues_url":"https://api.github.com/repos/valhalla/baldr/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/baldr/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/baldr/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/baldr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/baldr/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/baldr/releases{/id}","created_at":"2014-12-18T14:18:18Z","updated_at":"2015-03-19T22:39:23Z","pushed_at":"2015-03-20T13:21:37Z","git_url":"git://github.com/valhalla/baldr.git","ssh_url":"git@github.com:valhalla/baldr.git","clone_url":"https://github.com/valhalla/baldr.git","svn_url":"https://github.com/valhalla/baldr","homepage":null,"size":3244,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/119"},"html":{"href":"https://github.com/valhalla/baldr/pull/119"},"issue":{"href":"https://api.github.com/repos/valhalla/baldr/issues/119"},"comments":{"href":"https://api.github.com/repos/valhalla/baldr/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/valhalla/baldr/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/valhalla/baldr/statuses/4755586c319d9ce58366846813bb4d3f9ffd98a2"}}}}