{"action":"created","comment":{"url":"https://api.github.com/repos/njoy/ENDFtk/pulls/comments/72818728","id":72818728,"diff_hunk":"@@ -9,43 +9,68 @@ namespace implementation {\n template<typename Iterator>\n FileSkeleton<Iterator>::FileSkeleton(\n   const HeadRecord& mHead, \n-  Iterator begin, Iterator& position, const Iterator& end, long& lineNumber )\n-  : begin_(begin)\n-{\n-  try{\n-    sectionsIndexed_.emplace_back(mHead, begin, position, end, lineNumber);\n-    auto& skeletor = sectionsIndexed_.back();\n-    sections_.emplace(skeletor.MT(), skeletor);\n+  Iterator begin, Iterator& position, const Iterator& end, long& LN )\n+  try:  MF_(mHead.MF()), begin_(begin),\n+        sectionsIndexed_(createIndexedVector(mHead, begin, position, end, LN)),\n+        sections_(createSectionsMap()),\n+        end_(position)\n+  { /* Do nothing */ }\n+  catch( std::exception& e ){\n+    LOG(INFO) << \"Trouble encountered while constructing a FileSkeleton.\";\n+    throw e;\n+  }\n \n-    this->MF_  = mHead.MF();\n+template<typename Iterator>\n+std::vector<SectionSkeleton<Iterator> > \n+FileSkeleton<Iterator>::createIndexedVector(\n+  const HeadRecord& head,\n+  Iterator begin, Iterator& position, const Iterator& end, \n+  long& lineNumber ){\n+    std::vector<SectionSkeleton<Iterator> > SI;\n \n-    auto FEND = StructureDivision(position, end, lineNumber); \n+    try{\n+      SI.push_back(\n+        SectionSkeleton<Iterator>(head, begin, position, end, lineNumber) );\n \n-    while( not FEND.isFend() ){\n-      LOG(INFO) << \"diff before: \" << end-position;\n-      if(position >= end){\n-        LOG(ERROR) << \"File encountered end of stream before reading FEND\";\n-        throw std::exception();\n+      auto FEND = StructureDivision(position, end, lineNumber); \n+\n+      while( not FEND.isFend() ){\n+        if(position >= end){\n+          LOG(ERROR) << \"File encountered end of stream before reading FEND\";\n+          throw std::exception();\n+        }\n+        SI.push_back(\n+          SectionSkeleton<Iterator>(asHead(FEND), \n+                                    begin, position, end, lineNumber) );\n+\n+        begin = position;\n+        FEND = StructureDivision(position, end, lineNumber); \n       }\n-      sectionsIndexed_.emplace_back(asHead(FEND), \n-                                    begin, position, end, lineNumber);\n-      skeletor = sectionsIndexed_.back();\n-      sections_.emplace(skeletor.MT(), skeletor);\n-\n-      begin = position;\n-      FEND = StructureDivision(position, end, lineNumber); \n-      LOG(INFO) << \"diff after: \" << end-position;\n-      LOG(INFO) << \"isFEND? \" << FEND.isFend();\n+    } catch( std::exception& e ){\n+      LOG(INFO) << \"Trouble when populating the FileSkeleton index\";\n+      LOG(INFO) << \"Line number=\" << lineNumber << \", MF=\" << this->MF_;\n+      throw e;\n+    }\n+\n+    return SI;\n+}\n+\n+template<typename Iterator>\n+std::unordered_map<int, SectionSkeleton<Iterator>& > \n+FileSkeleton<Iterator>::createSectionsMap(){\n+\n+  std::unordered_map<int, SectionSkeleton<Iterator>& > sectionMap;","path":"implementation/FileSkeleton/src/FileSkeleton.hpp.in","position":62,"original_position":77,"commit_id":"c632f21b6acfd90d6da86872ca6f5cd90c65a575","original_commit_id":"c632f21b6acfd90d6da86872ca6f5cd90c65a575","user":{"login":"apmccartney","id":3707548,"avatar_url":"https://avatars.githubusercontent.com/u/3707548?v=3","gravatar_id":"","url":"https://api.github.com/users/apmccartney","html_url":"https://github.com/apmccartney","followers_url":"https://api.github.com/users/apmccartney/followers","following_url":"https://api.github.com/users/apmccartney/following{/other_user}","gists_url":"https://api.github.com/users/apmccartney/gists{/gist_id}","starred_url":"https://api.github.com/users/apmccartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apmccartney/subscriptions","organizations_url":"https://api.github.com/users/apmccartney/orgs","repos_url":"https://api.github.com/users/apmccartney/repos","events_url":"https://api.github.com/users/apmccartney/events{/privacy}","received_events_url":"https://api.github.com/users/apmccartney/received_events","type":"User","site_admin":false},"body":"Again, good job with being mindful of rvo.\r\n\r\nThere's an opportunity to reserve the space you need at this point.","created_at":"2016-07-29T16:14:34Z","updated_at":"2016-07-29T16:14:34Z","html_url":"https://github.com/njoy/ENDFtk/pull/8#discussion_r72818728","pull_request_url":"https://api.github.com/repos/njoy/ENDFtk/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/njoy/ENDFtk/pulls/comments/72818728"},"html":{"href":"https://github.com/njoy/ENDFtk/pull/8#discussion_r72818728"},"pull_request":{"href":"https://api.github.com/repos/njoy/ENDFtk/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/njoy/ENDFtk/pulls/8","id":79067520,"html_url":"https://github.com/njoy/ENDFtk/pull/8","diff_url":"https://github.com/njoy/ENDFtk/pull/8.diff","patch_url":"https://github.com/njoy/ENDFtk/pull/8.patch","issue_url":"https://api.github.com/repos/njoy/ENDFtk/issues/8","number":8,"state":"open","locked":false,"title":"Feature/skeleton","user":{"login":"jlconlin","id":1275437,"avatar_url":"https://avatars.githubusercontent.com/u/1275437?v=3","gravatar_id":"","url":"https://api.github.com/users/jlconlin","html_url":"https://github.com/jlconlin","followers_url":"https://api.github.com/users/jlconlin/followers","following_url":"https://api.github.com/users/jlconlin/following{/other_user}","gists_url":"https://api.github.com/users/jlconlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlconlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlconlin/subscriptions","organizations_url":"https://api.github.com/users/jlconlin/orgs","repos_url":"https://api.github.com/users/jlconlin/repos","events_url":"https://api.github.com/users/jlconlin/events{/privacy}","received_events_url":"https://api.github.com/users/jlconlin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-27T17:48:08Z","updated_at":"2016-07-29T16:14:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0d309ed78d4e8f8b42e0f655b3686c5db14f732","assignee":{"login":"apmccartney","id":3707548,"avatar_url":"https://avatars.githubusercontent.com/u/3707548?v=3","gravatar_id":"","url":"https://api.github.com/users/apmccartney","html_url":"https://github.com/apmccartney","followers_url":"https://api.github.com/users/apmccartney/followers","following_url":"https://api.github.com/users/apmccartney/following{/other_user}","gists_url":"https://api.github.com/users/apmccartney/gists{/gist_id}","starred_url":"https://api.github.com/users/apmccartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apmccartney/subscriptions","organizations_url":"https://api.github.com/users/apmccartney/orgs","repos_url":"https://api.github.com/users/apmccartney/repos","events_url":"https://api.github.com/users/apmccartney/events{/privacy}","received_events_url":"https://api.github.com/users/apmccartney/received_events","type":"User","site_admin":false},"assignees":[{"login":"apmccartney","id":3707548,"avatar_url":"https://avatars.githubusercontent.com/u/3707548?v=3","gravatar_id":"","url":"https://api.github.com/users/apmccartney","html_url":"https://github.com/apmccartney","followers_url":"https://api.github.com/users/apmccartney/followers","following_url":"https://api.github.com/users/apmccartney/following{/other_user}","gists_url":"https://api.github.com/users/apmccartney/gists{/gist_id}","starred_url":"https://api.github.com/users/apmccartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apmccartney/subscriptions","organizations_url":"https://api.github.com/users/apmccartney/orgs","repos_url":"https://api.github.com/users/apmccartney/repos","events_url":"https://api.github.com/users/apmccartney/events{/privacy}","received_events_url":"https://api.github.com/users/apmccartney/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/njoy/ENDFtk/pulls/8/commits","review_comments_url":"https://api.github.com/repos/njoy/ENDFtk/pulls/8/comments","review_comment_url":"https://api.github.com/repos/njoy/ENDFtk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/njoy/ENDFtk/issues/8/comments","statuses_url":"https://api.github.com/repos/njoy/ENDFtk/statuses/c632f21b6acfd90d6da86872ca6f5cd90c65a575","head":{"label":"njoy:feature/Skeleton","ref":"feature/Skeleton","sha":"c632f21b6acfd90d6da86872ca6f5cd90c65a575","user":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"repo":{"id":61145680,"name":"ENDFtk","full_name":"njoy/ENDFtk","owner":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/njoy/ENDFtk","description":"Toolkit for reading and interacting with ENDF-6 formatted files","fork":false,"url":"https://api.github.com/repos/njoy/ENDFtk","forks_url":"https://api.github.com/repos/njoy/ENDFtk/forks","keys_url":"https://api.github.com/repos/njoy/ENDFtk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njoy/ENDFtk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njoy/ENDFtk/teams","hooks_url":"https://api.github.com/repos/njoy/ENDFtk/hooks","issue_events_url":"https://api.github.com/repos/njoy/ENDFtk/issues/events{/number}","events_url":"https://api.github.com/repos/njoy/ENDFtk/events","assignees_url":"https://api.github.com/repos/njoy/ENDFtk/assignees{/user}","branches_url":"https://api.github.com/repos/njoy/ENDFtk/branches{/branch}","tags_url":"https://api.github.com/repos/njoy/ENDFtk/tags","blobs_url":"https://api.github.com/repos/njoy/ENDFtk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njoy/ENDFtk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njoy/ENDFtk/git/refs{/sha}","trees_url":"https://api.github.com/repos/njoy/ENDFtk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njoy/ENDFtk/statuses/{sha}","languages_url":"https://api.github.com/repos/njoy/ENDFtk/languages","stargazers_url":"https://api.github.com/repos/njoy/ENDFtk/stargazers","contributors_url":"https://api.github.com/repos/njoy/ENDFtk/contributors","subscribers_url":"https://api.github.com/repos/njoy/ENDFtk/subscribers","subscription_url":"https://api.github.com/repos/njoy/ENDFtk/subscription","commits_url":"https://api.github.com/repos/njoy/ENDFtk/commits{/sha}","git_commits_url":"https://api.github.com/repos/njoy/ENDFtk/git/commits{/sha}","comments_url":"https://api.github.com/repos/njoy/ENDFtk/comments{/number}","issue_comment_url":"https://api.github.com/repos/njoy/ENDFtk/issues/comments{/number}","contents_url":"https://api.github.com/repos/njoy/ENDFtk/contents/{+path}","compare_url":"https://api.github.com/repos/njoy/ENDFtk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njoy/ENDFtk/merges","archive_url":"https://api.github.com/repos/njoy/ENDFtk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njoy/ENDFtk/downloads","issues_url":"https://api.github.com/repos/njoy/ENDFtk/issues{/number}","pulls_url":"https://api.github.com/repos/njoy/ENDFtk/pulls{/number}","milestones_url":"https://api.github.com/repos/njoy/ENDFtk/milestones{/number}","notifications_url":"https://api.github.com/repos/njoy/ENDFtk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njoy/ENDFtk/labels{/name}","releases_url":"https://api.github.com/repos/njoy/ENDFtk/releases{/id}","deployments_url":"https://api.github.com/repos/njoy/ENDFtk/deployments","created_at":"2016-06-14T18:17:43Z","updated_at":"2016-07-25T20:34:04Z","pushed_at":"2016-07-29T15:58:22Z","git_url":"git://github.com/njoy/ENDFtk.git","ssh_url":"git@github.com:njoy/ENDFtk.git","clone_url":"https://github.com/njoy/ENDFtk.git","svn_url":"https://github.com/njoy/ENDFtk","homepage":null,"size":231,"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":"njoy:master","ref":"master","sha":"e113cf6326a24592fb2f7f102d236a8daf6ad55e","user":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"repo":{"id":61145680,"name":"ENDFtk","full_name":"njoy/ENDFtk","owner":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/njoy/ENDFtk","description":"Toolkit for reading and interacting with ENDF-6 formatted files","fork":false,"url":"https://api.github.com/repos/njoy/ENDFtk","forks_url":"https://api.github.com/repos/njoy/ENDFtk/forks","keys_url":"https://api.github.com/repos/njoy/ENDFtk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njoy/ENDFtk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njoy/ENDFtk/teams","hooks_url":"https://api.github.com/repos/njoy/ENDFtk/hooks","issue_events_url":"https://api.github.com/repos/njoy/ENDFtk/issues/events{/number}","events_url":"https://api.github.com/repos/njoy/ENDFtk/events","assignees_url":"https://api.github.com/repos/njoy/ENDFtk/assignees{/user}","branches_url":"https://api.github.com/repos/njoy/ENDFtk/branches{/branch}","tags_url":"https://api.github.com/repos/njoy/ENDFtk/tags","blobs_url":"https://api.github.com/repos/njoy/ENDFtk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njoy/ENDFtk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njoy/ENDFtk/git/refs{/sha}","trees_url":"https://api.github.com/repos/njoy/ENDFtk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njoy/ENDFtk/statuses/{sha}","languages_url":"https://api.github.com/repos/njoy/ENDFtk/languages","stargazers_url":"https://api.github.com/repos/njoy/ENDFtk/stargazers","contributors_url":"https://api.github.com/repos/njoy/ENDFtk/contributors","subscribers_url":"https://api.github.com/repos/njoy/ENDFtk/subscribers","subscription_url":"https://api.github.com/repos/njoy/ENDFtk/subscription","commits_url":"https://api.github.com/repos/njoy/ENDFtk/commits{/sha}","git_commits_url":"https://api.github.com/repos/njoy/ENDFtk/git/commits{/sha}","comments_url":"https://api.github.com/repos/njoy/ENDFtk/comments{/number}","issue_comment_url":"https://api.github.com/repos/njoy/ENDFtk/issues/comments{/number}","contents_url":"https://api.github.com/repos/njoy/ENDFtk/contents/{+path}","compare_url":"https://api.github.com/repos/njoy/ENDFtk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njoy/ENDFtk/merges","archive_url":"https://api.github.com/repos/njoy/ENDFtk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njoy/ENDFtk/downloads","issues_url":"https://api.github.com/repos/njoy/ENDFtk/issues{/number}","pulls_url":"https://api.github.com/repos/njoy/ENDFtk/pulls{/number}","milestones_url":"https://api.github.com/repos/njoy/ENDFtk/milestones{/number}","notifications_url":"https://api.github.com/repos/njoy/ENDFtk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njoy/ENDFtk/labels{/name}","releases_url":"https://api.github.com/repos/njoy/ENDFtk/releases{/id}","deployments_url":"https://api.github.com/repos/njoy/ENDFtk/deployments","created_at":"2016-06-14T18:17:43Z","updated_at":"2016-07-25T20:34:04Z","pushed_at":"2016-07-29T15:58:22Z","git_url":"git://github.com/njoy/ENDFtk.git","ssh_url":"git@github.com:njoy/ENDFtk.git","clone_url":"https://github.com/njoy/ENDFtk.git","svn_url":"https://github.com/njoy/ENDFtk","homepage":null,"size":231,"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/njoy/ENDFtk/pulls/8"},"html":{"href":"https://github.com/njoy/ENDFtk/pull/8"},"issue":{"href":"https://api.github.com/repos/njoy/ENDFtk/issues/8"},"comments":{"href":"https://api.github.com/repos/njoy/ENDFtk/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/njoy/ENDFtk/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/njoy/ENDFtk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/njoy/ENDFtk/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/njoy/ENDFtk/statuses/c632f21b6acfd90d6da86872ca6f5cd90c65a575"}}}}
{"actor":{"display_login":"apmccartney"}}