diffusion
Version:
Diffusion JavaScript client
73 lines (72 loc) • 1.92 kB
JavaScript
;
/**
* @module FetchRequest
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TopicResultImpl = void 0;
var topic_specification_1 = require("../../../topics/topic-specification");
/**
* Implementation of the TopicResult interface
*/
var TopicResultImpl = /** @class */ (function () {
/**
* Create a new TopicResultImpl instance
*
* @param path the topic path
* @param type the topic type
* @param value the value if one was requested
* @param properties the topic properties
* @param sizeInfo the topic size information
*/
function TopicResultImpl(path, type, value, properties, sizeInfo) {
this.mPath = path;
this.mType = type;
this.mValue = value;
this.mProperties = properties;
this.sizeInfo = sizeInfo;
}
/**
* @inheritdoc
*/
TopicResultImpl.prototype.path = function () {
return this.mPath;
};
/**
* @inheritdoc
*/
TopicResultImpl.prototype.type = function () {
return this.mType;
};
/**
* @inheritdoc
*/
TopicResultImpl.prototype.value = function () {
return this.mValue;
};
/**
* @inheritdoc
*/
TopicResultImpl.prototype.specification = function () {
return new topic_specification_1.TopicSpecification(this.mType, this.mProperties);
};
/**
* @inheritdoc
*/
TopicResultImpl.prototype.valueSize = function () {
return this.sizeInfo.valueSize;
};
/**
* @inheritdoc
*/
TopicResultImpl.prototype.valueCount = function () {
return this.sizeInfo.valueCount;
};
/**
* @inheritdoc
*/
TopicResultImpl.prototype.valueTotalSize = function () {
return this.sizeInfo.valueTotalSize;
};
return TopicResultImpl;
}());
exports.TopicResultImpl = TopicResultImpl;