{"action":"created","comment":{"url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/comments/138691375","pull_request_review_id":62521263,"id":138691375,"diff_hunk":"@@ -79,20 +99,31 @@ def generate_class_header(used_classes, c):\n     \n     source.append(\"namespace godot {\")\n     source.append(\"\")\n-    \n-    \n+\n+\n     for used_type in used_classes:\n-        source.append(\"class \" + strip_name(used_type) + \";\")\n+        if is_enum(used_type) or is_nested_type(used_type, class_name):\n+            continue\n+        else:\n+            source.append(\"class \" + strip_name(used_type) + \";\")\n     \n     \n     source.append(\"\")\n     \n     \n     # generate the class definition here\n-    source.append(\"class \" + strip_name(c[\"name\"]) + (\"\" if c[\"base_class\"] == \"\" else (\" : public \" + strip_name(c[\"base_class\"])) ) + \" {\")\n+    source.append(\"class \" + class_name + (\"\" if c[\"base_class\"] == \"\" else (\" : public \" + strip_name(c[\"base_class\"])) ) + \" {\")\n     \n     source.append(\"public:\")\n     source.append(\"\")\n+\n+    for enum in c[\"enums\"]:\n+        source.append(\"\\tenum \" + strip_name(enum[\"name\"]) + \" {\")\n+        # for value in enum[\"values\"]:\n+        #     source.append(\"\\t\\t\" + value + \" = \" + str(enum[\"values\"][value]) + \",\")\n+        source.append(\"\\t};\")","path":"binding_generator.py","position":66,"original_position":66,"commit_id":"cb7e7ac376db6a784be45391a4b4be764a5730bd","original_commit_id":"cb7e7ac376db6a784be45391a4b4be764a5730bd","user":{"login":"maxim-sheronov","id":4133886,"avatar_url":"https://avatars3.githubusercontent.com/u/4133886?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-sheronov","html_url":"https://github.com/maxim-sheronov","followers_url":"https://api.github.com/users/maxim-sheronov/followers","following_url":"https://api.github.com/users/maxim-sheronov/following{/other_user}","gists_url":"https://api.github.com/users/maxim-sheronov/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-sheronov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-sheronov/subscriptions","organizations_url":"https://api.github.com/users/maxim-sheronov/orgs","repos_url":"https://api.github.com/users/maxim-sheronov/repos","events_url":"https://api.github.com/users/maxim-sheronov/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-sheronov/received_events","type":"User","site_admin":false},"body":"Now it produces compilation fail, because classes already have constants with similar names. I could add checking and if constant already exist in enum, don't write it as constant to file.","created_at":"2017-09-13T17:48:23Z","updated_at":"2017-09-13T17:48:23Z","html_url":"https://github.com/GodotNativeTools/godot-cpp/pull/33#discussion_r138691375","pull_request_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/comments/138691375"},"html":{"href":"https://github.com/GodotNativeTools/godot-cpp/pull/33#discussion_r138691375"},"pull_request":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33"}},"in_reply_to_id":138633422},"pull_request":{"url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33","id":140830973,"html_url":"https://github.com/GodotNativeTools/godot-cpp/pull/33","diff_url":"https://github.com/GodotNativeTools/godot-cpp/pull/33.diff","patch_url":"https://github.com/GodotNativeTools/godot-cpp/pull/33.patch","issue_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/33","number":33,"state":"open","locked":false,"title":"Fix bindings generation for enums","user":{"login":"maxim-sheronov","id":4133886,"avatar_url":"https://avatars3.githubusercontent.com/u/4133886?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-sheronov","html_url":"https://github.com/maxim-sheronov","followers_url":"https://api.github.com/users/maxim-sheronov/followers","following_url":"https://api.github.com/users/maxim-sheronov/following{/other_user}","gists_url":"https://api.github.com/users/maxim-sheronov/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-sheronov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-sheronov/subscriptions","organizations_url":"https://api.github.com/users/maxim-sheronov/orgs","repos_url":"https://api.github.com/users/maxim-sheronov/repos","events_url":"https://api.github.com/users/maxim-sheronov/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-sheronov/received_events","type":"User","site_admin":false},"body":"There is fix for #31 \r\nBut it will work only after merging a PR in godot engine","created_at":"2017-09-13T13:50:50Z","updated_at":"2017-09-13T17:48:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f04eb640f1b8b28914299f51380332ce058db8ff","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33/commits","review_comments_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33/comments","review_comment_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/33/comments","statuses_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/statuses/cb7e7ac376db6a784be45391a4b4be764a5730bd","head":{"label":"maxim-sheronov:fix_binding_generation_for_enums","ref":"fix_binding_generation_for_enums","sha":"cb7e7ac376db6a784be45391a4b4be764a5730bd","user":{"login":"maxim-sheronov","id":4133886,"avatar_url":"https://avatars3.githubusercontent.com/u/4133886?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-sheronov","html_url":"https://github.com/maxim-sheronov","followers_url":"https://api.github.com/users/maxim-sheronov/followers","following_url":"https://api.github.com/users/maxim-sheronov/following{/other_user}","gists_url":"https://api.github.com/users/maxim-sheronov/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-sheronov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-sheronov/subscriptions","organizations_url":"https://api.github.com/users/maxim-sheronov/orgs","repos_url":"https://api.github.com/users/maxim-sheronov/repos","events_url":"https://api.github.com/users/maxim-sheronov/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-sheronov/received_events","type":"User","site_admin":false},"repo":{"id":103179238,"name":"godot-cpp","full_name":"maxim-sheronov/godot-cpp","owner":{"login":"maxim-sheronov","id":4133886,"avatar_url":"https://avatars3.githubusercontent.com/u/4133886?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-sheronov","html_url":"https://github.com/maxim-sheronov","followers_url":"https://api.github.com/users/maxim-sheronov/followers","following_url":"https://api.github.com/users/maxim-sheronov/following{/other_user}","gists_url":"https://api.github.com/users/maxim-sheronov/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-sheronov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-sheronov/subscriptions","organizations_url":"https://api.github.com/users/maxim-sheronov/orgs","repos_url":"https://api.github.com/users/maxim-sheronov/repos","events_url":"https://api.github.com/users/maxim-sheronov/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-sheronov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxim-sheronov/godot-cpp","description":"C++ bindings for the Godot script API","fork":true,"url":"https://api.github.com/repos/maxim-sheronov/godot-cpp","forks_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/forks","keys_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/teams","hooks_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/hooks","issue_events_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/events","assignees_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/tags","blobs_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/languages","stargazers_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/stargazers","contributors_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/contributors","subscribers_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/subscribers","subscription_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/subscription","commits_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/merges","archive_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/downloads","issues_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/labels{/name}","releases_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/maxim-sheronov/godot-cpp/deployments","created_at":"2017-09-11T19:33:20Z","updated_at":"2017-09-11T19:33:22Z","pushed_at":"2017-09-13T13:48:31Z","git_url":"git://github.com/maxim-sheronov/godot-cpp.git","ssh_url":"git@github.com:maxim-sheronov/godot-cpp.git","clone_url":"https://github.com/maxim-sheronov/godot-cpp.git","svn_url":"https://github.com/maxim-sheronov/godot-cpp","homepage":null,"size":1821,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GodotNativeTools:master","ref":"master","sha":"cb5b80d4211cce30619d8e096b558bbb6a9da49b","user":{"login":"GodotNativeTools","id":26149847,"avatar_url":"https://avatars0.githubusercontent.com/u/26149847?v=4","gravatar_id":"","url":"https://api.github.com/users/GodotNativeTools","html_url":"https://github.com/GodotNativeTools","followers_url":"https://api.github.com/users/GodotNativeTools/followers","following_url":"https://api.github.com/users/GodotNativeTools/following{/other_user}","gists_url":"https://api.github.com/users/GodotNativeTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GodotNativeTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GodotNativeTools/subscriptions","organizations_url":"https://api.github.com/users/GodotNativeTools/orgs","repos_url":"https://api.github.com/users/GodotNativeTools/repos","events_url":"https://api.github.com/users/GodotNativeTools/events{/privacy}","received_events_url":"https://api.github.com/users/GodotNativeTools/received_events","type":"Organization","site_admin":false},"repo":{"id":83732863,"name":"godot-cpp","full_name":"GodotNativeTools/godot-cpp","owner":{"login":"GodotNativeTools","id":26149847,"avatar_url":"https://avatars0.githubusercontent.com/u/26149847?v=4","gravatar_id":"","url":"https://api.github.com/users/GodotNativeTools","html_url":"https://github.com/GodotNativeTools","followers_url":"https://api.github.com/users/GodotNativeTools/followers","following_url":"https://api.github.com/users/GodotNativeTools/following{/other_user}","gists_url":"https://api.github.com/users/GodotNativeTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GodotNativeTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GodotNativeTools/subscriptions","organizations_url":"https://api.github.com/users/GodotNativeTools/orgs","repos_url":"https://api.github.com/users/GodotNativeTools/repos","events_url":"https://api.github.com/users/GodotNativeTools/events{/privacy}","received_events_url":"https://api.github.com/users/GodotNativeTools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GodotNativeTools/godot-cpp","description":"C++ bindings for the Godot script API","fork":false,"url":"https://api.github.com/repos/GodotNativeTools/godot-cpp","forks_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/forks","keys_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/teams","hooks_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/hooks","issue_events_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/events","assignees_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/tags","blobs_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/languages","stargazers_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/stargazers","contributors_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/contributors","subscribers_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/subscribers","subscription_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/subscription","commits_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/merges","archive_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/downloads","issues_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/labels{/name}","releases_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/deployments","created_at":"2017-03-02T22:50:13Z","updated_at":"2017-08-27T19:18:58Z","pushed_at":"2017-09-13T13:50:51Z","git_url":"git://github.com/GodotNativeTools/godot-cpp.git","ssh_url":"git@github.com:GodotNativeTools/godot-cpp.git","clone_url":"https://github.com/GodotNativeTools/godot-cpp.git","svn_url":"https://github.com/GodotNativeTools/godot-cpp","homepage":null,"size":1820,"stargazers_count":23,"watchers_count":23,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":6,"forks":7,"open_issues":6,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33"},"html":{"href":"https://github.com/GodotNativeTools/godot-cpp/pull/33"},"issue":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/33"},"comments":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/GodotNativeTools/godot-cpp/statuses/cb7e7ac376db6a784be45391a4b4be764a5730bd"}},"author_association":"NONE"}}
{"actor":{"display_login":"maxim-sheronov"}}