stevedlawrence commented on a change in pull request #12: Revised daffodil-io 
module to require passing in a FormatInfo object.
URL: https://github.com/apache/incubator-daffodil/pull/12#discussion_r158030238
 
 

 ##########
 File path: 
daffodil-io/src/main/scala/edu/illinois/ncsa/daffodil/io/DataStreamCommonImplMixin.scala
 ##########
 @@ -35,14 +35,29 @@ import edu.illinois.ncsa.daffodil.util.MaybeChar
 import edu.illinois.ncsa.daffodil.util.Logging
 import edu.illinois.ncsa.daffodil.api.DataStreamLimits
 import edu.illinois.ncsa.daffodil.schema.annotation.props.gen.BitOrder
+import edu.illinois.ncsa.daffodil.util.Maybe
+import edu.illinois.ncsa.daffodil.util.Maybe._
+import edu.illinois.ncsa.daffodil.exceptions.Assert
 
 trait DataStreamCommonState {
 
-  //  var binaryFloatRep: BinaryFloatRep = BinaryFloatRep.Ieee
-  var priorBitOrder: BitOrder = BitOrder.MostSignificantBitFirst
-  //  var maybeCharWidthInBits: MaybeInt = MaybeInt.Nope
-  //  var encodingMandatoryAlignmentInBits: Int = 8
-  //  var maybeUTF16Width: Maybe[UTF16Width] = Maybe(UTF16Width.Fixed)
+  /**
+   * Keeps track of the bitOrder of the last operation on the
+   * data stream.
+   */
+  private var maybePriorBitOrder_ : Maybe[BitOrder] = 
Maybe(BitOrder.MostSignificantBitFirst)
 
 Review comment:
   Should this be set to Nope initially? If a file was completely 
leastSignificantBitFirst it would look like there is a bitorder change? Though, 
maybe that doesn't matter? Initially it should be on a byte boundary so the 
change is fine? And maybe there would be a buffered DOS? The first first should 
be finished so it could be immediately squashed into the Direct? So maybe this 
doesn't matter?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to