/* */ #include "PStringSegment.h" #include "FatalException.h" void PStringSegment::accept(const PStringVisitorHandle& visitor) { PStringSegmentVisitorHandle v = visitor; if(v.isNull()) { throw new FatalException("Class cast exception"); } v->hello(this); if(!_next.isNull()) { _next->accept(visitor); } v->goodbye(this); }