GitHub PullRequestReviewCommentEvent at 2014-04-28 23:13:24
Repository: mongo-cxx-driver
Actor: acmorrow
Payload: {"comment":{"url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/comments/12073159","id":12073159,"diff_hunk":"@@ -0,0 +1,68 @@\n+/*    Copyright 2014 MongoDB Inc.\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+#pragma once\n+\n+#include <string>\n+\n+#include \"mongo/db/jsobj.h\"\n+#include \"mongo/client/export_macros.h\"\n+\n+namespace mongo {\n+    using std::string;\n+\n+    class MONGO_CLIENT_API WriteConcern {\n+    public:\n+        WriteConcern();\n+\n+        // Getter methods\n+        int w() const;\n+        const string& w_str() const;\n+        bool j() const;\n+        bool fsync() const;\n+        int timeout() const;\n+\n+        // Setter methods\n+        WriteConcern& w(int);\n+        WriteConcern& w(string);\n+        WriteConcern& j(bool);\n+        WriteConcern& fsync(bool);\n+        WriteConcern& timeout(int);\n+\n+        // Functional methods\n+        bool needs_gle() const;\n+\n+        // Conversion methods\n+        const BSONObj to_bson() const;\n+        const string to_string() const;","path":"src/mongo/client/write_concern.h","position":49,"original_position":49,"commit_id":"f99476f52102a3ce70892ec2f49af3beefc874ef","original_commit_id":"f99476f52102a3ce70892ec2f49af3beefc874ef","user":{"login":"acmorrow","id":268253,"avatar_url":"https://avatars.githubusercontent.com/u/268253?","gravatar_id":"dbfcfc0e3c4b2b0baef2383fbc97f687","url":"https://api.github.com/users/acmorrow","html_url":"https://github.com/acmorrow","followers_url":"https://api.github.com/users/acmorrow/followers","following_url":"https://api.github.com/users/acmorrow/following{/other_user}","gists_url":"https://api.github.com/users/acmorrow/gists{/gist_id}","starred_url":"https://api.github.com/users/acmorrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acmorrow/subscriptions","organizations_url":"https://api.github.com/users/acmorrow/orgs","repos_url":"https://api.github.com/users/acmorrow/repos","events_url":"https://api.github.com/users/acmorrow/events{/privacy}","received_events_url":"https://api.github.com/users/acmorrow/received_events","type":"User","site_admin":false},"body":"should be toBson and toString, and don't return const things with object semantics, it isn't meaningful, since the caller can just make a copy!","created_at":"2014-04-28T23:13:24Z","updated_at":"2014-04-28T23:13:24Z","html_url":"https://github.com/mongodb/mongo-cxx-driver/pull/67#discussion_r12073159","pull_request_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/comments/12073159"},"html":{"href":"https://github.com/mongodb/mongo-cxx-driver/pull/67#discussion_r12073159"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/67"}}}}