diff --git a/interface/src/ui/overlays/Overlays.h b/interface/src/ui/overlays/Overlays.h index 0b2994b872..6eaf481efe 100644 --- a/interface/src/ui/overlays/Overlays.h +++ b/interface/src/ui/overlays/Overlays.h @@ -77,7 +77,7 @@ public: * @hifi-avatar * * @property {Uuid} keyboardFocusOverlay - Get or set the {@link Entities.EntityTypes|Web} entity that has keyboard focus. - * If no entity has keyboard focus, get returns null; set to null or {@link Uuid|Uuid.NULL} to + * If no entity has keyboard focus, get returns null; set to null or {@link Uuid(0)|Uuid.NULL} to * clear keyboard focus. */ @@ -122,7 +122,7 @@ public slots: * @function Overlays.addOverlay * @param {Overlays.OverlayType} type - The type of the overlay to add. * @param {Overlays.OverlayProperties} properties - The properties of the overlay to add. - * @returns {Uuid} The ID of the newly created overlay if successful, otherwise {@link Uuid|Uuid.NULL}. + * @returns {Uuid} The ID of the newly created overlay if successful, otherwise {@link Uuid(0)|Uuid.NULL}. * @example Add a cube overlay in front of your avatar. * var overlay = Overlays.addOverlay("cube", { * position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })), @@ -137,7 +137,7 @@ public slots: * Create a clone of an existing entity (or 2D overlay). * @function Overlays.cloneOverlay * @param {Uuid} id - The ID of the entity/2D overlay to clone. - * @returns {Uuid} The ID of the new object if successful, otherwise {@link Uuid|Uuid.NULL}. + * @returns {Uuid} The ID of the new object if successful, otherwise {@link Uuid(0)|Uuid.NULL}. */ QUuid cloneOverlay(const QUuid& id); @@ -562,7 +562,7 @@ public slots: * Set the Web3D entity that has keyboard focus. * @function Overlays.setKeyboardFocusOverlay * @param {Uuid} id - The ID of the {@link Entities.EntityTypes|Web} entity to set keyboard focus to. Use - * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an overlay. + * null or {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an overlay. */ void setKeyboardFocusOverlay(const QUuid& id) { DependencyManager::get()->setKeyboardFocusEntity(id); } diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h index adafca1d1f..ee0fb6f433 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.h +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.h @@ -441,7 +441,7 @@ public: /**jsdoc * Gets the ID of the entity of avatar that the avatar is parented to. * @function MyAvatar.getParentID - * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid|Uuid.NULL} if not parented. + * @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented. */ // This calls through to the SpatiallyNestable versions, but is here to expose these to JavaScript. Q_INVOKABLE virtual const QUuid getParentID() const override { return SpatiallyNestable::getParentID(); } @@ -450,7 +450,7 @@ public: * Sets the ID of the entity of avatar that the avatar is parented to. * @function MyAvatar.setParentID * @param {Uuid} parentID - The ID of the entity or avatar that the avatar should be parented to. Set to - * {@link Uuid|Uuid.NULL} to unparent. + * {@link Uuid(0)|Uuid.NULL} to unparent. */ // This calls through to the SpatiallyNestable versions, but is here to expose these to JavaScript. Q_INVOKABLE virtual void setParentID(const QUuid& parentID) override; diff --git a/libraries/controllers/src/controllers/ScriptingInterface.h b/libraries/controllers/src/controllers/ScriptingInterface.h index 84396fc8be..6a9a5c9dbb 100644 --- a/libraries/controllers/src/controllers/ScriptingInterface.h +++ b/libraries/controllers/src/controllers/ScriptingInterface.h @@ -263,7 +263,7 @@ namespace controller { * methods. The mapping can then be enabled using {@link Controller.enableMapping|enableMapping} for it to take effect. * @function Controller.newMapping * @param {string} [mappingName=Uuid.generate()] - A unique name for the mapping. If not specified a new UUID generated - * by {@link Uuid.generate} is used. + * by {@link Uuid(0).generate} is used. * @returns {MappingObject} A controller mapping object. * @example Create a simple mapping that makes the right trigger move your avatar up. * var MAPPING_NAME = "com.highfidelity.controllers.example.newMapping"; diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index e5205e86e8..805eabc877 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -630,7 +630,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const { * The value can only be set at entity creation by using the entityHostType parameter in * {@link Entities.addEntity}. Read-only. * @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if avatarEntity is - * true, otherwise {@link Uuid|Uuid.NULL}. Read-only. + * true, otherwise {@link Uuid(0)|Uuid.NULL}. Read-only. * * @property {string} created - The UTC date and time that the entity was created, in ISO 8601 format as * yyyy-MM-ddTHH:mm:ssZ. Read-only. @@ -728,7 +728,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const { * button beside the "script URL" field in properties tab of the Create app works. * @property {string} serverScripts="" - The URL of the server entity script, if any, that is attached to the entity. * - * @property {Uuid} parentID=Uuid.NULL - The ID of the entity or avatar that this entity is parented to. {@link Uuid|Uuid.NULL} + * @property {Uuid} parentID=Uuid.NULL - The ID of the entity or avatar that this entity is parented to. {@link Uuid(0)|Uuid.NULL} * if the entity is not parented. * @property {number} parentJointIndex=65535 - The joint of the entity or avatar that this entity is parented to. Use * 65535 or -1 to parent to the entity or avatar's position and orientation rather than a joint. @@ -1174,17 +1174,17 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const { * @property {string} zTextureURL="" - URL of the texture to map to surfaces perpendicular to the entity's local z-axis. JPG or * PNG format. If no texture is specified the surfaces display white. * @property {Uuid} xNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve local x-axis direction, - * if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them. + * if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * @property {Uuid} yNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve local y-axis direction, - * if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them. + * if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * @property {Uuid} zNNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's -ve local z-axis direction, - * if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them. + * if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * @property {Uuid} xPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve local x-axis direction, - * if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them. + * if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * @property {Uuid} yPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve local y-axis direction, - * if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them. + * if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * @property {Uuid} zPNeighborID=Uuid.NULL - ID of the neighboring PolyVox entity in the entity's +ve local z-axis direction, - * if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them. + * if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * @example Create a textured PolyVox sphere. * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })); * var texture = "http://public.highfidelity.com/cozza13/tuscany/Concrete2.jpg"; diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index 39700bfc31..c3b0371029 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -114,7 +114,7 @@ public: * @hifi-assignment-client * * @property {Uuid} keyboardFocusEntity - Get or set the {@link Entities.EntityType|Web} entity that has keyboard focus. - * If no entity has keyboard focus, get returns null; set to null or {@link Uuid|Uuid.NULL} to + * If no entity has keyboard focus, get returns null; set to null or {@link Uuid(0)|Uuid.NULL} to * clear keyboard focus. */ /// handles scripting of Entity commands from JS passed to assigned clients @@ -267,7 +267,7 @@ public slots: * follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. * If "local", the entity is created as a local entity, which will only render for you and isn't sent over the wire. * Otherwise it is created as a normal entity and sent over the entity server. - * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid|Uuid.NULL}. + * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NULL}. * @example Create a box entity in front of your avatar. * var entityID = Entities.addEntity({ * type: "Box", @@ -294,7 +294,7 @@ public slots: * @function Entities.addEntity * @param {Entities.EntityProperties} properties - The properties of the entity to create. * @param {boolean} [avatarEntity=false] - Whether to create an avatar entity or a domain entity - * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid|Uuid.NULL}. + * @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NULL}. */ Q_INVOKABLE QUuid addEntity(const EntityItemProperties& properties, bool avatarEntity = false) { entity::HostType entityHostType = avatarEntity ? entity::HostType::AVATAR : entity::HostType::DOMAIN; @@ -312,7 +312,7 @@ public slots: * properties set per its clone related-properties, and its clone-related properties are set to defaults. * @function Entities.cloneEntity * @param {Uuid} entityID - The ID of the entity to clone. - * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid|Uuid.NULL}. + * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid(0)|Uuid.NULL}. */ Q_INVOKABLE QUuid cloneEntity(const QUuid& entityID); @@ -1446,7 +1446,7 @@ public slots: * Set the {@link Entities.EntityType|Web} entity that has keyboard focus. * @function Entities.setKeyboardFocusEntity * @param {Uuid} id - The ID of the {@link Entities.EntityType|Web} entity to set keyboard focus to. Use - * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an entity. + * null or {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an entity. */ Q_INVOKABLE void setKeyboardFocusEntity(const QUuid& id); diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 3cf5637c5f..8187c23f71 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -46,7 +46,7 @@ const QString GET_PLACE = "/api/v1/places/%1"; * @hifi-avatar * @hifi-assignment-client * - * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid|Uuid.NULL} if you're not + * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not * connected to the domain or are in a serverless domain. * Read-only. * @property {string} hostname - The name of the domain for your current metaverse address (e.g., "AvatarIsland", diff --git a/libraries/script-engine/src/ScriptEngine.h b/libraries/script-engine/src/ScriptEngine.h index e58609f01d..a2b16ed178 100644 --- a/libraries/script-engine/src/ScriptEngine.h +++ b/libraries/script-engine/src/ScriptEngine.h @@ -623,7 +623,7 @@ public: /**jsdoc * @function Script.generateUUID * @returns {Uuid} A new UUID. - * @deprecated This function is deprecated and will be removed. Use {@link Uuid.generate} instead. + * @deprecated This function is deprecated and will be removed. Use {@link Uuid(0).generate|Uuid.generate} instead. */ Q_INVOKABLE QUuid generateUUID() { return QUuid::createUuid(); } diff --git a/libraries/script-engine/src/ScriptUUID.h b/libraries/script-engine/src/ScriptUUID.h index 548bc6a6c8..4f0dfd10b6 100644 --- a/libraries/script-engine/src/ScriptUUID.h +++ b/libraries/script-engine/src/ScriptUUID.h @@ -19,11 +19,10 @@ #include /**jsdoc - * A UUID (Universally Unique IDentifier) is used to uniquely identify entities, avatars, and the like. It is - * represented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the "n"s are - * hexadecimal digits. + * The Uuid API provides facilities for working with UUIDs. * * @namespace Uuid + * @variation 0 * * @hifi-interface * @hifi-client-entity @@ -42,7 +41,7 @@ class ScriptUUID : public QObject, protected QScriptable { public slots: /**jsdoc * Generates a UUID from a string representation of the UUID. - * @function Uuid.fromString + * @function Uuid(0).fromString * @param {string} string - A string representation of a UUID. The curly braces are optional. * @returns {Uuid} A UUID if the given string is valid, null otherwise. * @example Valid and invalid parameters. @@ -60,7 +59,7 @@ public slots: /**jsdoc * Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in * effect a no-op. - * @function Uuid.toString + * @function Uuid(0).toString * @param {Uuid} id - The UUID to generate a string from. * @returns {string} - A string representation of the UUID. */ @@ -68,7 +67,7 @@ public slots: /**jsdoc * Generate a new UUID. - * @function Uuid.generate + * @function Uuid(0).generate * @returns {Uuid} A new UUID. * @example Generate a new UUID and reports its JavaScript type. * var uuid = Uuid.generate(); @@ -79,7 +78,7 @@ public slots: /**jsdoc * Test whether two given UUIDs are equal. - * @function Uuid.isEqual + * @function Uuid(0).isEqual * @param {Uuid} idA - The first UUID to compare. * @param {Uuid} idB - The second UUID to compare. * @returns {boolean} true if the two UUIDs are equal, otherwise false. @@ -94,7 +93,7 @@ public slots: /**jsdoc * Test whether a given UUID is null. - * @function Uuid.isNull + * @function Uuid(0).isNull * @param {Uuid} id - The UUID to test. * @returns {boolean} true if the UUID equals Uuid.NULL or is null, otherwise false. * @example Demonstrate true and false cases. @@ -111,7 +110,7 @@ public slots: /**jsdoc * Print to the program log a text label followed by the UUID value. - * @function Uuid.print + * @function Uuid(0).print * @param {string} label - The label to print. * @param {Uuid} id - The UUID to print. * @example Two ways of printing a label plus UUID. diff --git a/libraries/shared/src/RegisteredMetaTypes.h b/libraries/shared/src/RegisteredMetaTypes.h index be10f09da9..3e73ab6177 100644 --- a/libraries/shared/src/RegisteredMetaTypes.h +++ b/libraries/shared/src/RegisteredMetaTypes.h @@ -640,6 +640,12 @@ Q_DECLARE_METATYPE(Collision) QScriptValue collisionToScriptValue(QScriptEngine* engine, const Collision& collision); void collisionFromScriptValue(const QScriptValue &object, Collision& collision); +/**jsdoc + * UUIDs (Universally Unique IDentifiers) are used to uniquely identify entities, avatars, and the like. They are represented + * in JavaScript as strings in the format, "{nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}", where the "n"s are + * hexadecimal digits. + * @typedef {string} Uuid + */ //Q_DECLARE_METATYPE(QUuid) // don't need to do this for QUuid since it's already a meta type QScriptValue quuidToScriptValue(QScriptEngine* engine, const QUuid& uuid); void quuidFromScriptValue(const QScriptValue& object, QUuid& uuid);