History

Fix wrong syntax for JSDoc comments. For reference, this is an internal syntax defined in tools/jsdoc/plugins/hifi.js

Julian Groß committed 3 years ago

Commit 326b00c1 parent 0f158973 files · +75 −75Browse files

Showing the changes to libraries/script-engine/src/ScriptManagerScriptingInterface.h (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/ScriptManagerScriptingInterface.h+61−61
@@ -16,7 +16,7 @@ · 15 unmodified lines
1616 #include "ScriptManager.h"
1717
1818
19−/**jsdoc
19+/*@jsdoc
2020 * The <code>Script</code> API provides facilities for working with scripts.
2121 *
2222 * @namespace Script
@@ -64,7 +64,7 @@ public: · 41 unmodified lines
6464 virtual ~ScriptManagerScriptingInterface() {
6565
6666 }
67− /**jsdoc
67+ /*@jsdoc
6868 * Stops and unloads the current script.
6969 * <p><strong>Warning:</strong> If an assignment client script, the script gets restarted after stopping.</p>
7070 * @function Script.stop
@@ -83,7 +83,7 @@ public: · 12 unmodified lines
8383 // NOTE - this is intended to be a public interface for Agent scripts, and local scripts, but not for EntityScripts
8484 Q_INVOKABLE void stop(bool marshal = false) { _manager->stop(marshal); }
8585
86− /**jsdoc
86+ /*@jsdoc
8787 * Gets the context that the script is running in: Interface/avatar, client entity, server entity, or assignment client.
8888 * @function Script.getContext
8989 * @returns {string} The context that the script is running in:
@@ -97,7 +97,7 @@ public: · 7 unmodified lines
9797 Q_INVOKABLE QString getContext() const { return _manager->getContext(); }
9898
9999
100− /**jsdoc
100+ /*@jsdoc
101101 * Checks whether the script is running as an Interface or avatar script.
102102 * @function Script.isClientScript
103103 * @returns {boolean} <code>true</code> if the script is running as an Interface or avatar script, <code>false</code> if it
@@ -105,7 +105,7 @@ public: · 1 unmodified line
105105 */
106106 Q_INVOKABLE bool isClientScript() const { return _manager->isClientScript(); }
107107
108− /**jsdoc
108+ /*@jsdoc
109109 * Checks whether the application was compiled as a debug build.
110110 * @function Script.isDebugMode
111111 * @returns {boolean} <code>true</code> if the application was compiled as a debug build, <code>false</code> if it was
@@ -113,21 +113,21 @@ public: · 1 unmodified line
113113 */
114114 Q_INVOKABLE bool isDebugMode() const { return _manager->isDebugMode(); }
115115
116− /**jsdoc
116+ /*@jsdoc
117117 * Checks whether the script is running as a client entity script.
118118 * @function Script.isEntityClientScript
119119 * @returns {boolean} <code>true</code> if the script is running as a client entity script, <code>false</code> if it isn't.
120120 */
121121 Q_INVOKABLE bool isEntityClientScript() const { return _manager->isEntityClientScript(); }
122122
123− /**jsdoc
123+ /*@jsdoc
124124 * Checks whether the script is running as a server entity script.
125125 * @function Script.isEntityServerScript
126126 * @returns {boolean} <code>true</code> if the script is running as a server entity script, <code>false</code> if it isn't.
127127 */
128128 Q_INVOKABLE bool isEntityServerScript() const { return _manager->isEntityServerScript(); }
129129
130− /**jsdoc
130+ /*@jsdoc
131131 * Checks whether the script is running as an assignment client script.
132132 * @function Script.isAgentScript
133133 * @returns {boolean} <code>true</code> if the script is running as an assignment client script, <code>false</code> if it
@@ -147,7 +147,7 @@ public: · 13 unmodified lines
147147 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
148148 // NOTE - these are intended to be public interfaces available to scripts
149149
150− /**jsdoc
150+ /*@jsdoc
151151 * @function Script.formatExecption
152152 * @param {object} exception - Exception.
153153 * @param {boolean} inludeExtendeDetails - Include extended details.
@@ -156,7 +156,7 @@ public: · 2 unmodified lines
156156 */
157157 Q_INVOKABLE QString formatException(const ScriptValue& exception, bool includeExtendedDetails) { return _manager->formatException(exception, includeExtendedDetails); }
158158
159− /**jsdoc
159+ /*@jsdoc
160160 * Adds a function to the list of functions called when a particular event occurs on a particular entity.
161161 * <p>See also, the {@link Entities} API.</p>
162162 * @function Script.addEventHandler
@@ -180,7 +180,7 @@ public: · 17 unmodified lines
180180 */
181181 Q_INVOKABLE void addEventHandler(const EntityItemID& entityID, const QString& eventName, const ScriptValue& handler) { _manager->addEventHandler(entityID, eventName, handler); }
182182
183− /**jsdoc
183+ /*@jsdoc
184184 * Removes a function from the list of functions called when an entity event occurs on a particular entity.
185185 * <p>See also, the {@link Entities} API.</p>
186186 * @function Script.removeEventHandler
@@ -190,7 +190,7 @@ public: · 3 unmodified lines
190190 */
191191 Q_INVOKABLE void removeEventHandler(const EntityItemID& entityID, const QString& eventName, const ScriptValue& handler) { _manager->removeEventHandler(entityID, eventName, handler); }
192192
193− /**jsdoc
193+ /*@jsdoc
194194 * Starts running another script in Interface, if it isn't already running. The script is not automatically loaded next
195195 * time Interface starts.
196196 * <p class="availableIn"><strong>Supported Script Types:</strong> Interface Scripts &bull; Avatar Scripts</p>
@@ -212,7 +212,7 @@ public: · 15 unmodified lines
212212 */
213213 Q_INVOKABLE void load(const QString& loadfile) { _manager->load(loadfile); }
214214
215− /**jsdoc
215+ /*@jsdoc
216216 * Includes JavaScript from other files in the current script. If a callback is specified, the files are loaded and
217217 * included asynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are
218218 * included).
@@ -224,7 +224,7 @@ public: · 5 unmodified lines
224224 */
225225 Q_INVOKABLE void include(const QStringList& includeFiles, const ScriptValue& callback = ScriptValue()) { _manager->include(includeFiles, callback);};
226226
227− /**jsdoc
227+ /*@jsdoc
228228 * Includes JavaScript from another file in the current script. If a callback is specified, the file is loaded and included
229229 * asynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included).
230230 * @function Script.include
@@ -252,7 +252,7 @@ public: · 21 unmodified lines
252252 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
253253 // MODULE related methods
254254
255− /**jsdoc
255+ /*@jsdoc
256256 * Provides access to methods or objects provided in an external JavaScript or JSON file.
257257 * See {@link https://docs.overte.org/script/js-tips.html} for further details.
258258 * @function Script.require
@@ -263,14 +263,14 @@ public: · 4 unmodified lines
263263 */
264264 Q_INVOKABLE ScriptValue require(const QString& moduleId) { return _manager->require(moduleId); }
265265
266− /**jsdoc
266+ /*@jsdoc
267267 * @function Script.resetModuleCache
268268 * @param {boolean} [deleteScriptCache=false] - Delete script cache.
269269 * @deprecated This function is deprecated and will be removed.
270270 */
271271 Q_INVOKABLE void resetModuleCache(bool deleteScriptCache = false) { _manager->resetModuleCache(deleteScriptCache);}
272272
273− /**jsdoc
273+ /*@jsdoc
274274 * Calls a function repeatedly, at a set interval.
275275 * @function Script.setInterval
276276 * @param {function} function - The function to call. This can be either the name of a function or an in-line definition.
@@ -283,7 +283,7 @@ public: · 6 unmodified lines
283283 */
284284 Q_INVOKABLE QTimer* setInterval(const ScriptValue& function, int intervalMS) { return _manager->setInterval(function, intervalMS); }
285285
286− /**jsdoc
286+ /*@jsdoc
287287 * Calls a function once, after a delay.
288288 * @function Script.setTimeout
289289 * @param {function} function - The function to call. This can be either the name of a function or an in-line definition.
@@ -296,7 +296,7 @@ public: · 6 unmodified lines
296296 */
297297 Q_INVOKABLE QTimer* setTimeout(const ScriptValue& function, int timeoutMS) { return _manager->setTimeout(function, timeoutMS); };
298298
299− /**jsdoc
299+ /*@jsdoc
300300 * Stops an interval timer set by {@link Script.setInterval|setInterval}.
301301 * @function Script.clearInterval
302302 * @param {object} timer - The interval timer to stop.
@@ -317,7 +317,7 @@ public: · 14 unmodified lines
317317 // Overloaded version is needed in case the timer has expired
318318 Q_INVOKABLE void clearInterval(QVariantMap timer) { ; }
319319
320− /**jsdoc
320+ /*@jsdoc
321321 * Stops a timeout timer set by {@link Script.setTimeout|setTimeout}.
322322 * @function Script.clearTimeout
323323 * @param {object} timer - The timeout timer to stop.
@@ -335,7 +335,7 @@ public: · 11 unmodified lines
335335 // Overloaded version is needed in case the timer has expired
336336 Q_INVOKABLE void clearTimeout(QVariantMap timer) { ; }
337337
338− /**jsdoc
338+ /*@jsdoc
339339 * Prints a message to the program log and emits {@link Script.printedMessage}.
340340 * <p>Alternatively, you can use {@link print} or one of the {@link console} API methods.</p>
341341 * @function Script.print
@@ -343,7 +343,7 @@ public: · 1 unmodified line
343343 */
344344 Q_INVOKABLE void print(const QString& message) { _manager->print(message); }
345345
346− /**jsdoc
346+ /*@jsdoc
347347 * Resolves a relative path to an absolute path. The relative path is relative to the script's location.
348348 * @function Script.resolvePath
349349 * @param {string} path - The relative path to resolve.
@@ -357,14 +357,14 @@ public: · 7 unmodified lines
357357 */
358358 Q_INVOKABLE QUrl resolvePath(const QString& path) const { return _manager->resolvePath(path);}
359359
360− /**jsdoc
360+ /*@jsdoc
361361 * Gets the path to the resources directory for QML files.
362362 * @function Script.resourcesPath
363363 * @returns {string} The path to the resources directory for QML files.
364364 */
365365 Q_INVOKABLE QUrl resourcesPath() const { return _manager->resourcesPath(); }
366366
367− /**jsdoc
367+ /*@jsdoc
368368 * Starts timing a section of code in order to send usage data about it to Vircadia. Shouldn't be used outside of the
369369 * standard scripts.
370370 * @function Script.beginProfileRange
@@ -372,7 +372,7 @@ public: · 1 unmodified line
372372 */
373373 Q_INVOKABLE void beginProfileRange(const QString& label) const { _manager->beginProfileRange(label); }
374374
375− /**jsdoc
375+ /*@jsdoc
376376 * Finishes timing a section of code in order to send usage data about it to Vircadia. Shouldn't be used outside of
377377 * the standard scripts.
378378 * @function Script.endProfileRange
@@ -383,7 +383,7 @@ public: · 4 unmodified lines
383383 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
384384 // Entity Script Related methods
385385
386− /**jsdoc
386+ /*@jsdoc
387387 * Checks whether an entity has an entity script running.
388388 * @function Script.isEntityScriptRunning
389389 * @param {Uuid} entityID - The ID of the entity.
@@ -391,14 +391,14 @@ public: · 1 unmodified line
391391 */
392392 Q_INVOKABLE bool isEntityScriptRunning(const EntityItemID& entityID) { return _manager->isEntityScriptRunning(entityID); }
393393
394− /**jsdoc
394+ /*@jsdoc
395395 * Manually runs the JavaScript garbage collector which reclaims memory by disposing of objects that are no longer
396396 * reachable.
397397 * @function Script.requestGarbageCollection
398398 */
399399 Q_INVOKABLE void requestGarbageCollection() { _manager->requestGarbageCollection(); }
400400
401− /**jsdoc
401+ /*@jsdoc
402402 * Prints out current backtrace to the log.
403403 * @function Script.logBacktrace
404404 * @param {string} title - Title added to the printed out backtrace.
@@ -414,7 +414,7 @@ public: · 9 unmodified lines
414414 */
415415 Q_INVOKABLE void loadEntityScript(const EntityItemID& entityID, const QString& entityScript, bool forceRedownload) { _manager->loadEntityScript(entityID, entityScript, forceRedownload); }
416416
417− /**jsdoc
417+ /*@jsdoc
418418 * @function Script.unloadEntityScript
419419 * @param {Uuid} entityID - Entity ID.
420420 * @param {boolean} [shouldRemoveFromMap=false] - Should remove from map.
@@ -422,14 +422,14 @@ public: · 1 unmodified line
422422 */
423423 Q_INVOKABLE void unloadEntityScript(const EntityItemID& entityID, bool shouldRemoveFromMap = false) { _manager->unloadEntityScript(entityID, shouldRemoveFromMap); }
424424
425− /**jsdoc
425+ /*@jsdoc
426426 * @function Script.unloadAllEntityScripts
427427 * @param {boolean} [blockingCall=false] - Wait for completion if call moved to another thread.
428428 * @deprecated This function is deprecated and will be removed.
429429 */
430430 Q_INVOKABLE void unloadAllEntityScripts(bool blockingCall = false) { _manager->unloadAllEntityScripts(blockingCall); }
431431
432− /**jsdoc
432+ /*@jsdoc
433433 * Calls a method in an entity script.
434434 * @function Script.callEntityScriptMethod
435435 * @param {Uuid} entityID - The ID of the entity running the entity script.
@@ -441,7 +441,7 @@ public: · 5 unmodified lines
441441 const QStringList& params = QStringList(),
442442 const QUuid& remoteCallerID = QUuid()) { _manager->callEntityScriptMethod(entityID, methodName, params, remoteCallerID); }
443443
444− /**jsdoc
444+ /*@jsdoc
445445 * Calls a method in an entity script.
446446 * @function Script.callEntityScriptMethod
447447 * @param {Uuid} entityID - Entity ID.
@@ -451,7 +451,7 @@ public: · 3 unmodified lines
451451 */
452452 Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const PointerEvent& event) { _manager->callEntityScriptMethod(entityID, methodName, event); }
453453
454− /**jsdoc
454+ /*@jsdoc
455455 * Calls a method in an entity script.
456456 * @function Script.callEntityScriptMethod
457457 * @param {Uuid} entityID - Entity ID.
@@ -462,14 +462,14 @@ public: · 4 unmodified lines
462462 */
463463 Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const EntityItemID& otherID, const Collision& collision) { _manager->callEntityScriptMethod(entityID, methodName, otherID, collision);}
464464
465− /**jsdoc
465+ /*@jsdoc
466466 * @function Script.generateUUID
467467 * @returns {Uuid} A new UUID.
468468 * @deprecated This function is deprecated and will be removed. Use {@link Uuid(0).generate|Uuid.generate} instead.
469469 */
470470 Q_INVOKABLE QUuid generateUUID() { return QUuid::createUuid(); }
471471
472− /**jsdoc
472+ /*@jsdoc
473473 * Gets the URL for an asset in an external resource bucket. (The location where the bucket is hosted may change over time
474474 * but this method will return the asset's current URL.)
475475 * @function Script.getExternalPath
@@ -486,7 +486,7 @@ public: · 10 unmodified lines
486486 */
487487 Q_INVOKABLE QString getExternalPath(ExternalResource::Bucket bucket, const QString& path) { return _manager->getExternalPath(bucket, path); }
488488
489− /**jsdoc
489+ /*@jsdoc
490490 * <p>Object containing memory usage statistics data.</p>
491491 * <table>
492492 * <thead>
@@ -503,26 +503,26 @@ public: · 10 unmodified lines
503503 * @typedef {object} Script.MemoryUsageData
504504 */
505505
506− /**jsdoc
506+ /*@jsdoc
507507 * Returns memory usage statistics data.
508508 * @function Script.getMemoryUsageStatistics
509509 * @Returns {Script.MemoryUsageData} Object containing statistics about memory usage.
510510 */
511511 Q_INVOKABLE QVariantMap getMemoryUsageStatistics();
512512
513− /**jsdoc
513+ /*@jsdoc
514514 * Start collecting object statistics that can later be reported with Script.dumpHeapObjectStatistics().
515515 * @function Script.dumpHeapObjectStatistics
516516 */
517517 Q_INVOKABLE void startCollectingObjectStatistics();
518518
519− /**jsdoc
519+ /*@jsdoc
520520 * Prints heap statistics to a file. Collecting needs to first be started with Script.dumpHeapObjectStatistics().
521521 * @function Script.dumpHeapObjectStatistics
522522 */
523523 Q_INVOKABLE void dumpHeapObjectStatistics();
524524
525− /**jsdoc
525+ /*@jsdoc
526526 * Create test object for garbage collector debugging.
527527 * @function Script.createGarbageCollectorDebuggingObject()
528528 * @Returns Test object.
@@ -531,7 +531,7 @@ public: · 2 unmodified lines
531531
532532 signals:
533533
534− /**jsdoc
534+ /*@jsdoc
535535 * @function Script.scriptLoaded
536536 * @param {string} filename - File name.
537537 * @returns {Signal}
@@ -539,7 +539,7 @@ signals: · 1 unmodified line
539539 */
540540 void scriptLoaded(const QString& scriptFilename);
541541
542− /**jsdoc
542+ /*@jsdoc
543543 * @function Script.errorLoadingScript
544544 * @param {string} filename - File name.
545545 * @returns {Signal}
@@ -547,7 +547,7 @@ signals: · 1 unmodified line
547547 */
548548 void errorLoadingScript(const QString& scriptFilename);
549549
550− /**jsdoc
550+ /*@jsdoc
551551 * Triggered frequently at a system-determined interval.
552552 * @function Script.update
553553 * @param {number} deltaTime - The time since the last update, in s.
@@ -559,7 +559,7 @@ signals: · 5 unmodified lines
559559 */
560560 void update(float deltaTime);
561561
562− /**jsdoc
562+ /*@jsdoc
563563 * Triggered when the script is stopping.
564564 * @function Script.scriptEnding
565565 * @returns {Signal}
@@ -577,7 +577,7 @@ signals: · 11 unmodified lines
577577 */
578578 void scriptEnding();
579579
580− /**jsdoc
580+ /*@jsdoc
581581 * @function Script.finished
582582 * @param {string} filename - File name.
583583 * @param {object} engine - Engine.
@@ -586,7 +586,7 @@ signals: · 2 unmodified lines
586586 */
587587 void finished(const QString& fileNameString, ScriptManagerPointer);
588588
589− /**jsdoc
589+ /*@jsdoc
590590 * Triggered when the script prints a message to the program log via {@link print}, {@link Script.print},
591591 * {@link console.log}, {@link console.debug}, {@link console.group}, {@link console.groupEnd}, {@link console.time}, or
592592 * {@link console.timeEnd}.
@@ -597,7 +597,7 @@ signals: · 4 unmodified lines
597597 */
598598 void printedMessage(const QString& message, const QString& scriptName);
599599
600− /**jsdoc
600+ /*@jsdoc
601601 * Triggered when the script generates an error, {@link console.error} or {@link console.exception} is called, or
602602 * {@link console.assert} is called and fails.
603603 * @function Script.errorMessage
@@ -607,7 +607,7 @@ signals: · 3 unmodified lines
607607 */
608608 void errorMessage(const QString& message, const QString& scriptName);
609609
610− /**jsdoc
610+ /*@jsdoc
611611 * Triggered when the script generates a warning or {@link console.warn} is called.
612612 * @function Script.warningMessage
613613 * @param {string} message - The warning message.
@@ -616,7 +616,7 @@ signals: · 2 unmodified lines
616616 */
617617 void warningMessage(const QString& message, const QString& scriptName);
618618
619− /**jsdoc
619+ /*@jsdoc
620620 * Triggered when the script generates an information message or {@link console.info} is called.
621621 * @function Script.infoMessage
622622 * @param {string} message - The information message.
@@ -625,21 +625,21 @@ signals: · 2 unmodified lines
625625 */
626626 void infoMessage(const QString& message, const QString& scriptName);
627627
628− /**jsdoc
628+ /*@jsdoc
629629 * Triggered when the running state of the script changes, e.g., from running to stopping.
630630 * @function Script.runningStateChanged
631631 * @returns {Signal}
632632 */
633633 void runningStateChanged();
634634
635− /**jsdoc
635+ /*@jsdoc
636636 * @function Script.clearDebugWindow
637637 * @returns {Signal}
638638 * @deprecated This signal is deprecated and will be removed.
639639 */
640640 void clearDebugWindow();
641641
642− /**jsdoc
642+ /*@jsdoc
643643 * @function Script.loadScript
644644 * @param {string} scriptName - Script name.
645645 * @param {boolean} isUserLoaded - Is user loaded.
@@ -648,7 +648,7 @@ signals: · 2 unmodified lines
648648 */
649649 void loadScript(const QString& scriptName, bool isUserLoaded);
650650
651− /**jsdoc
651+ /*@jsdoc
652652 * @function Script.reloadScript
653653 * @param {string} scriptName - Script name.
654654 * @param {boolean} isUserLoaded - Is user loaded.
@@ -657,14 +657,14 @@ signals: · 2 unmodified lines
657657 */
658658 void reloadScript(const QString& scriptName, bool isUserLoaded);
659659
660− /**jsdoc
660+ /*@jsdoc
661661 * Triggered when the script has stopped.
662662 * @function Script.doneRunning
663663 * @returns {Signal}
664664 */
665665 void doneRunning();
666666
667− /**jsdoc
667+ /*@jsdoc
668668 * @function Script.entityScriptDetailsUpdated
669669 * @returns {Signal}
670670 * @deprecated This signal is deprecated and will be removed.
@@ -673,7 +673,7 @@ signals: · 2 unmodified lines
673673 // script is updated (goes from RUNNING to ERROR_RUNNING_SCRIPT, for example)
674674 void entityScriptDetailsUpdated();
675675
676− /**jsdoc
676+ /*@jsdoc
677677 * Triggered when the script starts for the user. See also, {@link Entities.preload}.
678678 * <p class="availableIn"><strong>Supported Script Types:</strong> Client Entity Scripts &bull; Server Entity Scripts</p>
679679 * @function Script.entityScriptPreloadFinished
@@ -701,7 +701,7 @@ signals: · 21 unmodified lines
701701 // Emitted when an entity script has finished running preload
702702 void entityScriptPreloadFinished(const EntityItemID& entityID);
703703
704− /**jsdoc
704+ /*@jsdoc
705705 * Triggered when a script generates an unhandled exception.
706706 * @function Script.unhandledException
707707 * @param {object} exception - The details of the exception.
@@ -716,7 +716,7 @@ signals: · 8 unmodified lines
716716
717717
718718 protected:
719− /**jsdoc
719+ /*@jsdoc
720720 * @function Script.executeOnScriptThread
721721 * @param {function} function - Function.
722722 * @param {ConnectionType} [type=2] - Connection type.
@@ -728,7 +728,7 @@ protected: · 5 unmodified lines
728728 //
729729 // Q_INVOKABLE void executeOnScriptThread(std::function<void()> function, const Qt::ConnectionType& type = Qt::QueuedConnection ) { _manager->executeOnScriptThread(function, type);}
730730
731− /**jsdoc
731+ /*@jsdoc
732732 * @function Script._requireResolve
733733 * @param {string} module - Module.
734734 * @param {string} [relativeTo=""] - Relative to.
@@ -739,7 +739,7 @@ protected: · 4 unmodified lines
739739 // then inside of init() we just have to do "Script.require.resolve = Script._requireResolve;"
740740 Q_INVOKABLE QString _requireResolve(const QString& moduleId, const QString& relativeTo = QString()) { return _manager->_requireResolve(moduleId, relativeTo); }
741741
742− /**jsdoc
742+ /*@jsdoc
743743 * @function Script.entityScriptContentAvailable
744744 * @param {Uuid} entityID - Entity ID.
745745 * @param {string} scriptOrURL - Path.
@@ -759,4 +759,4 @@ private slots: · 13 unmodified lines
759759 private:
760760
761761 ScriptManager *_manager;
762−};
762+};