{"action":"opened","number":138,"pull_request":{"url":"https://api.github.com/repos/vstakhov/libucl/pulls/138","id":69176196,"html_url":"https://github.com/vstakhov/libucl/pull/138","diff_url":"https://github.com/vstakhov/libucl/pull/138.diff","patch_url":"https://github.com/vstakhov/libucl/pull/138.patch","issue_url":"https://api.github.com/repos/vstakhov/libucl/issues/138","number":138,"state":"open","locked":false,"title":"C++ interface: variable support","user":{"login":"ttti07","id":10475863,"avatar_url":"https://avatars.githubusercontent.com/u/10475863?v=3","gravatar_id":"","url":"https://api.github.com/users/ttti07","html_url":"https://github.com/ttti07","followers_url":"https://api.github.com/users/ttti07/followers","following_url":"https://api.github.com/users/ttti07/following{/other_user}","gists_url":"https://api.github.com/users/ttti07/gists{/gist_id}","starred_url":"https://api.github.com/users/ttti07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttti07/subscriptions","organizations_url":"https://api.github.com/users/ttti07/orgs","repos_url":"https://api.github.com/users/ttti07/repos","events_url":"https://api.github.com/users/ttti07/events{/privacy}","received_events_url":"https://api.github.com/users/ttti07/received_events","type":"User","site_admin":false},"body":"* User-defined variable support\r\n  - Add static member function `ucl::Ucl::find_variable(...)` as an assistant function\r\n  - Parse with variables\r\n    - Using key-value pairs (std::map)\r\n    - Or, using 'strategy' class (OOP design pattern); example inherited class is attached\r\n  - Actually, user-defined `ucl_variable_handle` function was not working properly (or, this feature was not implemented yet). I tried to fix the bug in C code, and I would be grateful if you check it.\r\n* Replace functions which have `std::istream` param, with `parse_from_file(...)` and `find_from_file(...)`\r\n  - I think getting input from a stream object (or file pointer) is not a good idea\r\n    - Class interface should provide 'core' and 'minimal' functionalities only, considering encapsulation. And istream-to-string conversion is not so difficult, for users of Ucl module.\r\n    - Those functions did not check the validity of input parameters at all. They should check it, but it could be complex job...\r\n    - Most of all, core C interface already provides the file-reading functionality. We can use `ucl_parser_add_file` function.\r\n    - C++ interface of Ucl was inspired by json11(https://github.com/dropbox/json11/blob/master/json11.hpp), but json11 does not support istream-input.\r\n  - However, changing(especially, removing) of interfaces is always not desirable. I'll respect your decision and restore the functions if needed.","created_at":"2016-05-06T16:30:54Z","updated_at":"2016-05-06T16:30:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vstakhov/libucl/pulls/138/commits","review_comments_url":"https://api.github.com/repos/vstakhov/libucl/pulls/138/comments","review_comment_url":"https://api.github.com/repos/vstakhov/libucl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vstakhov/libucl/issues/138/comments","statuses_url":"https://api.github.com/repos/vstakhov/libucl/statuses/9839c79382ef2c3842a79382e4ae45bdd545fae0","head":{"label":"ttti07:cpp_variable_support","ref":"cpp_variable_support","sha":"9839c79382ef2c3842a79382e4ae45bdd545fae0","user":{"login":"ttti07","id":10475863,"avatar_url":"https://avatars.githubusercontent.com/u/10475863?v=3","gravatar_id":"","url":"https://api.github.com/users/ttti07","html_url":"https://github.com/ttti07","followers_url":"https://api.github.com/users/ttti07/followers","following_url":"https://api.github.com/users/ttti07/following{/other_user}","gists_url":"https://api.github.com/users/ttti07/gists{/gist_id}","starred_url":"https://api.github.com/users/ttti07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttti07/subscriptions","organizations_url":"https://api.github.com/users/ttti07/orgs","repos_url":"https://api.github.com/users/ttti07/repos","events_url":"https://api.github.com/users/ttti07/events{/privacy}","received_events_url":"https://api.github.com/users/ttti07/received_events","type":"User","site_admin":false},"repo":{"id":54890891,"name":"libucl","full_name":"ttti07/libucl","owner":{"login":"ttti07","id":10475863,"avatar_url":"https://avatars.githubusercontent.com/u/10475863?v=3","gravatar_id":"","url":"https://api.github.com/users/ttti07","html_url":"https://github.com/ttti07","followers_url":"https://api.github.com/users/ttti07/followers","following_url":"https://api.github.com/users/ttti07/following{/other_user}","gists_url":"https://api.github.com/users/ttti07/gists{/gist_id}","starred_url":"https://api.github.com/users/ttti07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttti07/subscriptions","organizations_url":"https://api.github.com/users/ttti07/orgs","repos_url":"https://api.github.com/users/ttti07/repos","events_url":"https://api.github.com/users/ttti07/events{/privacy}","received_events_url":"https://api.github.com/users/ttti07/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ttti07/libucl","description":"Universal configuration library parser","fork":true,"url":"https://api.github.com/repos/ttti07/libucl","forks_url":"https://api.github.com/repos/ttti07/libucl/forks","keys_url":"https://api.github.com/repos/ttti07/libucl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ttti07/libucl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ttti07/libucl/teams","hooks_url":"https://api.github.com/repos/ttti07/libucl/hooks","issue_events_url":"https://api.github.com/repos/ttti07/libucl/issues/events{/number}","events_url":"https://api.github.com/repos/ttti07/libucl/events","assignees_url":"https://api.github.com/repos/ttti07/libucl/assignees{/user}","branches_url":"https://api.github.com/repos/ttti07/libucl/branches{/branch}","tags_url":"https://api.github.com/repos/ttti07/libucl/tags","blobs_url":"https://api.github.com/repos/ttti07/libucl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ttti07/libucl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ttti07/libucl/git/refs{/sha}","trees_url":"https://api.github.com/repos/ttti07/libucl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ttti07/libucl/statuses/{sha}","languages_url":"https://api.github.com/repos/ttti07/libucl/languages","stargazers_url":"https://api.github.com/repos/ttti07/libucl/stargazers","contributors_url":"https://api.github.com/repos/ttti07/libucl/contributors","subscribers_url":"https://api.github.com/repos/ttti07/libucl/subscribers","subscription_url":"https://api.github.com/repos/ttti07/libucl/subscription","commits_url":"https://api.github.com/repos/ttti07/libucl/commits{/sha}","git_commits_url":"https://api.github.com/repos/ttti07/libucl/git/commits{/sha}","comments_url":"https://api.github.com/repos/ttti07/libucl/comments{/number}","issue_comment_url":"https://api.github.com/repos/ttti07/libucl/issues/comments{/number}","contents_url":"https://api.github.com/repos/ttti07/libucl/contents/{+path}","compare_url":"https://api.github.com/repos/ttti07/libucl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ttti07/libucl/merges","archive_url":"https://api.github.com/repos/ttti07/libucl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ttti07/libucl/downloads","issues_url":"https://api.github.com/repos/ttti07/libucl/issues{/number}","pulls_url":"https://api.github.com/repos/ttti07/libucl/pulls{/number}","milestones_url":"https://api.github.com/repos/ttti07/libucl/milestones{/number}","notifications_url":"https://api.github.com/repos/ttti07/libucl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ttti07/libucl/labels{/name}","releases_url":"https://api.github.com/repos/ttti07/libucl/releases{/id}","deployments_url":"https://api.github.com/repos/ttti07/libucl/deployments","created_at":"2016-03-28T12:31:51Z","updated_at":"2016-03-28T12:31:52Z","pushed_at":"2016-05-06T15:43:54Z","git_url":"git://github.com/ttti07/libucl.git","ssh_url":"git@github.com:ttti07/libucl.git","clone_url":"https://github.com/ttti07/libucl.git","svn_url":"https://github.com/ttti07/libucl","homepage":null,"size":3162,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"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":"vstakhov:master","ref":"master","sha":"8dc8b443f10555f90478666a289a32638bb269b9","user":{"login":"vstakhov","id":487344,"avatar_url":"https://avatars.githubusercontent.com/u/487344?v=3","gravatar_id":"","url":"https://api.github.com/users/vstakhov","html_url":"https://github.com/vstakhov","followers_url":"https://api.github.com/users/vstakhov/followers","following_url":"https://api.github.com/users/vstakhov/following{/other_user}","gists_url":"https://api.github.com/users/vstakhov/gists{/gist_id}","starred_url":"https://api.github.com/users/vstakhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstakhov/subscriptions","organizations_url":"https://api.github.com/users/vstakhov/orgs","repos_url":"https://api.github.com/users/vstakhov/repos","events_url":"https://api.github.com/users/vstakhov/events{/privacy}","received_events_url":"https://api.github.com/users/vstakhov/received_events","type":"User","site_admin":false},"repo":{"id":13486798,"name":"libucl","full_name":"vstakhov/libucl","owner":{"login":"vstakhov","id":487344,"avatar_url":"https://avatars.githubusercontent.com/u/487344?v=3","gravatar_id":"","url":"https://api.github.com/users/vstakhov","html_url":"https://github.com/vstakhov","followers_url":"https://api.github.com/users/vstakhov/followers","following_url":"https://api.github.com/users/vstakhov/following{/other_user}","gists_url":"https://api.github.com/users/vstakhov/gists{/gist_id}","starred_url":"https://api.github.com/users/vstakhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vstakhov/subscriptions","organizations_url":"https://api.github.com/users/vstakhov/orgs","repos_url":"https://api.github.com/users/vstakhov/repos","events_url":"https://api.github.com/users/vstakhov/events{/privacy}","received_events_url":"https://api.github.com/users/vstakhov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vstakhov/libucl","description":"Universal configuration library parser","fork":false,"url":"https://api.github.com/repos/vstakhov/libucl","forks_url":"https://api.github.com/repos/vstakhov/libucl/forks","keys_url":"https://api.github.com/repos/vstakhov/libucl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vstakhov/libucl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vstakhov/libucl/teams","hooks_url":"https://api.github.com/repos/vstakhov/libucl/hooks","issue_events_url":"https://api.github.com/repos/vstakhov/libucl/issues/events{/number}","events_url":"https://api.github.com/repos/vstakhov/libucl/events","assignees_url":"https://api.github.com/repos/vstakhov/libucl/assignees{/user}","branches_url":"https://api.github.com/repos/vstakhov/libucl/branches{/branch}","tags_url":"https://api.github.com/repos/vstakhov/libucl/tags","blobs_url":"https://api.github.com/repos/vstakhov/libucl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vstakhov/libucl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vstakhov/libucl/git/refs{/sha}","trees_url":"https://api.github.com/repos/vstakhov/libucl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vstakhov/libucl/statuses/{sha}","languages_url":"https://api.github.com/repos/vstakhov/libucl/languages","stargazers_url":"https://api.github.com/repos/vstakhov/libucl/stargazers","contributors_url":"https://api.github.com/repos/vstakhov/libucl/contributors","subscribers_url":"https://api.github.com/repos/vstakhov/libucl/subscribers","subscription_url":"https://api.github.com/repos/vstakhov/libucl/subscription","commits_url":"https://api.github.com/repos/vstakhov/libucl/commits{/sha}","git_commits_url":"https://api.github.com/repos/vstakhov/libucl/git/commits{/sha}","comments_url":"https://api.github.com/repos/vstakhov/libucl/comments{/number}","issue_comment_url":"https://api.github.com/repos/vstakhov/libucl/issues/comments{/number}","contents_url":"https://api.github.com/repos/vstakhov/libucl/contents/{+path}","compare_url":"https://api.github.com/repos/vstakhov/libucl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vstakhov/libucl/merges","archive_url":"https://api.github.com/repos/vstakhov/libucl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vstakhov/libucl/downloads","issues_url":"https://api.github.com/repos/vstakhov/libucl/issues{/number}","pulls_url":"https://api.github.com/repos/vstakhov/libucl/pulls{/number}","milestones_url":"https://api.github.com/repos/vstakhov/libucl/milestones{/number}","notifications_url":"https://api.github.com/repos/vstakhov/libucl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vstakhov/libucl/labels{/name}","releases_url":"https://api.github.com/repos/vstakhov/libucl/releases{/id}","deployments_url":"https://api.github.com/repos/vstakhov/libucl/deployments","created_at":"2013-10-11T01:04:47Z","updated_at":"2016-05-03T18:18:44Z","pushed_at":"2016-04-28T21:27:54Z","git_url":"git://github.com/vstakhov/libucl.git","ssh_url":"git@github.com:vstakhov/libucl.git","clone_url":"https://github.com/vstakhov/libucl.git","svn_url":"https://github.com/vstakhov/libucl","homepage":null,"size":3459,"stargazers_count":643,"watchers_count":643,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":33,"forks":48,"open_issues":33,"watchers":643,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vstakhov/libucl/pulls/138"},"html":{"href":"https://github.com/vstakhov/libucl/pull/138"},"issue":{"href":"https://api.github.com/repos/vstakhov/libucl/issues/138"},"comments":{"href":"https://api.github.com/repos/vstakhov/libucl/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/vstakhov/libucl/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/vstakhov/libucl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vstakhov/libucl/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/vstakhov/libucl/statuses/9839c79382ef2c3842a79382e4ae45bdd545fae0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":197,"deletions":31,"changed_files":2}}