SourceComment: BItem hierarchy - Chain Of Responsibility

Hi all

Here is how the pattern would help in clean up BItem… BItem::type() and related stuff is not necessary

All tests pass ;-)

1.  I also plan to give a close look to isMyMarker() so if ‘e’ marker is handled consistently ( for all most all cases )

2. Some ctors could be made private

Also this has the original code… The improved readInt will further shrink the code and make it more readable…

But this illustrates the concept….

Let me know

—- cheers atul

Attached Files:

Would you like to post a relpy?


This post starts a thread.
Follow-ups:
Re: SourceComment: BItem hierarchy - Chain Of Responsibility
Dear Atul, The chain of responsibility was an interesting idea but IMHO in our specific case it does not contribute to a simpler solution. I like your idea to have the (more...)