/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */


const ITaggedData = require("./ITaggedData");

// A raw binary tagged value
class RawTaggedData extends ITaggedData {
    
    constructor(tag) {
        super();
        this._tag = 0;
        this.m_Data = null;
        this._tag = tag;
    }
    
    get tagID() {
        return this._tag;
    }
    set tagID(value) {
        this._tag = value;
        return value;
    }
    
    setData(data, offset, count) {
        if (data === null) 
            throw new Error("data");
        this.m_Data = new Uint8Array(count);
        for(let iii = 0; iii < (count); iii++) this.m_Data[(0) + iii] = data[(offset) + iii];
    }
    
    getData() {
        return this.m_Data;
    }
    
    get _Data() {
        return this.m_Data;
    }
    set _Data(value) {
        this.m_Data = value;
        return value;
    }
}


module.exports = RawTaggedData