{"action":"created","comment":{"url":"https://api.github.com/repos/quicktype/quicktype/pulls/comments/206022158","pull_request_review_id":141400556,"id":206022158,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjAyMjE1OA==","diff_hunk":"@@ -249,6 +263,92 @@ export class CPlusPlusRenderer extends ConvenienceRenderer {\n         return funPrefixNamer(\"enumerators\", makeNameStyle(this.enumeratorNamingStyle, legalizeName));\n     }\n \n+    protected makeNamesForPropertyGetterAndSetter(\n+        _c: ClassType,\n+        _className: Name,\n+        _p: ClassProperty,\n+        _jsonName: string,\n+        name: Name\n+    ): [Name, Name, Name] {\n+        const getterName = new DependencyName(this._memberNamingFunction, name.order, lookup => `get_${lookup(name)}`);\n+        const mutableGetterName = new DependencyName(this._memberNamingFunction, name.order, lookup => `getMutable_${lookup(name)}`);\n+        const setterName = new DependencyName(this._memberNamingFunction, name.order, lookup => `set_${lookup(name)}`);\n+        return [getterName, mutableGetterName, setterName];\n+    }\n+\n+    protected makePropertyDependencyNames(\n+        c: ClassType,\n+        className: Name,\n+        p: ClassProperty,\n+        jsonName: string,\n+        name: Name\n+    ): Name[] {\n+        const getterAndSetterNames = this.makeNamesForPropertyGetterAndSetter(c, className, p, jsonName, name);\n+        this._gettersAndSettersForPropertyName.set(name, getterAndSetterNames);\n+        return getterAndSetterNames;\n+    }\n+\n+    protected startFile(basename: Sourcelike): void {\n+        assert(this._currentFilename === undefined, \"Previous file wasn't finished\");\n+        if (basename !== undefined) {\n+            this._currentFilename = `${this.sourcelikeToString(basename)}`;","path":"src/quicktype-core/language/CPlusPlus.ts","position":102,"original_position":102,"commit_id":"1b60236b63e94ca4ce48aeb11d088f533301df7f","original_commit_id":"1b60236b63e94ca4ce48aeb11d088f533301df7f","user":{"login":"harsszegi","id":3242731,"node_id":"MDQ6VXNlcjMyNDI3MzE=","avatar_url":"https://avatars2.githubusercontent.com/u/3242731?v=4","gravatar_id":"","url":"https://api.github.com/users/harsszegi","html_url":"https://github.com/harsszegi","followers_url":"https://api.github.com/users/harsszegi/followers","following_url":"https://api.github.com/users/harsszegi/following{/other_user}","gists_url":"https://api.github.com/users/harsszegi/gists{/gist_id}","starred_url":"https://api.github.com/users/harsszegi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harsszegi/subscriptions","organizations_url":"https://api.github.com/users/harsszegi/orgs","repos_url":"https://api.github.com/users/harsszegi/repos","events_url":"https://api.github.com/users/harsszegi/events{/privacy}","received_events_url":"https://api.github.com/users/harsszegi/received_events","type":"User","site_admin":false},"body":"Hmm oopsie-daisy. Renderer::finishFile expects a string, however Sourcelike is not like that, i keep the string conversion for now, maybe you can tweak it later.","created_at":"2018-07-30T06:04:19Z","updated_at":"2018-07-30T06:04:19Z","html_url":"https://github.com/quicktype/quicktype/pull/987#discussion_r206022158","pull_request_url":"https://api.github.com/repos/quicktype/quicktype/pulls/987","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/quicktype/quicktype/pulls/comments/206022158"},"html":{"href":"https://github.com/quicktype/quicktype/pull/987#discussion_r206022158"},"pull_request":{"href":"https://api.github.com/repos/quicktype/quicktype/pulls/987"}},"in_reply_to_id":205983895},"pull_request":{"url":"https://api.github.com/repos/quicktype/quicktype/pulls/987","id":204650102,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjUwMTAy","html_url":"https://github.com/quicktype/quicktype/pull/987","diff_url":"https://github.com/quicktype/quicktype/pull/987.diff","patch_url":"https://github.com/quicktype/quicktype/pull/987.patch","issue_url":"https://api.github.com/repos/quicktype/quicktype/issues/987","number":987,"state":"open","locked":false,"title":"Extra C++ code generation options","user":{"login":"harsszegi","id":3242731,"node_id":"MDQ6VXNlcjMyNDI3MzE=","avatar_url":"https://avatars2.githubusercontent.com/u/3242731?v=4","gravatar_id":"","url":"https://api.github.com/users/harsszegi","html_url":"https://github.com/harsszegi","followers_url":"https://api.github.com/users/harsszegi/followers","following_url":"https://api.github.com/users/harsszegi/following{/other_user}","gists_url":"https://api.github.com/users/harsszegi/gists{/gist_id}","starred_url":"https://api.github.com/users/harsszegi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harsszegi/subscriptions","organizations_url":"https://api.github.com/users/harsszegi/orgs","repos_url":"https://api.github.com/users/harsszegi/repos","events_url":"https://api.github.com/users/harsszegi/events{/privacy}","received_events_url":"https://api.github.com/users/harsszegi/received_events","type":"User","site_admin":false},"body":"This is a set of heavy C++ code generation change, so please review is thoroughly. Test were executed, so should be backward compatible. Also includes the enum-values changes as well.\r\n\r\nAdded new code generation options for C++.\r\n\r\na.) source-style\r\n    Whether to generate the code into one file or multiple ones (one per definition)\r\nb.) with-getter-setter\r\n    If set a more C++-alike source is generated, e.g. classes instead of structs,\r\n    getters, setters for attributes, etc.\r\nc.) build-with-hunter\r\n    If set, json.hpp is included as <nlohmann/json.hpp> (just as hunter make the .hpp available during build)\r\n\r\nAlso got rid of the guard line #ifndef at the start, replaced with #pragma once (as we are targeting C++11 and above.)","created_at":"2018-07-29T16:28:54Z","updated_at":"2018-07-30T06:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9795cab7f6c472ed1b256f2ca0cf1d0cf9708da3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/quicktype/quicktype/pulls/987/commits","review_comments_url":"https://api.github.com/repos/quicktype/quicktype/pulls/987/comments","review_comment_url":"https://api.github.com/repos/quicktype/quicktype/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quicktype/quicktype/issues/987/comments","statuses_url":"https://api.github.com/repos/quicktype/quicktype/statuses/1b60236b63e94ca4ce48aeb11d088f533301df7f","head":{"label":"harsszegi:cpp_getter_setter","ref":"cpp_getter_setter","sha":"1b60236b63e94ca4ce48aeb11d088f533301df7f","user":{"login":"harsszegi","id":3242731,"node_id":"MDQ6VXNlcjMyNDI3MzE=","avatar_url":"https://avatars2.githubusercontent.com/u/3242731?v=4","gravatar_id":"","url":"https://api.github.com/users/harsszegi","html_url":"https://github.com/harsszegi","followers_url":"https://api.github.com/users/harsszegi/followers","following_url":"https://api.github.com/users/harsszegi/following{/other_user}","gists_url":"https://api.github.com/users/harsszegi/gists{/gist_id}","starred_url":"https://api.github.com/users/harsszegi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harsszegi/subscriptions","organizations_url":"https://api.github.com/users/harsszegi/orgs","repos_url":"https://api.github.com/users/harsszegi/repos","events_url":"https://api.github.com/users/harsszegi/events{/privacy}","received_events_url":"https://api.github.com/users/harsszegi/received_events","type":"User","site_admin":false},"repo":{"id":142694544,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI2OTQ1NDQ=","name":"quicktype","full_name":"harsszegi/quicktype","owner":{"login":"harsszegi","id":3242731,"node_id":"MDQ6VXNlcjMyNDI3MzE=","avatar_url":"https://avatars2.githubusercontent.com/u/3242731?v=4","gravatar_id":"","url":"https://api.github.com/users/harsszegi","html_url":"https://github.com/harsszegi","followers_url":"https://api.github.com/users/harsszegi/followers","following_url":"https://api.github.com/users/harsszegi/following{/other_user}","gists_url":"https://api.github.com/users/harsszegi/gists{/gist_id}","starred_url":"https://api.github.com/users/harsszegi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harsszegi/subscriptions","organizations_url":"https://api.github.com/users/harsszegi/orgs","repos_url":"https://api.github.com/users/harsszegi/repos","events_url":"https://api.github.com/users/harsszegi/events{/privacy}","received_events_url":"https://api.github.com/users/harsszegi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/harsszegi/quicktype","description":"Generate types and converters from JSON, Schema, and GraphQL","fork":true,"url":"https://api.github.com/repos/harsszegi/quicktype","forks_url":"https://api.github.com/repos/harsszegi/quicktype/forks","keys_url":"https://api.github.com/repos/harsszegi/quicktype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harsszegi/quicktype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harsszegi/quicktype/teams","hooks_url":"https://api.github.com/repos/harsszegi/quicktype/hooks","issue_events_url":"https://api.github.com/repos/harsszegi/quicktype/issues/events{/number}","events_url":"https://api.github.com/repos/harsszegi/quicktype/events","assignees_url":"https://api.github.com/repos/harsszegi/quicktype/assignees{/user}","branches_url":"https://api.github.com/repos/harsszegi/quicktype/branches{/branch}","tags_url":"https://api.github.com/repos/harsszegi/quicktype/tags","blobs_url":"https://api.github.com/repos/harsszegi/quicktype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harsszegi/quicktype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harsszegi/quicktype/git/refs{/sha}","trees_url":"https://api.github.com/repos/harsszegi/quicktype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harsszegi/quicktype/statuses/{sha}","languages_url":"https://api.github.com/repos/harsszegi/quicktype/languages","stargazers_url":"https://api.github.com/repos/harsszegi/quicktype/stargazers","contributors_url":"https://api.github.com/repos/harsszegi/quicktype/contributors","subscribers_url":"https://api.github.com/repos/harsszegi/quicktype/subscribers","subscription_url":"https://api.github.com/repos/harsszegi/quicktype/subscription","commits_url":"https://api.github.com/repos/harsszegi/quicktype/commits{/sha}","git_commits_url":"https://api.github.com/repos/harsszegi/quicktype/git/commits{/sha}","comments_url":"https://api.github.com/repos/harsszegi/quicktype/comments{/number}","issue_comment_url":"https://api.github.com/repos/harsszegi/quicktype/issues/comments{/number}","contents_url":"https://api.github.com/repos/harsszegi/quicktype/contents/{+path}","compare_url":"https://api.github.com/repos/harsszegi/quicktype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harsszegi/quicktype/merges","archive_url":"https://api.github.com/repos/harsszegi/quicktype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harsszegi/quicktype/downloads","issues_url":"https://api.github.com/repos/harsszegi/quicktype/issues{/number}","pulls_url":"https://api.github.com/repos/harsszegi/quicktype/pulls{/number}","milestones_url":"https://api.github.com/repos/harsszegi/quicktype/milestones{/number}","notifications_url":"https://api.github.com/repos/harsszegi/quicktype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harsszegi/quicktype/labels{/name}","releases_url":"https://api.github.com/repos/harsszegi/quicktype/releases{/id}","deployments_url":"https://api.github.com/repos/harsszegi/quicktype/deployments","created_at":"2018-07-28T16:55:22Z","updated_at":"2018-07-30T04:18:00Z","pushed_at":"2018-07-30T04:17:58Z","git_url":"git://github.com/harsszegi/quicktype.git","ssh_url":"git@github.com:harsszegi/quicktype.git","clone_url":"https://github.com/harsszegi/quicktype.git","svn_url":"https://github.com/harsszegi/quicktype","homepage":"https://quicktype.io","size":8422,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"quicktype:master","ref":"master","sha":"ce86995dc0c10c5cb6ed4db6e8a553dec8f4b3c0","user":{"login":"quicktype","id":30638520,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjM4NTIw","avatar_url":"https://avatars3.githubusercontent.com/u/30638520?v=4","gravatar_id":"","url":"https://api.github.com/users/quicktype","html_url":"https://github.com/quicktype","followers_url":"https://api.github.com/users/quicktype/followers","following_url":"https://api.github.com/users/quicktype/following{/other_user}","gists_url":"https://api.github.com/users/quicktype/gists{/gist_id}","starred_url":"https://api.github.com/users/quicktype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quicktype/subscriptions","organizations_url":"https://api.github.com/users/quicktype/orgs","repos_url":"https://api.github.com/users/quicktype/repos","events_url":"https://api.github.com/users/quicktype/events{/privacy}","received_events_url":"https://api.github.com/users/quicktype/received_events","type":"Organization","site_admin":false},"repo":{"id":97062850,"node_id":"MDEwOlJlcG9zaXRvcnk5NzA2Mjg1MA==","name":"quicktype","full_name":"quicktype/quicktype","owner":{"login":"quicktype","id":30638520,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjM4NTIw","avatar_url":"https://avatars3.githubusercontent.com/u/30638520?v=4","gravatar_id":"","url":"https://api.github.com/users/quicktype","html_url":"https://github.com/quicktype","followers_url":"https://api.github.com/users/quicktype/followers","following_url":"https://api.github.com/users/quicktype/following{/other_user}","gists_url":"https://api.github.com/users/quicktype/gists{/gist_id}","starred_url":"https://api.github.com/users/quicktype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quicktype/subscriptions","organizations_url":"https://api.github.com/users/quicktype/orgs","repos_url":"https://api.github.com/users/quicktype/repos","events_url":"https://api.github.com/users/quicktype/events{/privacy}","received_events_url":"https://api.github.com/users/quicktype/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quicktype/quicktype","description":"Generate types and converters from JSON, Schema, and GraphQL","fork":false,"url":"https://api.github.com/repos/quicktype/quicktype","forks_url":"https://api.github.com/repos/quicktype/quicktype/forks","keys_url":"https://api.github.com/repos/quicktype/quicktype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quicktype/quicktype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quicktype/quicktype/teams","hooks_url":"https://api.github.com/repos/quicktype/quicktype/hooks","issue_events_url":"https://api.github.com/repos/quicktype/quicktype/issues/events{/number}","events_url":"https://api.github.com/repos/quicktype/quicktype/events","assignees_url":"https://api.github.com/repos/quicktype/quicktype/assignees{/user}","branches_url":"https://api.github.com/repos/quicktype/quicktype/branches{/branch}","tags_url":"https://api.github.com/repos/quicktype/quicktype/tags","blobs_url":"https://api.github.com/repos/quicktype/quicktype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quicktype/quicktype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quicktype/quicktype/git/refs{/sha}","trees_url":"https://api.github.com/repos/quicktype/quicktype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quicktype/quicktype/statuses/{sha}","languages_url":"https://api.github.com/repos/quicktype/quicktype/languages","stargazers_url":"https://api.github.com/repos/quicktype/quicktype/stargazers","contributors_url":"https://api.github.com/repos/quicktype/quicktype/contributors","subscribers_url":"https://api.github.com/repos/quicktype/quicktype/subscribers","subscription_url":"https://api.github.com/repos/quicktype/quicktype/subscription","commits_url":"https://api.github.com/repos/quicktype/quicktype/commits{/sha}","git_commits_url":"https://api.github.com/repos/quicktype/quicktype/git/commits{/sha}","comments_url":"https://api.github.com/repos/quicktype/quicktype/comments{/number}","issue_comment_url":"https://api.github.com/repos/quicktype/quicktype/issues/comments{/number}","contents_url":"https://api.github.com/repos/quicktype/quicktype/contents/{+path}","compare_url":"https://api.github.com/repos/quicktype/quicktype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quicktype/quicktype/merges","archive_url":"https://api.github.com/repos/quicktype/quicktype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quicktype/quicktype/downloads","issues_url":"https://api.github.com/repos/quicktype/quicktype/issues{/number}","pulls_url":"https://api.github.com/repos/quicktype/quicktype/pulls{/number}","milestones_url":"https://api.github.com/repos/quicktype/quicktype/milestones{/number}","notifications_url":"https://api.github.com/repos/quicktype/quicktype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quicktype/quicktype/labels{/name}","releases_url":"https://api.github.com/repos/quicktype/quicktype/releases{/id}","deployments_url":"https://api.github.com/repos/quicktype/quicktype/deployments","created_at":"2017-07-13T00:22:50Z","updated_at":"2018-07-30T06:01:35Z","pushed_at":"2018-07-29T20:50:44Z","git_url":"git://github.com/quicktype/quicktype.git","ssh_url":"git@github.com:quicktype/quicktype.git","clone_url":"https://github.com/quicktype/quicktype.git","svn_url":"https://github.com/quicktype/quicktype","homepage":"https://quicktype.io","size":8380,"stargazers_count":1279,"watchers_count":1279,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":91,"mirror_url":null,"archived":false,"open_issues_count":75,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":91,"open_issues":75,"watchers":1279,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quicktype/quicktype/pulls/987"},"html":{"href":"https://github.com/quicktype/quicktype/pull/987"},"issue":{"href":"https://api.github.com/repos/quicktype/quicktype/issues/987"},"comments":{"href":"https://api.github.com/repos/quicktype/quicktype/issues/987/comments"},"review_comments":{"href":"https://api.github.com/repos/quicktype/quicktype/pulls/987/comments"},"review_comment":{"href":"https://api.github.com/repos/quicktype/quicktype/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quicktype/quicktype/pulls/987/commits"},"statuses":{"href":"https://api.github.com/repos/quicktype/quicktype/statuses/1b60236b63e94ca4ce48aeb11d088f533301df7f"}},"author_association":"NONE"}}
{"actor":{"display_login":"harsszegi"}}