Size calculation using a Visitor/Visitable pattern