All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::Visitable Class Reference

Class to represent a visitable. All classes representing a visitable must inherit from this class. More...

#include <Visitable.h>

Inheritance diagram for te::layout::Visitable:
te::layout::MapModel te::layout::MapLocationModel

Public Member Functions

virtual void acceptVisitor (AbstractVisitor *visitor)
 Adds the specified visitor to the set of visitors for this object. More...
 
virtual void unacceptAllVisitor ()
 Removes all visitors from the set of visitors of this object. Dissociate the visitors of this object. More...
 
virtual void unacceptVisitor (AbstractVisitor *visitor)
 Removes a visitor from the set of visitors of this object. Dissociate the visitor of this object. More...
 
 ~Visitable (void)
 Destructor. More...
 

Protected Member Functions

virtual void updateVisitors ()
 Notifies all set of visitors that the state of this object changed. More...
 

Protected Attributes

std::set< AbstractVisitor * > m_visitors
 set of visitors of this object More...
 

Detailed Description

Class to represent a visitable. All classes representing a visitable must inherit from this class.

Definition at line 45 of file Visitable.h.

Constructor & Destructor Documentation

te::layout::Visitable::~Visitable ( void  )
inline

Destructor.

Definition at line 52 of file Visitable.h.

References unacceptAllVisitor().

Member Function Documentation

void te::layout::Visitable::acceptVisitor ( AbstractVisitor visitor)
virtual

Adds the specified visitor to the set of visitors for this object.

Parameters
visitorspecified visitor

Definition at line 32 of file Visitable.cpp.

References m_visitors, and te::layout::AbstractVisitor::visit().

Referenced by te::layout::VisitorUtils::changeMapVisitable().

void te::layout::Visitable::unacceptAllVisitor ( )
virtual

Removes all visitors from the set of visitors of this object. Dissociate the visitors of this object.

Definition at line 58 of file Visitable.cpp.

Referenced by ~Visitable().

void te::layout::Visitable::unacceptVisitor ( AbstractVisitor visitor)
virtual

Removes a visitor from the set of visitors of this object. Dissociate the visitor of this object.

Parameters
visitorspecified visitor

Definition at line 49 of file Visitable.cpp.

References te::layout::AbstractVisitor::disassociate().

void te::layout::Visitable::updateVisitors ( )
protectedvirtual

Notifies all set of visitors that the state of this object changed.

Definition at line 40 of file Visitable.cpp.

Member Data Documentation

std::set<AbstractVisitor*> te::layout::Visitable::m_visitors
protected

set of visitors of this object

Definition at line 85 of file Visitable.h.

Referenced by acceptVisitor().


The documentation for this class was generated from the following files: