Compile an Ev to see if it is a constant at compilation time.
Compile an Ev to see if it is a constant at compilation time. This is determined by actually evaluating it, passing a special CompileState that errors out when data access to runtime-valued data is attempted.
Note: use of MaybeJULong type.
Note: use of MaybeJULong type. New Maybe type added which can be stored in a generic data structure. (I.e., a MaybeJULong is an AnyRef, not an AnyVal like Long and MaybeULong).
Ev values that are runtime dependent get stored in a generic cache of AnyRef values, so this gives us the benefits of a maybe object on top of the boxing that is required to store a number in in the cache.
Convenience method
Convenience method
Use by way of override lazy val qName = dafName("foobar")
Preferred for use in the runtime.
Preferred for use in the runtime.
Override if this evaluatable needs to use a different evaluate mode for unparsing.
Override if this evaluatable needs to use a different evaluate mode for unparsing.
The only example of this (as of this comment being written) is LengthEv
Schema compiler wants to use map call, so we need a scala option type for that.
Schema compiler wants to use map call, so we need a scala option type for that. So this variant supplies that.
QName to be associated with this evaluatable.
QName to be associated with this evaluatable.
If the Evaluatable is for a DFDL property this should be dfdl:propertyName e.g., dfdl:terminator, with the prefix DFDL being the prefix associated with the DFDL namespace.
If the Evaluatable is for some other computation, e.g., for the CharsetEncoder. Then daf:encoder or other useful identifier.
This QName is used in the XML representation of these Evaluatables, if they are to be displayed, which is mostly for various debug purposes.
Important - Evalutables MUST declare all evaluatables they depend on.
Important - Evalutables MUST declare all evaluatables they depend on. But only those they directly depend on. (Not the dependents of the dependents...)
Creates an XML-like string representation.
Creates an XML-like string representation.
Looks like an attribute definition, but the value part may contain XML-element-like syntax. If so it is either escaped with CDATA bracketing (preferred), or if there are quotes in it, then it is escapified meaning " < etc.
Avoids inserting single quotes (aka apos) so that those can be used surrounding this at a higher level.
Used for unparsing, to determine whether we have a target length from the dfdl:length property and Explicit length, or for fixed length from facets or textOutputMinLength.
Evaluates to Nope if variable-width encoding prevents computing the targetLengthInBits.
Nope does NOT MEAN the length cannot be computed yet. It means variable-width encoding prevents computing the target length in bits units.