Showing the changes to libraries/script-engine/src/ScriptManagerScriptingInterface.h (1 of 3 files). Show all
Unified · Split
| @@ -16,7 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #include "ScriptManager.h" |
| 17 | 17 | |
| 18 | 18 | |
| 19 | −/**jsdoc | |
| 19 | +/*@jsdoc | |
| 20 | 20 | * The <code>Script</code> API provides facilities for working with scripts. |
| 21 | 21 | * |
| 22 | 22 | * @namespace Script |
| @@ -64,7 +64,7 @@ public: · 41 unmodified lines | ||
| 64 | 64 | virtual ~ScriptManagerScriptingInterface() { |
| 65 | 65 | |
| 66 | 66 | } |
| 67 | − /**jsdoc | |
| 67 | + /*@jsdoc | |
| 68 | 68 | * Stops and unloads the current script. |
| 69 | 69 | * <p><strong>Warning:</strong> If an assignment client script, the script gets restarted after stopping.</p> |
| 70 | 70 | * @function Script.stop |
| @@ -83,7 +83,7 @@ public: · 12 unmodified lines | ||
| 83 | 83 | // NOTE - this is intended to be a public interface for Agent scripts, and local scripts, but not for EntityScripts |
| 84 | 84 | Q_INVOKABLE void stop(bool marshal = false) { _manager->stop(marshal); } |
| 85 | 85 | |
| 86 | − /**jsdoc | |
| 86 | + /*@jsdoc | |
| 87 | 87 | * Gets the context that the script is running in: Interface/avatar, client entity, server entity, or assignment client. |
| 88 | 88 | * @function Script.getContext |
| 89 | 89 | * @returns {string} The context that the script is running in: |
| @@ -97,7 +97,7 @@ public: · 7 unmodified lines | ||
| 97 | 97 | Q_INVOKABLE QString getContext() const { return _manager->getContext(); } |
| 98 | 98 | |
| 99 | 99 | |
| 100 | − /**jsdoc | |
| 100 | + /*@jsdoc | |
| 101 | 101 | * Checks whether the script is running as an Interface or avatar script. |
| 102 | 102 | * @function Script.isClientScript |
| 103 | 103 | * @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 | ||
| 105 | 105 | */ |
| 106 | 106 | Q_INVOKABLE bool isClientScript() const { return _manager->isClientScript(); } |
| 107 | 107 | |
| 108 | − /**jsdoc | |
| 108 | + /*@jsdoc | |
| 109 | 109 | * Checks whether the application was compiled as a debug build. |
| 110 | 110 | * @function Script.isDebugMode |
| 111 | 111 | * @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 | ||
| 113 | 113 | */ |
| 114 | 114 | Q_INVOKABLE bool isDebugMode() const { return _manager->isDebugMode(); } |
| 115 | 115 | |
| 116 | − /**jsdoc | |
| 116 | + /*@jsdoc | |
| 117 | 117 | * Checks whether the script is running as a client entity script. |
| 118 | 118 | * @function Script.isEntityClientScript |
| 119 | 119 | * @returns {boolean} <code>true</code> if the script is running as a client entity script, <code>false</code> if it isn't. |
| 120 | 120 | */ |
| 121 | 121 | Q_INVOKABLE bool isEntityClientScript() const { return _manager->isEntityClientScript(); } |
| 122 | 122 | |
| 123 | − /**jsdoc | |
| 123 | + /*@jsdoc | |
| 124 | 124 | * Checks whether the script is running as a server entity script. |
| 125 | 125 | * @function Script.isEntityServerScript |
| 126 | 126 | * @returns {boolean} <code>true</code> if the script is running as a server entity script, <code>false</code> if it isn't. |
| 127 | 127 | */ |
| 128 | 128 | Q_INVOKABLE bool isEntityServerScript() const { return _manager->isEntityServerScript(); } |
| 129 | 129 | |
| 130 | − /**jsdoc | |
| 130 | + /*@jsdoc | |
| 131 | 131 | * Checks whether the script is running as an assignment client script. |
| 132 | 132 | * @function Script.isAgentScript |
| 133 | 133 | * @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 | ||
| 147 | 147 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 148 | 148 | // NOTE - these are intended to be public interfaces available to scripts |
| 149 | 149 | |
| 150 | − /**jsdoc | |
| 150 | + /*@jsdoc | |
| 151 | 151 | * @function Script.formatExecption |
| 152 | 152 | * @param {object} exception - Exception. |
| 153 | 153 | * @param {boolean} inludeExtendeDetails - Include extended details. |
| @@ -156,7 +156,7 @@ public: · 2 unmodified lines | ||
| 156 | 156 | */ |
| 157 | 157 | Q_INVOKABLE QString formatException(const ScriptValue& exception, bool includeExtendedDetails) { return _manager->formatException(exception, includeExtendedDetails); } |
| 158 | 158 | |
| 159 | − /**jsdoc | |
| 159 | + /*@jsdoc | |
| 160 | 160 | * Adds a function to the list of functions called when a particular event occurs on a particular entity. |
| 161 | 161 | * <p>See also, the {@link Entities} API.</p> |
| 162 | 162 | * @function Script.addEventHandler |
| @@ -180,7 +180,7 @@ public: · 17 unmodified lines | ||
| 180 | 180 | */ |
| 181 | 181 | Q_INVOKABLE void addEventHandler(const EntityItemID& entityID, const QString& eventName, const ScriptValue& handler) { _manager->addEventHandler(entityID, eventName, handler); } |
| 182 | 182 | |
| 183 | − /**jsdoc | |
| 183 | + /*@jsdoc | |
| 184 | 184 | * Removes a function from the list of functions called when an entity event occurs on a particular entity. |
| 185 | 185 | * <p>See also, the {@link Entities} API.</p> |
| 186 | 186 | * @function Script.removeEventHandler |
| @@ -190,7 +190,7 @@ public: · 3 unmodified lines | ||
| 190 | 190 | */ |
| 191 | 191 | Q_INVOKABLE void removeEventHandler(const EntityItemID& entityID, const QString& eventName, const ScriptValue& handler) { _manager->removeEventHandler(entityID, eventName, handler); } |
| 192 | 192 | |
| 193 | − /**jsdoc | |
| 193 | + /*@jsdoc | |
| 194 | 194 | * Starts running another script in Interface, if it isn't already running. The script is not automatically loaded next |
| 195 | 195 | * time Interface starts. |
| 196 | 196 | * <p class="availableIn"><strong>Supported Script Types:</strong> Interface Scripts • Avatar Scripts</p> |
| @@ -212,7 +212,7 @@ public: · 15 unmodified lines | ||
| 212 | 212 | */ |
| 213 | 213 | Q_INVOKABLE void load(const QString& loadfile) { _manager->load(loadfile); } |
| 214 | 214 | |
| 215 | − /**jsdoc | |
| 215 | + /*@jsdoc | |
| 216 | 216 | * Includes JavaScript from other files in the current script. If a callback is specified, the files are loaded and |
| 217 | 217 | * included asynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are |
| 218 | 218 | * included). |
| @@ -224,7 +224,7 @@ public: · 5 unmodified lines | ||
| 224 | 224 | */ |
| 225 | 225 | Q_INVOKABLE void include(const QStringList& includeFiles, const ScriptValue& callback = ScriptValue()) { _manager->include(includeFiles, callback);}; |
| 226 | 226 | |
| 227 | − /**jsdoc | |
| 227 | + /*@jsdoc | |
| 228 | 228 | * Includes JavaScript from another file in the current script. If a callback is specified, the file is loaded and included |
| 229 | 229 | * asynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included). |
| 230 | 230 | * @function Script.include |
| @@ -252,7 +252,7 @@ public: · 21 unmodified lines | ||
| 252 | 252 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 253 | 253 | // MODULE related methods |
| 254 | 254 | |
| 255 | − /**jsdoc | |
| 255 | + /*@jsdoc | |
| 256 | 256 | * Provides access to methods or objects provided in an external JavaScript or JSON file. |
| 257 | 257 | * See {@link https://docs.overte.org/script/js-tips.html} for further details. |
| 258 | 258 | * @function Script.require |
| @@ -263,14 +263,14 @@ public: · 4 unmodified lines | ||
| 263 | 263 | */ |
| 264 | 264 | Q_INVOKABLE ScriptValue require(const QString& moduleId) { return _manager->require(moduleId); } |
| 265 | 265 | |
| 266 | − /**jsdoc | |
| 266 | + /*@jsdoc | |
| 267 | 267 | * @function Script.resetModuleCache |
| 268 | 268 | * @param {boolean} [deleteScriptCache=false] - Delete script cache. |
| 269 | 269 | * @deprecated This function is deprecated and will be removed. |
| 270 | 270 | */ |
| 271 | 271 | Q_INVOKABLE void resetModuleCache(bool deleteScriptCache = false) { _manager->resetModuleCache(deleteScriptCache);} |
| 272 | 272 | |
| 273 | − /**jsdoc | |
| 273 | + /*@jsdoc | |
| 274 | 274 | * Calls a function repeatedly, at a set interval. |
| 275 | 275 | * @function Script.setInterval |
| 276 | 276 | * @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 | ||
| 283 | 283 | */ |
| 284 | 284 | Q_INVOKABLE QTimer* setInterval(const ScriptValue& function, int intervalMS) { return _manager->setInterval(function, intervalMS); } |
| 285 | 285 | |
| 286 | − /**jsdoc | |
| 286 | + /*@jsdoc | |
| 287 | 287 | * Calls a function once, after a delay. |
| 288 | 288 | * @function Script.setTimeout |
| 289 | 289 | * @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 | ||
| 296 | 296 | */ |
| 297 | 297 | Q_INVOKABLE QTimer* setTimeout(const ScriptValue& function, int timeoutMS) { return _manager->setTimeout(function, timeoutMS); }; |
| 298 | 298 | |
| 299 | − /**jsdoc | |
| 299 | + /*@jsdoc | |
| 300 | 300 | * Stops an interval timer set by {@link Script.setInterval|setInterval}. |
| 301 | 301 | * @function Script.clearInterval |
| 302 | 302 | * @param {object} timer - The interval timer to stop. |
| @@ -317,7 +317,7 @@ public: · 14 unmodified lines | ||
| 317 | 317 | // Overloaded version is needed in case the timer has expired |
| 318 | 318 | Q_INVOKABLE void clearInterval(QVariantMap timer) { ; } |
| 319 | 319 | |
| 320 | − /**jsdoc | |
| 320 | + /*@jsdoc | |
| 321 | 321 | * Stops a timeout timer set by {@link Script.setTimeout|setTimeout}. |
| 322 | 322 | * @function Script.clearTimeout |
| 323 | 323 | * @param {object} timer - The timeout timer to stop. |
| @@ -335,7 +335,7 @@ public: · 11 unmodified lines | ||
| 335 | 335 | // Overloaded version is needed in case the timer has expired |
| 336 | 336 | Q_INVOKABLE void clearTimeout(QVariantMap timer) { ; } |
| 337 | 337 | |
| 338 | − /**jsdoc | |
| 338 | + /*@jsdoc | |
| 339 | 339 | * Prints a message to the program log and emits {@link Script.printedMessage}. |
| 340 | 340 | * <p>Alternatively, you can use {@link print} or one of the {@link console} API methods.</p> |
| 341 | 341 | * @function Script.print |
| @@ -343,7 +343,7 @@ public: · 1 unmodified line | ||
| 343 | 343 | */ |
| 344 | 344 | Q_INVOKABLE void print(const QString& message) { _manager->print(message); } |
| 345 | 345 | |
| 346 | − /**jsdoc | |
| 346 | + /*@jsdoc | |
| 347 | 347 | * Resolves a relative path to an absolute path. The relative path is relative to the script's location. |
| 348 | 348 | * @function Script.resolvePath |
| 349 | 349 | * @param {string} path - The relative path to resolve. |
| @@ -357,14 +357,14 @@ public: · 7 unmodified lines | ||
| 357 | 357 | */ |
| 358 | 358 | Q_INVOKABLE QUrl resolvePath(const QString& path) const { return _manager->resolvePath(path);} |
| 359 | 359 | |
| 360 | − /**jsdoc | |
| 360 | + /*@jsdoc | |
| 361 | 361 | * Gets the path to the resources directory for QML files. |
| 362 | 362 | * @function Script.resourcesPath |
| 363 | 363 | * @returns {string} The path to the resources directory for QML files. |
| 364 | 364 | */ |
| 365 | 365 | Q_INVOKABLE QUrl resourcesPath() const { return _manager->resourcesPath(); } |
| 366 | 366 | |
| 367 | − /**jsdoc | |
| 367 | + /*@jsdoc | |
| 368 | 368 | * Starts timing a section of code in order to send usage data about it to Vircadia. Shouldn't be used outside of the |
| 369 | 369 | * standard scripts. |
| 370 | 370 | * @function Script.beginProfileRange |
| @@ -372,7 +372,7 @@ public: · 1 unmodified line | ||
| 372 | 372 | */ |
| 373 | 373 | Q_INVOKABLE void beginProfileRange(const QString& label) const { _manager->beginProfileRange(label); } |
| 374 | 374 | |
| 375 | − /**jsdoc | |
| 375 | + /*@jsdoc | |
| 376 | 376 | * Finishes timing a section of code in order to send usage data about it to Vircadia. Shouldn't be used outside of |
| 377 | 377 | * the standard scripts. |
| 378 | 378 | * @function Script.endProfileRange |
| @@ -383,7 +383,7 @@ public: · 4 unmodified lines | ||
| 383 | 383 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 384 | 384 | // Entity Script Related methods |
| 385 | 385 | |
| 386 | − /**jsdoc | |
| 386 | + /*@jsdoc | |
| 387 | 387 | * Checks whether an entity has an entity script running. |
| 388 | 388 | * @function Script.isEntityScriptRunning |
| 389 | 389 | * @param {Uuid} entityID - The ID of the entity. |
| @@ -391,14 +391,14 @@ public: · 1 unmodified line | ||
| 391 | 391 | */ |
| 392 | 392 | Q_INVOKABLE bool isEntityScriptRunning(const EntityItemID& entityID) { return _manager->isEntityScriptRunning(entityID); } |
| 393 | 393 | |
| 394 | − /**jsdoc | |
| 394 | + /*@jsdoc | |
| 395 | 395 | * Manually runs the JavaScript garbage collector which reclaims memory by disposing of objects that are no longer |
| 396 | 396 | * reachable. |
| 397 | 397 | * @function Script.requestGarbageCollection |
| 398 | 398 | */ |
| 399 | 399 | Q_INVOKABLE void requestGarbageCollection() { _manager->requestGarbageCollection(); } |
| 400 | 400 | |
| 401 | − /**jsdoc | |
| 401 | + /*@jsdoc | |
| 402 | 402 | * Prints out current backtrace to the log. |
| 403 | 403 | * @function Script.logBacktrace |
| 404 | 404 | * @param {string} title - Title added to the printed out backtrace. |
| @@ -414,7 +414,7 @@ public: · 9 unmodified lines | ||
| 414 | 414 | */ |
| 415 | 415 | Q_INVOKABLE void loadEntityScript(const EntityItemID& entityID, const QString& entityScript, bool forceRedownload) { _manager->loadEntityScript(entityID, entityScript, forceRedownload); } |
| 416 | 416 | |
| 417 | − /**jsdoc | |
| 417 | + /*@jsdoc | |
| 418 | 418 | * @function Script.unloadEntityScript |
| 419 | 419 | * @param {Uuid} entityID - Entity ID. |
| 420 | 420 | * @param {boolean} [shouldRemoveFromMap=false] - Should remove from map. |
| @@ -422,14 +422,14 @@ public: · 1 unmodified line | ||
| 422 | 422 | */ |
| 423 | 423 | Q_INVOKABLE void unloadEntityScript(const EntityItemID& entityID, bool shouldRemoveFromMap = false) { _manager->unloadEntityScript(entityID, shouldRemoveFromMap); } |
| 424 | 424 | |
| 425 | − /**jsdoc | |
| 425 | + /*@jsdoc | |
| 426 | 426 | * @function Script.unloadAllEntityScripts |
| 427 | 427 | * @param {boolean} [blockingCall=false] - Wait for completion if call moved to another thread. |
| 428 | 428 | * @deprecated This function is deprecated and will be removed. |
| 429 | 429 | */ |
| 430 | 430 | Q_INVOKABLE void unloadAllEntityScripts(bool blockingCall = false) { _manager->unloadAllEntityScripts(blockingCall); } |
| 431 | 431 | |
| 432 | − /**jsdoc | |
| 432 | + /*@jsdoc | |
| 433 | 433 | * Calls a method in an entity script. |
| 434 | 434 | * @function Script.callEntityScriptMethod |
| 435 | 435 | * @param {Uuid} entityID - The ID of the entity running the entity script. |
| @@ -441,7 +441,7 @@ public: · 5 unmodified lines | ||
| 441 | 441 | const QStringList& params = QStringList(), |
| 442 | 442 | const QUuid& remoteCallerID = QUuid()) { _manager->callEntityScriptMethod(entityID, methodName, params, remoteCallerID); } |
| 443 | 443 | |
| 444 | − /**jsdoc | |
| 444 | + /*@jsdoc | |
| 445 | 445 | * Calls a method in an entity script. |
| 446 | 446 | * @function Script.callEntityScriptMethod |
| 447 | 447 | * @param {Uuid} entityID - Entity ID. |
| @@ -451,7 +451,7 @@ public: · 3 unmodified lines | ||
| 451 | 451 | */ |
| 452 | 452 | Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const PointerEvent& event) { _manager->callEntityScriptMethod(entityID, methodName, event); } |
| 453 | 453 | |
| 454 | − /**jsdoc | |
| 454 | + /*@jsdoc | |
| 455 | 455 | * Calls a method in an entity script. |
| 456 | 456 | * @function Script.callEntityScriptMethod |
| 457 | 457 | * @param {Uuid} entityID - Entity ID. |
| @@ -462,14 +462,14 @@ public: · 4 unmodified lines | ||
| 462 | 462 | */ |
| 463 | 463 | Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const EntityItemID& otherID, const Collision& collision) { _manager->callEntityScriptMethod(entityID, methodName, otherID, collision);} |
| 464 | 464 | |
| 465 | − /**jsdoc | |
| 465 | + /*@jsdoc | |
| 466 | 466 | * @function Script.generateUUID |
| 467 | 467 | * @returns {Uuid} A new UUID. |
| 468 | 468 | * @deprecated This function is deprecated and will be removed. Use {@link Uuid(0).generate|Uuid.generate} instead. |
| 469 | 469 | */ |
| 470 | 470 | Q_INVOKABLE QUuid generateUUID() { return QUuid::createUuid(); } |
| 471 | 471 | |
| 472 | − /**jsdoc | |
| 472 | + /*@jsdoc | |
| 473 | 473 | * Gets the URL for an asset in an external resource bucket. (The location where the bucket is hosted may change over time |
| 474 | 474 | * but this method will return the asset's current URL.) |
| 475 | 475 | * @function Script.getExternalPath |
| @@ -486,7 +486,7 @@ public: · 10 unmodified lines | ||
| 486 | 486 | */ |
| 487 | 487 | Q_INVOKABLE QString getExternalPath(ExternalResource::Bucket bucket, const QString& path) { return _manager->getExternalPath(bucket, path); } |
| 488 | 488 | |
| 489 | − /**jsdoc | |
| 489 | + /*@jsdoc | |
| 490 | 490 | * <p>Object containing memory usage statistics data.</p> |
| 491 | 491 | * <table> |
| 492 | 492 | * <thead> |
| @@ -503,26 +503,26 @@ public: · 10 unmodified lines | ||
| 503 | 503 | * @typedef {object} Script.MemoryUsageData |
| 504 | 504 | */ |
| 505 | 505 | |
| 506 | − /**jsdoc | |
| 506 | + /*@jsdoc | |
| 507 | 507 | * Returns memory usage statistics data. |
| 508 | 508 | * @function Script.getMemoryUsageStatistics |
| 509 | 509 | * @Returns {Script.MemoryUsageData} Object containing statistics about memory usage. |
| 510 | 510 | */ |
| 511 | 511 | Q_INVOKABLE QVariantMap getMemoryUsageStatistics(); |
| 512 | 512 | |
| 513 | − /**jsdoc | |
| 513 | + /*@jsdoc | |
| 514 | 514 | * Start collecting object statistics that can later be reported with Script.dumpHeapObjectStatistics(). |
| 515 | 515 | * @function Script.dumpHeapObjectStatistics |
| 516 | 516 | */ |
| 517 | 517 | Q_INVOKABLE void startCollectingObjectStatistics(); |
| 518 | 518 | |
| 519 | − /**jsdoc | |
| 519 | + /*@jsdoc | |
| 520 | 520 | * Prints heap statistics to a file. Collecting needs to first be started with Script.dumpHeapObjectStatistics(). |
| 521 | 521 | * @function Script.dumpHeapObjectStatistics |
| 522 | 522 | */ |
| 523 | 523 | Q_INVOKABLE void dumpHeapObjectStatistics(); |
| 524 | 524 | |
| 525 | − /**jsdoc | |
| 525 | + /*@jsdoc | |
| 526 | 526 | * Create test object for garbage collector debugging. |
| 527 | 527 | * @function Script.createGarbageCollectorDebuggingObject() |
| 528 | 528 | * @Returns Test object. |
| @@ -531,7 +531,7 @@ public: · 2 unmodified lines | ||
| 531 | 531 | |
| 532 | 532 | signals: |
| 533 | 533 | |
| 534 | − /**jsdoc | |
| 534 | + /*@jsdoc | |
| 535 | 535 | * @function Script.scriptLoaded |
| 536 | 536 | * @param {string} filename - File name. |
| 537 | 537 | * @returns {Signal} |
| @@ -539,7 +539,7 @@ signals: · 1 unmodified line | ||
| 539 | 539 | */ |
| 540 | 540 | void scriptLoaded(const QString& scriptFilename); |
| 541 | 541 | |
| 542 | − /**jsdoc | |
| 542 | + /*@jsdoc | |
| 543 | 543 | * @function Script.errorLoadingScript |
| 544 | 544 | * @param {string} filename - File name. |
| 545 | 545 | * @returns {Signal} |
| @@ -547,7 +547,7 @@ signals: · 1 unmodified line | ||
| 547 | 547 | */ |
| 548 | 548 | void errorLoadingScript(const QString& scriptFilename); |
| 549 | 549 | |
| 550 | − /**jsdoc | |
| 550 | + /*@jsdoc | |
| 551 | 551 | * Triggered frequently at a system-determined interval. |
| 552 | 552 | * @function Script.update |
| 553 | 553 | * @param {number} deltaTime - The time since the last update, in s. |
| @@ -559,7 +559,7 @@ signals: · 5 unmodified lines | ||
| 559 | 559 | */ |
| 560 | 560 | void update(float deltaTime); |
| 561 | 561 | |
| 562 | − /**jsdoc | |
| 562 | + /*@jsdoc | |
| 563 | 563 | * Triggered when the script is stopping. |
| 564 | 564 | * @function Script.scriptEnding |
| 565 | 565 | * @returns {Signal} |
| @@ -577,7 +577,7 @@ signals: · 11 unmodified lines | ||
| 577 | 577 | */ |
| 578 | 578 | void scriptEnding(); |
| 579 | 579 | |
| 580 | − /**jsdoc | |
| 580 | + /*@jsdoc | |
| 581 | 581 | * @function Script.finished |
| 582 | 582 | * @param {string} filename - File name. |
| 583 | 583 | * @param {object} engine - Engine. |
| @@ -586,7 +586,7 @@ signals: · 2 unmodified lines | ||
| 586 | 586 | */ |
| 587 | 587 | void finished(const QString& fileNameString, ScriptManagerPointer); |
| 588 | 588 | |
| 589 | − /**jsdoc | |
| 589 | + /*@jsdoc | |
| 590 | 590 | * Triggered when the script prints a message to the program log via {@link print}, {@link Script.print}, |
| 591 | 591 | * {@link console.log}, {@link console.debug}, {@link console.group}, {@link console.groupEnd}, {@link console.time}, or |
| 592 | 592 | * {@link console.timeEnd}. |
| @@ -597,7 +597,7 @@ signals: · 4 unmodified lines | ||
| 597 | 597 | */ |
| 598 | 598 | void printedMessage(const QString& message, const QString& scriptName); |
| 599 | 599 | |
| 600 | − /**jsdoc | |
| 600 | + /*@jsdoc | |
| 601 | 601 | * Triggered when the script generates an error, {@link console.error} or {@link console.exception} is called, or |
| 602 | 602 | * {@link console.assert} is called and fails. |
| 603 | 603 | * @function Script.errorMessage |
| @@ -607,7 +607,7 @@ signals: · 3 unmodified lines | ||
| 607 | 607 | */ |
| 608 | 608 | void errorMessage(const QString& message, const QString& scriptName); |
| 609 | 609 | |
| 610 | − /**jsdoc | |
| 610 | + /*@jsdoc | |
| 611 | 611 | * Triggered when the script generates a warning or {@link console.warn} is called. |
| 612 | 612 | * @function Script.warningMessage |
| 613 | 613 | * @param {string} message - The warning message. |
| @@ -616,7 +616,7 @@ signals: · 2 unmodified lines | ||
| 616 | 616 | */ |
| 617 | 617 | void warningMessage(const QString& message, const QString& scriptName); |
| 618 | 618 | |
| 619 | − /**jsdoc | |
| 619 | + /*@jsdoc | |
| 620 | 620 | * Triggered when the script generates an information message or {@link console.info} is called. |
| 621 | 621 | * @function Script.infoMessage |
| 622 | 622 | * @param {string} message - The information message. |
| @@ -625,21 +625,21 @@ signals: · 2 unmodified lines | ||
| 625 | 625 | */ |
| 626 | 626 | void infoMessage(const QString& message, const QString& scriptName); |
| 627 | 627 | |
| 628 | − /**jsdoc | |
| 628 | + /*@jsdoc | |
| 629 | 629 | * Triggered when the running state of the script changes, e.g., from running to stopping. |
| 630 | 630 | * @function Script.runningStateChanged |
| 631 | 631 | * @returns {Signal} |
| 632 | 632 | */ |
| 633 | 633 | void runningStateChanged(); |
| 634 | 634 | |
| 635 | − /**jsdoc | |
| 635 | + /*@jsdoc | |
| 636 | 636 | * @function Script.clearDebugWindow |
| 637 | 637 | * @returns {Signal} |
| 638 | 638 | * @deprecated This signal is deprecated and will be removed. |
| 639 | 639 | */ |
| 640 | 640 | void clearDebugWindow(); |
| 641 | 641 | |
| 642 | − /**jsdoc | |
| 642 | + /*@jsdoc | |
| 643 | 643 | * @function Script.loadScript |
| 644 | 644 | * @param {string} scriptName - Script name. |
| 645 | 645 | * @param {boolean} isUserLoaded - Is user loaded. |
| @@ -648,7 +648,7 @@ signals: · 2 unmodified lines | ||
| 648 | 648 | */ |
| 649 | 649 | void loadScript(const QString& scriptName, bool isUserLoaded); |
| 650 | 650 | |
| 651 | − /**jsdoc | |
| 651 | + /*@jsdoc | |
| 652 | 652 | * @function Script.reloadScript |
| 653 | 653 | * @param {string} scriptName - Script name. |
| 654 | 654 | * @param {boolean} isUserLoaded - Is user loaded. |
| @@ -657,14 +657,14 @@ signals: · 2 unmodified lines | ||
| 657 | 657 | */ |
| 658 | 658 | void reloadScript(const QString& scriptName, bool isUserLoaded); |
| 659 | 659 | |
| 660 | − /**jsdoc | |
| 660 | + /*@jsdoc | |
| 661 | 661 | * Triggered when the script has stopped. |
| 662 | 662 | * @function Script.doneRunning |
| 663 | 663 | * @returns {Signal} |
| 664 | 664 | */ |
| 665 | 665 | void doneRunning(); |
| 666 | 666 | |
| 667 | − /**jsdoc | |
| 667 | + /*@jsdoc | |
| 668 | 668 | * @function Script.entityScriptDetailsUpdated |
| 669 | 669 | * @returns {Signal} |
| 670 | 670 | * @deprecated This signal is deprecated and will be removed. |
| @@ -673,7 +673,7 @@ signals: · 2 unmodified lines | ||
| 673 | 673 | // script is updated (goes from RUNNING to ERROR_RUNNING_SCRIPT, for example) |
| 674 | 674 | void entityScriptDetailsUpdated(); |
| 675 | 675 | |
| 676 | − /**jsdoc | |
| 676 | + /*@jsdoc | |
| 677 | 677 | * Triggered when the script starts for the user. See also, {@link Entities.preload}. |
| 678 | 678 | * <p class="availableIn"><strong>Supported Script Types:</strong> Client Entity Scripts • Server Entity Scripts</p> |
| 679 | 679 | * @function Script.entityScriptPreloadFinished |
| @@ -701,7 +701,7 @@ signals: · 21 unmodified lines | ||
| 701 | 701 | // Emitted when an entity script has finished running preload |
| 702 | 702 | void entityScriptPreloadFinished(const EntityItemID& entityID); |
| 703 | 703 | |
| 704 | − /**jsdoc | |
| 704 | + /*@jsdoc | |
| 705 | 705 | * Triggered when a script generates an unhandled exception. |
| 706 | 706 | * @function Script.unhandledException |
| 707 | 707 | * @param {object} exception - The details of the exception. |
| @@ -716,7 +716,7 @@ signals: · 8 unmodified lines | ||
| 716 | 716 | |
| 717 | 717 | |
| 718 | 718 | protected: |
| 719 | − /**jsdoc | |
| 719 | + /*@jsdoc | |
| 720 | 720 | * @function Script.executeOnScriptThread |
| 721 | 721 | * @param {function} function - Function. |
| 722 | 722 | * @param {ConnectionType} [type=2] - Connection type. |
| @@ -728,7 +728,7 @@ protected: · 5 unmodified lines | ||
| 728 | 728 | // |
| 729 | 729 | // Q_INVOKABLE void executeOnScriptThread(std::function<void()> function, const Qt::ConnectionType& type = Qt::QueuedConnection ) { _manager->executeOnScriptThread(function, type);} |
| 730 | 730 | |
| 731 | − /**jsdoc | |
| 731 | + /*@jsdoc | |
| 732 | 732 | * @function Script._requireResolve |
| 733 | 733 | * @param {string} module - Module. |
| 734 | 734 | * @param {string} [relativeTo=""] - Relative to. |
| @@ -739,7 +739,7 @@ protected: · 4 unmodified lines | ||
| 739 | 739 | // then inside of init() we just have to do "Script.require.resolve = Script._requireResolve;" |
| 740 | 740 | Q_INVOKABLE QString _requireResolve(const QString& moduleId, const QString& relativeTo = QString()) { return _manager->_requireResolve(moduleId, relativeTo); } |
| 741 | 741 | |
| 742 | − /**jsdoc | |
| 742 | + /*@jsdoc | |
| 743 | 743 | * @function Script.entityScriptContentAvailable |
| 744 | 744 | * @param {Uuid} entityID - Entity ID. |
| 745 | 745 | * @param {string} scriptOrURL - Path. |
| @@ -759,4 +759,4 @@ private slots: · 13 unmodified lines | ||
| 759 | 759 | private: |
| 760 | 760 | |
| 761 | 761 | ScriptManager *_manager; |
| 762 | −}; | |
| 762 | +}; | |