stevedlawrence commented on a change in pull request #394:
URL: https://github.com/apache/incubator-daffodil/pull/394#discussion_r453892222
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SimpleTypes.scala
##########
@@ -53,9 +54,9 @@ trait TypeBase {
trait NonPrimTypeMixin
sealed trait SimpleTypeBase extends TypeBase
- with HasOptRepTypeMixin {
+ with HasOptRepTypeMixin with SimpleTypeView {
- def primType: PrimType
+ override def primType: PrimType
Review comment:
I think list of PrimTypes isn't changed that often (and likely won't
change anytime soon). The things that do change relatively frequently is the
functions defined in the prim types. Because these change so often, we might
not want those members to be publicly visible to a dsom walker. The View trait
allows us to decide which members are made visible, which I suspect is not
going to be many, if any at all. So you can still match on thes prim type views
to figure out the type.
You are correct that if a new PrimType is added, we'll also need to add a
PrimTypeView as well. Not much we can do about that though.
----------------------------------------------------------------
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]