Github user stevedlawrence commented on a diff in the pull request:
https://github.com/apache/incubator-daffodil/pull/12#discussion_r154359478
--- Diff:
daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/processors/ProcessorStateBases.scala
---
@@ -120,57 +118,56 @@ abstract class ParseOrUnparseState protected (
with Logging
with FormatInfo {
- final def replacingDecoder: CharsetDecoder = decoderEntry.replacingCoder
- final def reportingDecoder: CharsetDecoder = decoderEntry.reportingCoder
-
def this(vmap: VariableMap, diags: List[Diagnostic], dataProc:
Maybe[DataProcessor], tunable: DaffodilTunables) =
this(new VariableBox(vmap), diags, dataProc, tunable)
- /*
- * Implemnet the FormatInfo trait needed by the I/O layer.
- */
def infoset: DIElement
private def simpleElement = infoset.asInstanceOf[DISimple]
- def binaryFloatRep: BinaryFloatRep =
simpleElement.erd.maybeBinaryFloatRepEv.get.evaluate(this)
- def bitOrder: BitOrder = infoset.runtimeData.defaultBitOrder
- def byteOrder: ByteOrder =
infoset.erd.maybeByteOrderEv.get.evaluate(this)
- def isFixedWidthEncoding: Boolean = {
coderCacheEntry_.isFixedWidthEncoding }
- def maybeCharWidthInBits: MaybeInt = {
coderCacheEntry_.maybeCharWidthInBits }
- def encodingMandatoryAlignmentInBits: Int = { decoder;
coderCacheEntry_.encodingMandatoryAlignmentInBits }
- def maybeUTF16Width: Maybe[UTF16Width] =
infoset.runtimeData.encodingInfo.maybeUTF16Width
- def fillByte: Byte =
infoset.runtimeData.maybeFillByteEv.get.evaluate(this).toByte
- def decoder = {
+ /*
+ * Implemnet the FormatInfo trait needed by the I/O layer.
+ */
+ final def replacingDecoder: CharsetDecoder = decoderEntry.replacingCoder
+ final def reportingDecoder: CharsetDecoder = decoderEntry.reportingCoder
+ final def binaryFloatRep: BinaryFloatRep =
simpleElement.erd.maybeBinaryFloatRepEv.get.evaluate(this)
+ final def bitOrder: BitOrder = infoset.runtimeData.defaultBitOrder
+ final def byteOrder: ByteOrder =
infoset.erd.maybeByteOrderEv.get.evaluate(this)
--- End diff --
Could this be infoset.runtimeData.maybeByteOrderEv, just to be consident
with the other defs here?
---