torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::Visitable Class Referenceabstract

An object that receives an inoutVisitor. More...

#include <Visitable.hpp>

+ Inheritance diagram for torc::generic::Visitable:

Public Member Functions

virtual ~Visitable () throw ()
 
virtual void accept (BaseVisitor &inoutVisitor)=0 throw (Error)
 

Protected Member Functions

 Visitable ()
 

Private Member Functions

 Visitable (const Visitable &source)
 
Visitableoperator= (const Visitable &source)
 

Detailed Description

An object that receives an inoutVisitor.

The Visitable class provides an interface to all classes that want to make themselves visitable by the clients. Typically such classes will be leaf types that cannot be directly accessed by clients without using a dynamic_cast. This design is loosely based on the acyclic inoutVisitor concept defined by Alexandrescu in "Modern C++ Design".

Definition at line 38 of file Visitable.hpp.

Constructor & Destructor Documentation

torc::generic::Visitable::Visitable ( )
protected

Definition at line 30 of file Visitable.cpp.

30 {}
torc::generic::Visitable::~Visitable ( )
throw (
)
virtual

Definition at line 32 of file Visitable.cpp.

32 {}
torc::generic::Visitable::Visitable ( const Visitable source)
private

Member Function Documentation

virtual void torc::generic::Visitable::accept ( BaseVisitor inoutVisitor)
throw (Error
)
pure virtual

Receive an inoutVisitor to this class. The visit method of the inoutVisitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This situation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.

Parameters
[in,out]inoutVisitorA reference to the inoutVisitor object
Exceptions
ErrorVisitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method.

Implemented in torc::generic::Root, torc::generic::Permutable, torc::generic::PortBundle, torc::generic::Status, torc::generic::VectorPort, torc::generic::View, torc::generic::InterfaceJoinedInfo, torc::generic::LogicElement, torc::generic::ParameterArray, torc::generic::InstanceArray, torc::generic::Cell, torc::generic::VectorPortReference, torc::generic::VectorNet, torc::generic::Library, torc::generic::LogicValue, torc::generic::Simulate, torc::generic::Property, torc::generic::SingleParameter, torc::generic::Design, torc::generic::SimulationInfo, torc::generic::NetBundle, torc::generic::PortBundleReference, torc::generic::ScalarPort, torc::generic::ScalarNet, torc::generic::ScalarPortReference, torc::generic::SingleInstance, torc::generic::LogicalResponse, torc::generic::InstanceArrayMember, torc::generic::ParameterArrayElement, torc::generic::Event, torc::generic::VectorNetBit, torc::generic::VectorPortBit, torc::generic::Timing, torc::generic::ForbiddenEvent, torc::generic::VectorPortBitReference, and torc::generic::Apply.

Visitable& torc::generic::Visitable::operator= ( const Visitable source)
private

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