{"action":"created","comment":{"url":"https://api.github.com/repos/ros2/rosidl/pulls/comments/35170516","id":35170516,"diff_hunk":"@@ -0,0 +1,79 @@\n+// generated from rosidl_generator_cpp/resource/msg__traits.hpp.template\n+\n+@#######################################################################\n+@# EmPy template for generating <msg>__traits.hpp files\n+@#\n+@# Context:\n+@#  - spec (rosidl_parser.MessageSpecification)\n+@#    Parsed specification of the .msg file\n+@#  - subfolder (string)\n+@#    The subfolder / subnamespace of the message\n+@#    Either 'msg' or 'srv'\n+@#  - get_header_filename_from_msg_name (function)\n+@#######################################################################\n+@\n+@{\n+from rosidl_generator_cpp import MSG_TYPE_TO_CPP\n+\n+cpp_namespace = '%s::%s::' % (spec.base_type.pkg_name, subfolder)\n+\n+cpp_fixed_types = ['bool', 'char', 'uint8_t', 'int8_t', 'uint16_t', 'int16_t', 'uint32_t', 'int32_t', 'uint64_t', 'int64_t', 'float', 'double']\n+}@\n+#include <stdint.h>\n+#include <array>\n+#include <string>\n+#include <vector>\n+\n+#ifndef __ALL_MSG__BASIC_TEMPLATES\n+#define __ALL_MSG__BASIC_TEMPLATES\n+\n+template<typename T>\n+struct has_fixed_size {};","path":"rosidl_generator_cpp/resource/msg__traits.hpp.template","position":31,"original_position":31,"commit_id":"7506e4e3aee5641397256b59eb0b1eca3803e968","original_commit_id":"7506e4e3aee5641397256b59eb0b1eca3803e968","user":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"body":"Yes, namespacing is a good idea. `rosidl_generator_cpp_traits`? Or maybe just `rosidl_cpp_traits`?","created_at":"2015-07-22T00:27:17Z","updated_at":"2015-07-22T00:27:17Z","html_url":"https://github.com/ros2/rosidl/pull/33#discussion_r35170516","pull_request_url":"https://api.github.com/repos/ros2/rosidl/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/comments/35170516"},"html":{"href":"https://github.com/ros2/rosidl/pull/33#discussion_r35170516"},"pull_request":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/ros2/rosidl/pulls/33","id":40517544,"html_url":"https://github.com/ros2/rosidl/pull/33","diff_url":"https://github.com/ros2/rosidl/pull/33.diff","patch_url":"https://github.com/ros2/rosidl/pull/33.patch","issue_url":"https://api.github.com/repos/ros2/rosidl/issues/33","number":33,"state":"open","locked":false,"title":"Implement has_fixed_size and test","user":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"body":"This pull request adds the ability to check if a message has fixed size at compile time. It adds a test for `has_fixed_size`, enables `rosidl_generator_cpp` to register itself as a generator before installation to be used in the test, and adds several messages to be used in the test. It also demonstrates in the test that `sizeof` is sufficient to calculate the fixed size of a messages.","created_at":"2015-07-21T23:49:52Z","updated_at":"2015-07-22T00:27:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9432a07a2c420e3728370be6d8d1c8069a4a7405","assignee":{"login":"jacquelinekay","id":495933,"avatar_url":"https://avatars.githubusercontent.com/u/495933?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquelinekay","html_url":"https://github.com/jacquelinekay","followers_url":"https://api.github.com/users/jacquelinekay/followers","following_url":"https://api.github.com/users/jacquelinekay/following{/other_user}","gists_url":"https://api.github.com/users/jacquelinekay/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquelinekay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquelinekay/subscriptions","organizations_url":"https://api.github.com/users/jacquelinekay/orgs","repos_url":"https://api.github.com/users/jacquelinekay/repos","events_url":"https://api.github.com/users/jacquelinekay/events{/privacy}","received_events_url":"https://api.github.com/users/jacquelinekay/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ros2/rosidl/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ros2/rosidl/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ros2/rosidl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros2/rosidl/issues/33/comments","statuses_url":"https://api.github.com/repos/ros2/rosidl/statuses/7506e4e3aee5641397256b59eb0b1eca3803e968","head":{"label":"ros2:fixed_size","ref":"fixed_size","sha":"7506e4e3aee5641397256b59eb0b1eca3803e968","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":21748344,"name":"rosidl","full_name":"ros2/rosidl","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros2/rosidl","description":"Packages which provide the ROS IDL (.msg) definition and code generation.","fork":false,"url":"https://api.github.com/repos/ros2/rosidl","forks_url":"https://api.github.com/repos/ros2/rosidl/forks","keys_url":"https://api.github.com/repos/ros2/rosidl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rosidl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rosidl/teams","hooks_url":"https://api.github.com/repos/ros2/rosidl/hooks","issue_events_url":"https://api.github.com/repos/ros2/rosidl/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rosidl/events","assignees_url":"https://api.github.com/repos/ros2/rosidl/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rosidl/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rosidl/tags","blobs_url":"https://api.github.com/repos/ros2/rosidl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rosidl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rosidl/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rosidl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rosidl/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rosidl/languages","stargazers_url":"https://api.github.com/repos/ros2/rosidl/stargazers","contributors_url":"https://api.github.com/repos/ros2/rosidl/contributors","subscribers_url":"https://api.github.com/repos/ros2/rosidl/subscribers","subscription_url":"https://api.github.com/repos/ros2/rosidl/subscription","commits_url":"https://api.github.com/repos/ros2/rosidl/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rosidl/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rosidl/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rosidl/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rosidl/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rosidl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rosidl/merges","archive_url":"https://api.github.com/repos/ros2/rosidl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rosidl/downloads","issues_url":"https://api.github.com/repos/ros2/rosidl/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rosidl/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rosidl/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rosidl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rosidl/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rosidl/releases{/id}","created_at":"2014-07-11T19:19:18Z","updated_at":"2015-05-01T23:01:41Z","pushed_at":"2015-07-22T00:24:13Z","git_url":"git://github.com/ros2/rosidl.git","ssh_url":"git@github.com:ros2/rosidl.git","clone_url":"https://github.com/ros2/rosidl.git","svn_url":"https://github.com/ros2/rosidl","homepage":"","size":921,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"ros2:master","ref":"master","sha":"f45e9b8977d11e49003528fb90057fc53fb1cdbe","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":21748344,"name":"rosidl","full_name":"ros2/rosidl","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros2/rosidl","description":"Packages which provide the ROS IDL (.msg) definition and code generation.","fork":false,"url":"https://api.github.com/repos/ros2/rosidl","forks_url":"https://api.github.com/repos/ros2/rosidl/forks","keys_url":"https://api.github.com/repos/ros2/rosidl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rosidl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rosidl/teams","hooks_url":"https://api.github.com/repos/ros2/rosidl/hooks","issue_events_url":"https://api.github.com/repos/ros2/rosidl/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rosidl/events","assignees_url":"https://api.github.com/repos/ros2/rosidl/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rosidl/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rosidl/tags","blobs_url":"https://api.github.com/repos/ros2/rosidl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rosidl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rosidl/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rosidl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rosidl/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rosidl/languages","stargazers_url":"https://api.github.com/repos/ros2/rosidl/stargazers","contributors_url":"https://api.github.com/repos/ros2/rosidl/contributors","subscribers_url":"https://api.github.com/repos/ros2/rosidl/subscribers","subscription_url":"https://api.github.com/repos/ros2/rosidl/subscription","commits_url":"https://api.github.com/repos/ros2/rosidl/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rosidl/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rosidl/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rosidl/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rosidl/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rosidl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rosidl/merges","archive_url":"https://api.github.com/repos/ros2/rosidl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rosidl/downloads","issues_url":"https://api.github.com/repos/ros2/rosidl/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rosidl/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rosidl/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rosidl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rosidl/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rosidl/releases{/id}","created_at":"2014-07-11T19:19:18Z","updated_at":"2015-05-01T23:01:41Z","pushed_at":"2015-07-22T00:24:13Z","git_url":"git://github.com/ros2/rosidl.git","ssh_url":"git@github.com:ros2/rosidl.git","clone_url":"https://github.com/ros2/rosidl.git","svn_url":"https://github.com/ros2/rosidl","homepage":"","size":921,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/33"},"html":{"href":"https://github.com/ros2/rosidl/pull/33"},"issue":{"href":"https://api.github.com/repos/ros2/rosidl/issues/33"},"comments":{"href":"https://api.github.com/repos/ros2/rosidl/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros2/rosidl/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ros2/rosidl/statuses/7506e4e3aee5641397256b59eb0b1eca3803e968"}}}}