mbeckerle commented on a change in pull request #326: Daffodil 2280 cleanup -
removes backpointers and factory patterns no longer needed
URL: https://github.com/apache/incubator-daffodil/pull/326#discussion_r393908964
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SchemaComponent.scala
##########
@@ -64,11 +64,25 @@ trait SchemaComponent
override def oolagContextViaArgs = optLexicalParent
+ /**
+ * Override and call super.check() to indicate
+ * things that need to be checked if the object is being used, that is.
+ */
+ protected def check(): Unit = {
Review comment:
How about this:
We convert all calls to requiredEvaluations to one of these:
requiredEvaluationsAlways
requiredEvaluationsIfActivated
requiredEvaluationsAlways works as now.
requiredEvaluationsIfActivated queues up the objects on a local list. Upon
that object being notified it is active via a call to
setRequiredEvaluationsActive(), the queued evaluations are added to the queue,
and the object state becomes such that any additional
requiredEvaluationsIfActivated no longer queue things locally, but behave as if
they were ordinary requiredEvaluationsAlways calls.
Then the place where I call doCheck which was calling the check() method,
that just ends up invoking setRequiredEvaluationsActive() on those objects
instead.
----------------------------------------------------------------
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