jadams-tresys commented on a change in pull request #218: Implement 
dfdl:choiceLength='explicit'
URL: https://github.com/apache/incubator-daffodil/pull/218#discussion_r286969690
 
 

 ##########
 File path: 
daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/SpecifiedLengthUnparsers.scala
 ##########
 @@ -428,3 +429,20 @@ class SpecifiedLengthPrefixedUnparser(
   }
 
 }
+
+class ChoiceLengthUnparser(
+  eUnparser: Unparser,
+  rd: TermRuntimeData)
+  extends CombinatorUnparser(rd)
+  with CaptureUnparsingValueLength {
+
+  override lazy val runtimeDependencies = Vector()
+  override lazy val childProcessors = Vector(eUnparser)
+
+  override def unparse(state: UState): Unit = {
+    val elem = state.currentInfosetNode.asInstanceOf[DIElement]
+    captureValueLengthStart(state, elem)
+    eUnparser.unparse1(state)
+    captureValueLengthEnd(state, elem)
+  }
 
 Review comment:
   So in the last commit I pushed up I resolved all the other issues and 
rebased onto the separator suppression code.  I think I know what needs to be 
done, but want to make sure I am understanding everything correctly.  Should I 
be changing ChoiceLengthUnparser to extend it with SuspendableUnparser, and 
then setting the suspendableOperation to 
SuppressionRegionSplitSuspendableOperation?  If so, should I move 
SuppressionRegionSplitSuspendableOperation out into its some sort of common 
area, as my use here has nothing to do with suppressing separators.

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


With regards,
Apache Git Services

Reply via email to