42 std::set<AbstractVisitor*>::iterator it;
43 for(it = m_visitors.begin(); it != m_visitors.end(); ++it)
55 m_visitors.erase(visitor);
60 std::set<AbstractVisitor*>::iterator it;
62 it = m_visitors.begin();
63 while(it != m_visitors.end())
67 unacceptVisitor(visitor);
Class to represent a visitable. All classes representing a visitable must inherit from this class...
Abstract class to represent a visitor. All classes representing a visitor must inherit from this clas...
virtual void disassociate()
Separate this object from visitable.
virtual void unacceptVisitor(AbstractVisitor *visitor)
Removes a visitor from the set of visitors of this object. Dissociate the visitor of this object...
virtual void unacceptAllVisitor()
Removes all visitors from the set of visitors of this object. Dissociate the visitors of this object...
virtual void acceptVisitor(AbstractVisitor *visitor)
Adds the specified visitor to the set of visitors for this object.
virtual void updateVisitors()
Notifies all set of visitors that the state of this object changed.
Abstract class to represent a visitor. All classes representing a visitor must inherit from this clas...
virtual void visit(Visitable *visitable)
Constructor.
std::set< AbstractVisitor * > m_visitors
set of visitors of this object