remark defaults via doxygen snippet

This commit is contained in:
Christopher Dunn
2015-02-09 18:16:24 -06:00
parent a9e1ab302d
commit 3cf9175bde
5 changed files with 49 additions and 1 deletions

View File

@@ -296,12 +296,14 @@ public:
// Note: We use a Json::Value so that we can add data-members to this class
// without a major version bump.
/** Configuration of this builder.
These are case-sensitive.
Available settings (case-sensitive):
- "collectComments": false or true (default=true)
- TODO: other features ...
But don't trust these docs. You can examine 'settings_` yourself
You can examine 'settings_` yourself
to see the defaults. You can also write and read them just like any
JSON Value.
\sa setDefaults(Json::Value*)
*/
Json::Value settings_;
@@ -316,8 +318,16 @@ public:
bool validate(Json::Value* invalid) const;
/** Called by ctor, but you can use this to reset settings_.
* \pre 'settings' != NULL (but Json::null is fine)
* \remark Defaults:
* \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
*/
static void setDefaults(Json::Value* settings);
/** Same as old Features::strictMode().
* \pre 'settings' != NULL (but Json::null is fine)
* \remark Defaults:
* \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
*/
static void strictMode(Json::Value* settings);
};
/** Consume entire stream and use its begin/end.

View File

@@ -121,6 +121,8 @@ public:
bool validate(Json::Value* invalid) const;
/** Called by ctor, but you can use this to reset settings_.
* \pre 'settings' != NULL (but Json::null is fine)
* \remark Defaults:
* \snippet src/lib_json/json_writer.cpp StreamWriterBuilderDefaults
*/
static void setDefaults(Json::Value* settings);
};