Ceylan::Visitable Class Reference

A Visitable instance is made to be subclassed. More...

#include <CeylanVisitable.h>

Inheritance diagram for Ceylan::Visitable:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Visitable ()
 Default empty constructor.
virtual ~Visitable () throw ()
 Virtual destructor.
virtual void accept (Visitor &visitor)=0
 Allows given visitor to visit this object, thanks to a callback: 'visitor.visit( *this ) ;'.

Private Member Functions

 Visitable (const Visitable &source)
 Copy constructor made private to ensure that it will never be called.
Visitableoperator= (const Visitable &source)
 Assignment operator made private to ensure that it will never be called.


Detailed Description

A Visitable instance is made to be subclassed.

Each child class can be visited by any Visitor.

See also:
http://en.wikipedia.org/wiki/Visitor_pattern

Definition at line 72 of file CeylanVisitable.h.


Constructor & Destructor Documentation

Visitable::Visitable (  ) 

Default empty constructor.

Definition at line 51 of file CeylanVisitable.cc.

Visitable::~Visitable (  )  throw () [virtual]

Virtual destructor.

Definition at line 58 of file CeylanVisitable.cc.

Ceylan::Visitable::Visitable ( const Visitable source  )  [private]

Copy constructor made private to ensure that it will never be called.

The compiler should complain whenever this undefined constructor is called, implicitly or not.

Note:
Made to avoid unwanted hidden clone of the Singleton.


Member Function Documentation

virtual void Ceylan::Visitable::accept ( Visitor visitor  )  [pure virtual]

Allows given visitor to visit this object, thanks to a callback: 'visitor.visit( *this ) ;'.

Exceptions:
VisitException if the visit failed.
Note:
This method cannot be implemented here, as the visitor must declare its 'visit' method which must accept a specific datatype, not a generic one such as Visitable. Otherwise, there would be ambiguous calls.

Implemented in Ceylan::Tree< Content >, Ceylan::XML::XMLMarkup, and Ceylan::XML::XMLText.

Visitable& Ceylan::Visitable::operator= ( const Visitable source  )  [private]

Assignment operator made private to ensure that it will never be called.

The compiler should complain whenever this undefined operator is called, implicitly or not.


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

Generated on Thu Jun 4 20:40:20 2009 for Ceylan by  doxygen 1.5.8