{"action":"created","comment":{"url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/comments/192078943","pull_request_review_id":124779487,"id":192078943,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjA3ODk0Mw==","diff_hunk":"@@ -281,11 +281,126 @@ namespace RINGMesh\n          * @return the attribute manager containing the grid point attributes\n          * values.\n          */\n-        GEO::AttributesManager& attributes_manager() const\n+        GEO::AttributesManager& attributes_manager()\n         {\n             return attributes_manager_;\n         }\n \n+        /*!\n+         * @return the attribute manager containing the grid point attributes\n+         * values.\n+         */\n+        const GEO::AttributesManager& attributes_manager() const\n+        {\n+            return attributes_manager_;\n+        }\n+\n+        /*!\n+         * Allows us to avoid code duplication on the attribute creation\n+         * function.\n+         */\n+        template < typename T >\n+        static std::string type_to_string()\n+        {\n+            if( typeid( T ).name() == typeid( index_t ).name() )\n+            {\n+                return \"index_t\";\n+            }\n+            else if( typeid( T ).name() == typeid( int ).name() )\n+            {\n+                return \"int\";\n+            }\n+            else if( typeid( T ).name() == typeid( float ).name() )\n+            {\n+                return \"float\";\n+            }\n+            else if( typeid( T ).name() == typeid( double ).name() )\n+            {\n+                return \"double\";\n+            }\n+            else\n+            {\n+                throw RINGMeshException(\n+                    \"CartesianGrid\", \"Give a valid attribute type.\" );","path":"include/ringmesh/mesh/cartesian_grid.h","position":45,"original_position":45,"commit_id":"8e46d170e19c070135163cd0259693ad4677311a","original_commit_id":"8e46d170e19c070135163cd0259693ad4677311a","user":{"login":"panquez","id":32702237,"node_id":"MDQ6VXNlcjMyNzAyMjM3","avatar_url":"https://avatars2.githubusercontent.com/u/32702237?v=4","gravatar_id":"","url":"https://api.github.com/users/panquez","html_url":"https://github.com/panquez","followers_url":"https://api.github.com/users/panquez/followers","following_url":"https://api.github.com/users/panquez/following{/other_user}","gists_url":"https://api.github.com/users/panquez/gists{/gist_id}","starred_url":"https://api.github.com/users/panquez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panquez/subscriptions","organizations_url":"https://api.github.com/users/panquez/orgs","repos_url":"https://api.github.com/users/panquez/repos","events_url":"https://api.github.com/users/panquez/events{/privacy}","received_events_url":"https://api.github.com/users/panquez/received_events","type":"User","site_admin":false},"body":"It is not really a question of validity. You can throw a message explaining that the given type is not yet implemented for attribute and it can easily be added in this function/map.","created_at":"2018-05-31T12:16:45Z","updated_at":"2018-05-31T12:28:41Z","html_url":"https://github.com/ringmesh/RINGMesh/pull/178#discussion_r192078943","pull_request_url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/comments/192078943"},"html":{"href":"https://github.com/ringmesh/RINGMesh/pull/178#discussion_r192078943"},"pull_request":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178"}}},"pull_request":{"url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178","id":189066484,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5MDY2NDg0","html_url":"https://github.com/ringmesh/RINGMesh/pull/178","diff_url":"https://github.com/ringmesh/RINGMesh/pull/178.diff","patch_url":"https://github.com/ringmesh/RINGMesh/pull/178.patch","issue_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues/178","number":178,"state":"open","locked":false,"title":"Cartesian grid attributes","user":{"login":"MelchiorSchuh","id":26920036,"node_id":"MDQ6VXNlcjI2OTIwMDM2","avatar_url":"https://avatars2.githubusercontent.com/u/26920036?v=4","gravatar_id":"","url":"https://api.github.com/users/MelchiorSchuh","html_url":"https://github.com/MelchiorSchuh","followers_url":"https://api.github.com/users/MelchiorSchuh/followers","following_url":"https://api.github.com/users/MelchiorSchuh/following{/other_user}","gists_url":"https://api.github.com/users/MelchiorSchuh/gists{/gist_id}","starred_url":"https://api.github.com/users/MelchiorSchuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MelchiorSchuh/subscriptions","organizations_url":"https://api.github.com/users/MelchiorSchuh/orgs","repos_url":"https://api.github.com/users/MelchiorSchuh/repos","events_url":"https://api.github.com/users/MelchiorSchuh/events{/privacy}","received_events_url":"https://api.github.com/users/MelchiorSchuh/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-18T15:49:55Z","updated_at":"2018-05-31T12:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0da8d98d47189c977a2f3c69fe8090edd8e80610","assignee":null,"assignees":[],"requested_reviewers":[{"login":"BotellaA","id":3213882,"node_id":"MDQ6VXNlcjMyMTM4ODI=","avatar_url":"https://avatars1.githubusercontent.com/u/3213882?v=4","gravatar_id":"","url":"https://api.github.com/users/BotellaA","html_url":"https://github.com/BotellaA","followers_url":"https://api.github.com/users/BotellaA/followers","following_url":"https://api.github.com/users/BotellaA/following{/other_user}","gists_url":"https://api.github.com/users/BotellaA/gists{/gist_id}","starred_url":"https://api.github.com/users/BotellaA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BotellaA/subscriptions","organizations_url":"https://api.github.com/users/BotellaA/orgs","repos_url":"https://api.github.com/users/BotellaA/repos","events_url":"https://api.github.com/users/BotellaA/events{/privacy}","received_events_url":"https://api.github.com/users/BotellaA/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178/commits","review_comments_url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178/comments","review_comment_url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues/178/comments","statuses_url":"https://api.github.com/repos/ringmesh/RINGMesh/statuses/8e46d170e19c070135163cd0259693ad4677311a","head":{"label":"ringmesh:cartesian_grid_attributes","ref":"cartesian_grid_attributes","sha":"8e46d170e19c070135163cd0259693ad4677311a","user":{"login":"ringmesh","id":33122992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTIyOTky","avatar_url":"https://avatars3.githubusercontent.com/u/33122992?v=4","gravatar_id":"","url":"https://api.github.com/users/ringmesh","html_url":"https://github.com/ringmesh","followers_url":"https://api.github.com/users/ringmesh/followers","following_url":"https://api.github.com/users/ringmesh/following{/other_user}","gists_url":"https://api.github.com/users/ringmesh/gists{/gist_id}","starred_url":"https://api.github.com/users/ringmesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ringmesh/subscriptions","organizations_url":"https://api.github.com/users/ringmesh/orgs","repos_url":"https://api.github.com/users/ringmesh/repos","events_url":"https://api.github.com/users/ringmesh/events{/privacy}","received_events_url":"https://api.github.com/users/ringmesh/received_events","type":"Organization","site_admin":false},"repo":{"id":108415296,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg0MTUyOTY=","name":"RINGMesh","full_name":"ringmesh/RINGMesh","owner":{"login":"ringmesh","id":33122992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTIyOTky","avatar_url":"https://avatars3.githubusercontent.com/u/33122992?v=4","gravatar_id":"","url":"https://api.github.com/users/ringmesh","html_url":"https://github.com/ringmesh","followers_url":"https://api.github.com/users/ringmesh/followers","following_url":"https://api.github.com/users/ringmesh/following{/other_user}","gists_url":"https://api.github.com/users/ringmesh/gists{/gist_id}","starred_url":"https://api.github.com/users/ringmesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ringmesh/subscriptions","organizations_url":"https://api.github.com/users/ringmesh/orgs","repos_url":"https://api.github.com/users/ringmesh/repos","events_url":"https://api.github.com/users/ringmesh/events{/privacy}","received_events_url":"https://api.github.com/users/ringmesh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ringmesh/RINGMesh","description":"RINGMesh is a C++ open-source platform for manipulating meshes of geological models.","fork":false,"url":"https://api.github.com/repos/ringmesh/RINGMesh","forks_url":"https://api.github.com/repos/ringmesh/RINGMesh/forks","keys_url":"https://api.github.com/repos/ringmesh/RINGMesh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ringmesh/RINGMesh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ringmesh/RINGMesh/teams","hooks_url":"https://api.github.com/repos/ringmesh/RINGMesh/hooks","issue_events_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues/events{/number}","events_url":"https://api.github.com/repos/ringmesh/RINGMesh/events","assignees_url":"https://api.github.com/repos/ringmesh/RINGMesh/assignees{/user}","branches_url":"https://api.github.com/repos/ringmesh/RINGMesh/branches{/branch}","tags_url":"https://api.github.com/repos/ringmesh/RINGMesh/tags","blobs_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/refs{/sha}","trees_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ringmesh/RINGMesh/statuses/{sha}","languages_url":"https://api.github.com/repos/ringmesh/RINGMesh/languages","stargazers_url":"https://api.github.com/repos/ringmesh/RINGMesh/stargazers","contributors_url":"https://api.github.com/repos/ringmesh/RINGMesh/contributors","subscribers_url":"https://api.github.com/repos/ringmesh/RINGMesh/subscribers","subscription_url":"https://api.github.com/repos/ringmesh/RINGMesh/subscription","commits_url":"https://api.github.com/repos/ringmesh/RINGMesh/commits{/sha}","git_commits_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/commits{/sha}","comments_url":"https://api.github.com/repos/ringmesh/RINGMesh/comments{/number}","issue_comment_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues/comments{/number}","contents_url":"https://api.github.com/repos/ringmesh/RINGMesh/contents/{+path}","compare_url":"https://api.github.com/repos/ringmesh/RINGMesh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ringmesh/RINGMesh/merges","archive_url":"https://api.github.com/repos/ringmesh/RINGMesh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ringmesh/RINGMesh/downloads","issues_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues{/number}","pulls_url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls{/number}","milestones_url":"https://api.github.com/repos/ringmesh/RINGMesh/milestones{/number}","notifications_url":"https://api.github.com/repos/ringmesh/RINGMesh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ringmesh/RINGMesh/labels{/name}","releases_url":"https://api.github.com/repos/ringmesh/RINGMesh/releases{/id}","deployments_url":"https://api.github.com/repos/ringmesh/RINGMesh/deployments","created_at":"2017-10-26T13:29:35Z","updated_at":"2018-05-29T09:08:26Z","pushed_at":"2018-05-31T12:04:41Z","git_url":"git://github.com/ringmesh/RINGMesh.git","ssh_url":"git@github.com:ringmesh/RINGMesh.git","clone_url":"https://github.com/ringmesh/RINGMesh.git","svn_url":"https://github.com/ringmesh/RINGMesh","homepage":"http://ringmesh.org","size":177626,"stargazers_count":25,"watchers_count":25,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":6,"watchers":25,"default_branch":"master"}},"base":{"label":"ringmesh:master","ref":"master","sha":"1ffc20d02e400ba3d7945b57b0d52d1d9dd068d4","user":{"login":"ringmesh","id":33122992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTIyOTky","avatar_url":"https://avatars3.githubusercontent.com/u/33122992?v=4","gravatar_id":"","url":"https://api.github.com/users/ringmesh","html_url":"https://github.com/ringmesh","followers_url":"https://api.github.com/users/ringmesh/followers","following_url":"https://api.github.com/users/ringmesh/following{/other_user}","gists_url":"https://api.github.com/users/ringmesh/gists{/gist_id}","starred_url":"https://api.github.com/users/ringmesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ringmesh/subscriptions","organizations_url":"https://api.github.com/users/ringmesh/orgs","repos_url":"https://api.github.com/users/ringmesh/repos","events_url":"https://api.github.com/users/ringmesh/events{/privacy}","received_events_url":"https://api.github.com/users/ringmesh/received_events","type":"Organization","site_admin":false},"repo":{"id":108415296,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg0MTUyOTY=","name":"RINGMesh","full_name":"ringmesh/RINGMesh","owner":{"login":"ringmesh","id":33122992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTIyOTky","avatar_url":"https://avatars3.githubusercontent.com/u/33122992?v=4","gravatar_id":"","url":"https://api.github.com/users/ringmesh","html_url":"https://github.com/ringmesh","followers_url":"https://api.github.com/users/ringmesh/followers","following_url":"https://api.github.com/users/ringmesh/following{/other_user}","gists_url":"https://api.github.com/users/ringmesh/gists{/gist_id}","starred_url":"https://api.github.com/users/ringmesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ringmesh/subscriptions","organizations_url":"https://api.github.com/users/ringmesh/orgs","repos_url":"https://api.github.com/users/ringmesh/repos","events_url":"https://api.github.com/users/ringmesh/events{/privacy}","received_events_url":"https://api.github.com/users/ringmesh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ringmesh/RINGMesh","description":"RINGMesh is a C++ open-source platform for manipulating meshes of geological models.","fork":false,"url":"https://api.github.com/repos/ringmesh/RINGMesh","forks_url":"https://api.github.com/repos/ringmesh/RINGMesh/forks","keys_url":"https://api.github.com/repos/ringmesh/RINGMesh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ringmesh/RINGMesh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ringmesh/RINGMesh/teams","hooks_url":"https://api.github.com/repos/ringmesh/RINGMesh/hooks","issue_events_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues/events{/number}","events_url":"https://api.github.com/repos/ringmesh/RINGMesh/events","assignees_url":"https://api.github.com/repos/ringmesh/RINGMesh/assignees{/user}","branches_url":"https://api.github.com/repos/ringmesh/RINGMesh/branches{/branch}","tags_url":"https://api.github.com/repos/ringmesh/RINGMesh/tags","blobs_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/refs{/sha}","trees_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ringmesh/RINGMesh/statuses/{sha}","languages_url":"https://api.github.com/repos/ringmesh/RINGMesh/languages","stargazers_url":"https://api.github.com/repos/ringmesh/RINGMesh/stargazers","contributors_url":"https://api.github.com/repos/ringmesh/RINGMesh/contributors","subscribers_url":"https://api.github.com/repos/ringmesh/RINGMesh/subscribers","subscription_url":"https://api.github.com/repos/ringmesh/RINGMesh/subscription","commits_url":"https://api.github.com/repos/ringmesh/RINGMesh/commits{/sha}","git_commits_url":"https://api.github.com/repos/ringmesh/RINGMesh/git/commits{/sha}","comments_url":"https://api.github.com/repos/ringmesh/RINGMesh/comments{/number}","issue_comment_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues/comments{/number}","contents_url":"https://api.github.com/repos/ringmesh/RINGMesh/contents/{+path}","compare_url":"https://api.github.com/repos/ringmesh/RINGMesh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ringmesh/RINGMesh/merges","archive_url":"https://api.github.com/repos/ringmesh/RINGMesh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ringmesh/RINGMesh/downloads","issues_url":"https://api.github.com/repos/ringmesh/RINGMesh/issues{/number}","pulls_url":"https://api.github.com/repos/ringmesh/RINGMesh/pulls{/number}","milestones_url":"https://api.github.com/repos/ringmesh/RINGMesh/milestones{/number}","notifications_url":"https://api.github.com/repos/ringmesh/RINGMesh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ringmesh/RINGMesh/labels{/name}","releases_url":"https://api.github.com/repos/ringmesh/RINGMesh/releases{/id}","deployments_url":"https://api.github.com/repos/ringmesh/RINGMesh/deployments","created_at":"2017-10-26T13:29:35Z","updated_at":"2018-05-29T09:08:26Z","pushed_at":"2018-05-31T12:04:41Z","git_url":"git://github.com/ringmesh/RINGMesh.git","ssh_url":"git@github.com:ringmesh/RINGMesh.git","clone_url":"https://github.com/ringmesh/RINGMesh.git","svn_url":"https://github.com/ringmesh/RINGMesh","homepage":"http://ringmesh.org","size":177626,"stargazers_count":25,"watchers_count":25,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":6,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178"},"html":{"href":"https://github.com/ringmesh/RINGMesh/pull/178"},"issue":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/issues/178"},"comments":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/issues/178/comments"},"review_comments":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178/comments"},"review_comment":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/pulls/178/commits"},"statuses":{"href":"https://api.github.com/repos/ringmesh/RINGMesh/statuses/8e46d170e19c070135163cd0259693ad4677311a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"panquez"}}