complex-barcode/i-complex-codetext.js

const _MwWrapper = require("../_mwbridge/_mw-wrapper.js");
const BarcodeException = require("../barcode-exception");

/**
 * Interface for complex codetext used with ComplexBarcodeGenerator.
 */
class IComplexCodetext extends _MwWrapper
{
    constructor(mwObject)
    {
        super(mwObject);
        this._initializeWrapperMembers();
    }

    /**
     * Construct codetext for complex barcode
     * @return Constructed codetext
     */
    getConstructedCodetext()
    {
        throw new BarcodeException('You have to implement the method getConstructedCodetext!');
    }

    /**
     * Initializes instance with constructed codetext.
     * @param constructedCodetext Constructed codetext.
     */
    initFromString(constructedCodetext)
    {
        throw new BarcodeException('You have to implement the method initFromString!');
    }

    /**
     * Gets barcode type.
     * @return Barcode type.
     */
    getBarcodeType()
    {
        throw new BarcodeException('You have to implement the method getBarcodeType!');
    }
}

module.exports = IComplexCodetext