/*
 * 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 Utils = require("./../../../unisharp/Utils");
const RefOutArgWrapper = require("./../../../unisharp/RefOutArgWrapper");

const MiscHelper = require("./../../../util/MiscHelper");
const PdfObject = require("./PdfObject");

class PdfRealValue extends PdfObject {
    
    constructor() {
        super();
        this.val = null;
    }
    
    getDouble() {
        let res = 0;
        let wrapres235 = new RefOutArgWrapper();
        let inoutres236 = MiscHelper.tryParseDouble(this.val, wrapres235);
        res = wrapres235.value;
        if (!inoutres236) 
            return 0;
        return res;
    }
    
    toStringEx(lev) {
        return this.val;
    }
    
    isSimple(lev) {
        return true;
    }
    
    write(s) {
        let buf = Utils.encodeString("ASCII", this.val);
        s.write(buf, 0, buf.length);
    }
}


module.exports = PdfRealValue