@@ -152,11 +152,16 @@ class Assembly
152
152
// / Create a JSON representation of the assembly.
153
153
Json::Value assemblyJSON (std::map<std::string, unsigned > const & _sourceIndices, bool _includeSourceList = true ) const ;
154
154
155
- // / Loads the JSON representation of assembly .
155
+ // / Constructs an @a Assembly from the serialized JSON representation.
156
156
// / @param _json JSON object containing assembly in the format produced by assemblyJSON().
157
- // / @param _sourceList list of source names (used to supply the source-list from the root-assembly object to sub-assemblies).
158
- // / @param _level this function might be called recursively, _level reflects the nesting level.
159
- // / @returns Resulting Assembly object loaded from given json.
157
+ // / @param _sourceList List of source files the assembly was built from. When the JSON represents
158
+ // / the root assembly, the function will read it from the 'sourceList' field and the parameter
159
+ // / must be empty. It is only used to pass the list down to recursive calls.
160
+ // / @param _level Nesting level of the current assembly in the assembly tree. The root is
161
+ // / at level 0 and the value increases down the tree. Necessary to distinguish between creation
162
+ // / and deployed objects.
163
+ // / @returns Created @a Assembly and the source list read from the 'sourceList' field of the root
164
+ // / assembly.
160
165
static std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> fromJSON (
161
166
Json::Value const & _json,
162
167
std::vector<std::string> const & _sourceList = {},
@@ -182,12 +187,12 @@ class Assembly
182
187
// / Add all assembly items from given JSON array. This function imports the items by iterating through
183
188
// / the code array. This method only works on clean Assembly objects that don't have any items defined yet.
184
189
// / @param _json JSON array that contains assembly items (e.g. json['.code'])
185
- // / @param _sourceList list of source names.
190
+ // / @param _sourceList List of source names.
186
191
void importAssemblyItemsFromJSON (Json::Value const & _code, std::vector<std::string> const & _sourceList);
187
192
188
193
// / Creates an AssemblyItem from a given JSON representation.
189
194
// / @param _json JSON object that consists a single assembly item
190
- // / @param _sourceList list of source names.
195
+ // / @param _sourceList List of source names.
191
196
// / @returns AssemblyItem of _json argument.
192
197
AssemblyItem createAssemblyItemFromJSON (Json::Value const & _json, std::vector<std::string> const & _sourceList);
193
198
0 commit comments