mbeckerle commented on a change in pull request #207: Added support for 
enumerations and TypeValueCalc
URL: https://github.com/apache/incubator-daffodil/pull/207#discussion_r275129108
 
 

 ##########
 File path: daffodil-lib/src/main/scala/org/apache/daffodil/util/Cursor.scala
 ##########
 @@ -93,9 +93,23 @@ trait Cursor[AccessorType <: Accessor[AccessorType]] {
    * The inspectAccessor provides access to the data, the returned
    * boolean indicates whether that happened successfully or there
    * was no more data.
+   *
+   * Note that inspecting may have side effects. For instance, the 
InfosetInputter
+   * returns a DINode on inspection. However, in order to construct a DINode, 
said node
+   * must be inserted into the infoset. Therefore, in a chain with one or more 
calls to inspect,
+   * followed by a call to advance, the side effect of constructing the DINode 
will be realized on the
+   * first call to inspect.
+   *
+   * For a side-effect free variant, consider inspectPure
    */
   def inspect: Boolean
 
+  /**
+   * Like inspect, but only partially populates the accessor with data that 
can be computed without
 
 Review comment:
   What does "partially populates" mean? I surised that you are trying to get a 
node that is unattached from the infoset. Is that right? Can you make this a 
bit clearer in intent. 
   
   Consider whether inspectPure is a good name. Maybe it should be more 
explicit beause what "pure" means in this context isn't 100% clear?

----------------------------------------------------------------
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