Merge pull request #16180 from ctrlaltdavid/DOC-163

DOC-163: Fix up Workload JSDoc stubs
This commit is contained in:
jennaingersoll 2019-09-11 17:16:09 -07:00 committed by GitHub
commit c439358626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,6 +90,17 @@ public:
using Config = JobConfig; using Config = JobConfig;
}; };
/**jsdoc
* @namespace Workload
*
* @hifi-interface
* @hifi-client-entity
* @hifi-avatar
*
* @property {number} cpuRunTime - <em>Read-only.</em>
* @property {boolean} enabled
* @property {number} branch
*/
// A default Config is always on; to create an enableable Config, use the ctor JobConfig(bool enabled) // A default Config is always on; to create an enableable Config, use the ctor JobConfig(bool enabled)
class JobConfig : public QObject { class JobConfig : public QObject {
Q_OBJECT Q_OBJECT
@ -139,7 +150,7 @@ public:
double getCPURunTime() const { return _msCPURunTime; } double getCPURunTime() const { return _msCPURunTime; }
/**jsdoc /**jsdoc
* @function Render.getConfig * @function Workload.getConfig
* @param {string} name * @param {string} name
* @returns {object} * @returns {object}
*/ */
@ -162,19 +173,19 @@ public:
// Describe the node graph data connections of the associated Job/Task // Describe the node graph data connections of the associated Job/Task
/**jsdoc /**jsdoc
* @function JobConfig.isTask * @function Workload.isTask
* @returns {boolean} * @returns {boolean}
*/ */
Q_INVOKABLE bool isTask() const { return _isTask; } Q_INVOKABLE bool isTask() const { return _isTask; }
/**jsdoc /**jsdoc
* @function JobConfig.isSwitch * @function Workload.isSwitch
* @returns {boolean} * @returns {boolean}
*/ */
Q_INVOKABLE bool isSwitch() const { return _isSwitch; } Q_INVOKABLE bool isSwitch() const { return _isSwitch; }
/**jsdoc /**jsdoc
* @function JobConfig.getSubConfigs * @function Workload.getSubConfigs
* @returns {object[]} * @returns {object[]}
*/ */
Q_INVOKABLE QObjectList getSubConfigs() const { Q_INVOKABLE QObjectList getSubConfigs() const {
@ -187,13 +198,13 @@ public:
} }
/**jsdoc /**jsdoc
* @function JobConfig.getNumSubs * @function Workload.getNumSubs
* @returns {number} * @returns {number}
*/ */
Q_INVOKABLE int getNumSubs() const { return getSubConfigs().size(); } Q_INVOKABLE int getNumSubs() const { return getSubConfigs().size(); }
/**jsdoc /**jsdoc
* @function JobConfig.getSubConfig * @function Workload.getSubConfig
* @param {number} index * @param {number} index
* @returns {object} * @returns {object}
*/ */
@ -214,7 +225,7 @@ public slots:
/**jsdoc /**jsdoc
* @function Workload.load * @function Workload.load
* @param {object} map * @param {object} json
*/ */
void load(const QJsonObject& val) { qObjectFromJsonValue(val, *this); emit loaded(); } void load(const QJsonObject& val) { qObjectFromJsonValue(val, *this); emit loaded(); }