File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,6 +166,13 @@ namespace Json {
166166#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
167167
168168 public:
169+ /* * \brief Create a default Value of the given type.
170+ This is a very useful constructor.
171+ To create an empty array, pass arrayValue.
172+ To create an empty object, pass objectValue.
173+ Another Value can then be set to this one by assignment.
174+ This is useful since clear() and resize() will not alter types.
175+ */
169176 Value ( ValueType type = nullValue );
170177 Value ( Int value );
171178 Value ( UInt value );
@@ -230,11 +237,15 @@ namespace Json {
230237 UInt size () const ;
231238
232239 // / Removes all object members and array elements.
240+ // / @pre type() is arrayValue, objectValue, or nullValue
241+ // / @post type() is unchanged
233242 void clear ();
234243
235244 // / Resize the array to size elements.
236245 // / New elements are initialized to null.
237246 // / May only be called on nullValue or arrayValue.
247+ // / @pre type() is arrayValue or nullValue
248+ // / @post type() is arrayValue
238249 void resize ( UInt size );
239250
240251 // / Access an array element (zero based index ).
You can’t perform that action at this time.
0 commit comments