You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/12/02 16:28:29 UTC

[GitHub] [daffodil] mbeckerle commented on pull request #694: Check for RepType when getting element length

mbeckerle commented on pull request #694:
URL: https://github.com/apache/daffodil/pull/694#issuecomment-984788945


   re: comment by @stevedlawrence on proliferating conditionals, the alternative is some object-oriented refactoring, where things that have repType get a different class than things without repType. This would actually require delegation I think to another object since we don't/can't analyze the repType property when the original DSOM object is created. I.e., we create the ElementBase instance as part of core parsing of the DFDL schema. Then, based on combining of element with its type, we eventually find out that it has a repType or not, and we'd have to construct a distinct object for the repType vs. Not case, and delegate the fixedLengthValue and elementLengthInBitsEv methods on that object. This is do-able, and may in fact be the right approach vs. proliferating conditionals of repType or not. 


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

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org