/** * Sets the volatile flag and ripples all the way up the parse tree */ public void setVolatile() { volatileFunction = true; if (parent != null && !parent.isVolatile()) { parent.setVolatile(); } }
/** * Gets the bytes for the formula * * @return the bytes in RPN */ public byte[] getBytes() { byte[] bytes = root.getBytes(); if (root.isVolatile()) { byte[] newBytes = new byte[bytes.Length + 4]; System.Array.Copy(bytes, 0, newBytes, 4, bytes.Length); newBytes[0] = Token.ATTRIBUTE.getCode(); newBytes[1] = (byte)0x1; bytes = newBytes; } return(bytes); }