{"action":"created","comment":{"url":"https://api.github.com/repos/cellml/libcellml/pulls/comments/68508135","id":68508135,"diff_hunk":"@@ -0,0 +1,90 @@\n+/*\n+Copyright 2016 University of Auckland\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+#ifndef LIBCELLML_LIBCELLML_LOGGER_H_\n+#define LIBCELLML_LIBCELLML_LOGGER_H_\n+\n+#include <string>\n+\n+#include <libcellml/libcellml_export.h>\n+#include <libcellml/types.h>\n+#include <libcellml/loggererrors.h>\n+\n+namespace libcellml {\n+\n+/**\n+ * @brief The Logger class.\n+ *\n+ * Base class for all serialisable libCellML classes.\n+ */\n+class LIBCELLML_EXPORT Logger\n+{\n+public:\n+    Logger(); /**< Constructor */\n+    ~Logger(); /**< Destructor */\n+    Logger(const Logger &rhs); /**< Copy constructor */\n+    Logger(Logger &&rhs); /**< Move constructor */\n+    Logger& operator=(Logger rhs); /**< Assignment operator */\n+\n+    /**\n+     * @brief Clear the errors from the logger.\n+     *\n+     * Clear the errors from the logger.\n+     */\n+    void clearErrors();\n+\n+    /**\n+     * @brief Add an error to the logger.\n+     *\n+     * Adds the argument @p error to this logger.\n+     *\n+     * @param error The @c EntityErrorPtr to add.\n+     */\n+    void addError(EntityErrorPtr error);\n+\n+    /**\n+     * @brief Get the number of errors.\n+     *\n+     * Return the number of errors currently stored in the logger.\n+     *\n+     * @return The number of errors.\n+     */\n+    size_t errorCount() const;\n+\n+    /**\n+     * @brief Get error at the specified index.\n+     *\n+     * Returns a reference to an error at the index @p index.  If the  index\n+     * is not valid a @c std::out_of_range exception is thrown.\n+     *\n+     * @param index The index of the error to return (zero-based).\n+     *\n+     * @return A reference to the error at the given index.\n+     */\n+    EntityErrorPtr getError(size_t index);\n+\n+private:\n+    void swap(Logger &rhs); /**< Swap method required for C++ 11 move semantics. */\n+\n+    struct LoggerImpl; /**< Forward declaration for pImpl idiom. */\n+    LoggerImpl* mPimpl; /**< Private member to implementation pointer */","path":"src/api/libcellml/logger.h","position":83,"original_position":83,"commit_id":"8192f4e0802d484de21ddeb7a014a0babbfae658","original_commit_id":"8192f4e0802d484de21ddeb7a014a0babbfae658","user":{"login":"agarny","id":602265,"avatar_url":"https://avatars.githubusercontent.com/u/602265?v=3","gravatar_id":"","url":"https://api.github.com/users/agarny","html_url":"https://github.com/agarny","followers_url":"https://api.github.com/users/agarny/followers","following_url":"https://api.github.com/users/agarny/following{/other_user}","gists_url":"https://api.github.com/users/agarny/gists{/gist_id}","starred_url":"https://api.github.com/users/agarny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agarny/subscriptions","organizations_url":"https://api.github.com/users/agarny/orgs","repos_url":"https://api.github.com/users/agarny/repos","events_url":"https://api.github.com/users/agarny/events{/privacy}","received_events_url":"https://api.github.com/users/agarny/received_events","type":"User","site_admin":false},"body":"Nitpicking: ought to be `LoggerImpl *mPimpl` and not `LoggerImpl* mPimpl` (same elsewhere in the code).","created_at":"2016-06-26T19:30:30Z","updated_at":"2016-06-26T19:30:30Z","html_url":"https://github.com/cellml/libcellml/pull/114#discussion_r68508135","pull_request_url":"https://api.github.com/repos/cellml/libcellml/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/cellml/libcellml/pulls/comments/68508135"},"html":{"href":"https://github.com/cellml/libcellml/pull/114#discussion_r68508135"},"pull_request":{"href":"https://api.github.com/repos/cellml/libcellml/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/cellml/libcellml/pulls/114","id":72594584,"html_url":"https://github.com/cellml/libcellml/pull/114","diff_url":"https://github.com/cellml/libcellml/pull/114.diff","patch_url":"https://github.com/cellml/libcellml/pull/114.patch","issue_url":"https://api.github.com/repos/cellml/libcellml/issues/114","number":114,"state":"open","locked":false,"title":"Add tests and implementation for 'Load` (use-cases step 3)","user":{"login":"dladd","id":811296,"avatar_url":"https://avatars.githubusercontent.com/u/811296?v=3","gravatar_id":"","url":"https://api.github.com/users/dladd","html_url":"https://github.com/dladd","followers_url":"https://api.github.com/users/dladd/followers","following_url":"https://api.github.com/users/dladd/following{/other_user}","gists_url":"https://api.github.com/users/dladd/gists{/gist_id}","starred_url":"https://api.github.com/users/dladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dladd/subscriptions","organizations_url":"https://api.github.com/users/dladd/orgs","repos_url":"https://api.github.com/users/dladd/repos","events_url":"https://api.github.com/users/dladd/events{/privacy}","received_events_url":"https://api.github.com/users/dladd/received_events","type":"User","site_admin":false},"body":"This changeset contains my current work on implementation and tests for our XML parser and will address #111 upon completion. This is still work-in-progress but, with the HARMONY hackathon approaching, I figured I should get this up and a pull request started.\r\n\r\nI've gone with string handling of variable units for now but this may change pending further discussion in #111 \r\n\r\nSome things that need fixing up and/or filling out:\r\n- [x] Iterate over all attributes rather than checking for expected attributes\r\n- [x] Recursive encapsulation\r\n- [x] Conversion of all math element content to string\r\n- ~~Updating existing model content~~\r\n- ~~Parsing objects other than models~~","created_at":"2016-06-04T06:21:06Z","updated_at":"2016-06-26T19:30:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c5576d3e9e1f5f0c6cb5cf1d29f9e67b45c0fa2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cellml/libcellml/pulls/114/commits","review_comments_url":"https://api.github.com/repos/cellml/libcellml/pulls/114/comments","review_comment_url":"https://api.github.com/repos/cellml/libcellml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cellml/libcellml/issues/114/comments","statuses_url":"https://api.github.com/repos/cellml/libcellml/statuses/8192f4e0802d484de21ddeb7a014a0babbfae658","head":{"label":"dladd:load","ref":"load","sha":"8192f4e0802d484de21ddeb7a014a0babbfae658","user":{"login":"dladd","id":811296,"avatar_url":"https://avatars.githubusercontent.com/u/811296?v=3","gravatar_id":"","url":"https://api.github.com/users/dladd","html_url":"https://github.com/dladd","followers_url":"https://api.github.com/users/dladd/followers","following_url":"https://api.github.com/users/dladd/following{/other_user}","gists_url":"https://api.github.com/users/dladd/gists{/gist_id}","starred_url":"https://api.github.com/users/dladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dladd/subscriptions","organizations_url":"https://api.github.com/users/dladd/orgs","repos_url":"https://api.github.com/users/dladd/repos","events_url":"https://api.github.com/users/dladd/events{/privacy}","received_events_url":"https://api.github.com/users/dladd/received_events","type":"User","site_admin":false},"repo":{"id":52843738,"name":"libcellml","full_name":"dladd/libcellml","owner":{"login":"dladd","id":811296,"avatar_url":"https://avatars.githubusercontent.com/u/811296?v=3","gravatar_id":"","url":"https://api.github.com/users/dladd","html_url":"https://github.com/dladd","followers_url":"https://api.github.com/users/dladd/followers","following_url":"https://api.github.com/users/dladd/following{/other_user}","gists_url":"https://api.github.com/users/dladd/gists{/gist_id}","starred_url":"https://api.github.com/users/dladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dladd/subscriptions","organizations_url":"https://api.github.com/users/dladd/orgs","repos_url":"https://api.github.com/users/dladd/repos","events_url":"https://api.github.com/users/dladd/events{/privacy}","received_events_url":"https://api.github.com/users/dladd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dladd/libcellml","description":"Repository for libCellML development.","fork":true,"url":"https://api.github.com/repos/dladd/libcellml","forks_url":"https://api.github.com/repos/dladd/libcellml/forks","keys_url":"https://api.github.com/repos/dladd/libcellml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dladd/libcellml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dladd/libcellml/teams","hooks_url":"https://api.github.com/repos/dladd/libcellml/hooks","issue_events_url":"https://api.github.com/repos/dladd/libcellml/issues/events{/number}","events_url":"https://api.github.com/repos/dladd/libcellml/events","assignees_url":"https://api.github.com/repos/dladd/libcellml/assignees{/user}","branches_url":"https://api.github.com/repos/dladd/libcellml/branches{/branch}","tags_url":"https://api.github.com/repos/dladd/libcellml/tags","blobs_url":"https://api.github.com/repos/dladd/libcellml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dladd/libcellml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dladd/libcellml/git/refs{/sha}","trees_url":"https://api.github.com/repos/dladd/libcellml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dladd/libcellml/statuses/{sha}","languages_url":"https://api.github.com/repos/dladd/libcellml/languages","stargazers_url":"https://api.github.com/repos/dladd/libcellml/stargazers","contributors_url":"https://api.github.com/repos/dladd/libcellml/contributors","subscribers_url":"https://api.github.com/repos/dladd/libcellml/subscribers","subscription_url":"https://api.github.com/repos/dladd/libcellml/subscription","commits_url":"https://api.github.com/repos/dladd/libcellml/commits{/sha}","git_commits_url":"https://api.github.com/repos/dladd/libcellml/git/commits{/sha}","comments_url":"https://api.github.com/repos/dladd/libcellml/comments{/number}","issue_comment_url":"https://api.github.com/repos/dladd/libcellml/issues/comments{/number}","contents_url":"https://api.github.com/repos/dladd/libcellml/contents/{+path}","compare_url":"https://api.github.com/repos/dladd/libcellml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dladd/libcellml/merges","archive_url":"https://api.github.com/repos/dladd/libcellml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dladd/libcellml/downloads","issues_url":"https://api.github.com/repos/dladd/libcellml/issues{/number}","pulls_url":"https://api.github.com/repos/dladd/libcellml/pulls{/number}","milestones_url":"https://api.github.com/repos/dladd/libcellml/milestones{/number}","notifications_url":"https://api.github.com/repos/dladd/libcellml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dladd/libcellml/labels{/name}","releases_url":"https://api.github.com/repos/dladd/libcellml/releases{/id}","deployments_url":"https://api.github.com/repos/dladd/libcellml/deployments","created_at":"2016-03-01T03:05:05Z","updated_at":"2016-03-01T03:05:07Z","pushed_at":"2016-06-22T02:51:35Z","git_url":"git://github.com/dladd/libcellml.git","ssh_url":"git@github.com:dladd/libcellml.git","clone_url":"https://github.com/dladd/libcellml.git","svn_url":"https://github.com/dladd/libcellml","homepage":"","size":10485,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"cellml:develop","ref":"develop","sha":"a236d79c9ea0247637fb007e26613a0af3d4489a","user":{"login":"cellml","id":2141414,"avatar_url":"https://avatars.githubusercontent.com/u/2141414?v=3","gravatar_id":"","url":"https://api.github.com/users/cellml","html_url":"https://github.com/cellml","followers_url":"https://api.github.com/users/cellml/followers","following_url":"https://api.github.com/users/cellml/following{/other_user}","gists_url":"https://api.github.com/users/cellml/gists{/gist_id}","starred_url":"https://api.github.com/users/cellml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cellml/subscriptions","organizations_url":"https://api.github.com/users/cellml/orgs","repos_url":"https://api.github.com/users/cellml/repos","events_url":"https://api.github.com/users/cellml/events{/privacy}","received_events_url":"https://api.github.com/users/cellml/received_events","type":"Organization","site_admin":false},"repo":{"id":34033740,"name":"libcellml","full_name":"cellml/libcellml","owner":{"login":"cellml","id":2141414,"avatar_url":"https://avatars.githubusercontent.com/u/2141414?v=3","gravatar_id":"","url":"https://api.github.com/users/cellml","html_url":"https://github.com/cellml","followers_url":"https://api.github.com/users/cellml/followers","following_url":"https://api.github.com/users/cellml/following{/other_user}","gists_url":"https://api.github.com/users/cellml/gists{/gist_id}","starred_url":"https://api.github.com/users/cellml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cellml/subscriptions","organizations_url":"https://api.github.com/users/cellml/orgs","repos_url":"https://api.github.com/users/cellml/repos","events_url":"https://api.github.com/users/cellml/events{/privacy}","received_events_url":"https://api.github.com/users/cellml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cellml/libcellml","description":"Repository for libCellML development.","fork":false,"url":"https://api.github.com/repos/cellml/libcellml","forks_url":"https://api.github.com/repos/cellml/libcellml/forks","keys_url":"https://api.github.com/repos/cellml/libcellml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cellml/libcellml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cellml/libcellml/teams","hooks_url":"https://api.github.com/repos/cellml/libcellml/hooks","issue_events_url":"https://api.github.com/repos/cellml/libcellml/issues/events{/number}","events_url":"https://api.github.com/repos/cellml/libcellml/events","assignees_url":"https://api.github.com/repos/cellml/libcellml/assignees{/user}","branches_url":"https://api.github.com/repos/cellml/libcellml/branches{/branch}","tags_url":"https://api.github.com/repos/cellml/libcellml/tags","blobs_url":"https://api.github.com/repos/cellml/libcellml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cellml/libcellml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cellml/libcellml/git/refs{/sha}","trees_url":"https://api.github.com/repos/cellml/libcellml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cellml/libcellml/statuses/{sha}","languages_url":"https://api.github.com/repos/cellml/libcellml/languages","stargazers_url":"https://api.github.com/repos/cellml/libcellml/stargazers","contributors_url":"https://api.github.com/repos/cellml/libcellml/contributors","subscribers_url":"https://api.github.com/repos/cellml/libcellml/subscribers","subscription_url":"https://api.github.com/repos/cellml/libcellml/subscription","commits_url":"https://api.github.com/repos/cellml/libcellml/commits{/sha}","git_commits_url":"https://api.github.com/repos/cellml/libcellml/git/commits{/sha}","comments_url":"https://api.github.com/repos/cellml/libcellml/comments{/number}","issue_comment_url":"https://api.github.com/repos/cellml/libcellml/issues/comments{/number}","contents_url":"https://api.github.com/repos/cellml/libcellml/contents/{+path}","compare_url":"https://api.github.com/repos/cellml/libcellml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cellml/libcellml/merges","archive_url":"https://api.github.com/repos/cellml/libcellml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cellml/libcellml/downloads","issues_url":"https://api.github.com/repos/cellml/libcellml/issues{/number}","pulls_url":"https://api.github.com/repos/cellml/libcellml/pulls{/number}","milestones_url":"https://api.github.com/repos/cellml/libcellml/milestones{/number}","notifications_url":"https://api.github.com/repos/cellml/libcellml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cellml/libcellml/labels{/name}","releases_url":"https://api.github.com/repos/cellml/libcellml/releases{/id}","deployments_url":"https://api.github.com/repos/cellml/libcellml/deployments","created_at":"2015-04-16T04:10:34Z","updated_at":"2016-04-07T02:27:38Z","pushed_at":"2016-06-26T14:32:51Z","git_url":"git://github.com/cellml/libcellml.git","ssh_url":"git@github.com:cellml/libcellml.git","clone_url":"https://github.com/cellml/libcellml.git","svn_url":"https://github.com/cellml/libcellml","homepage":"","size":10488,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":9,"forks":4,"open_issues":9,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cellml/libcellml/pulls/114"},"html":{"href":"https://github.com/cellml/libcellml/pull/114"},"issue":{"href":"https://api.github.com/repos/cellml/libcellml/issues/114"},"comments":{"href":"https://api.github.com/repos/cellml/libcellml/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/cellml/libcellml/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/cellml/libcellml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cellml/libcellml/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/cellml/libcellml/statuses/8192f4e0802d484de21ddeb7a014a0babbfae658"}}}}
{"actor":{"display_login":"agarny"}}