Embedded Template Library 1.0
|
A set of template classes for easy implementation of the visitor pattern.
The visitor design pattern is a way of separating an algorithm from an object structure on which it operates. A practical result of this separation is the ability to add new operations to existing object structures without modifying those structures. It is one way to easily follow the open/closed principle. In essence, the visitor allows one to add new virtual functions to a family of classes without modifying the classes themselves; instead, one creates a visitor class that implements all of the appropriate specialisations of the virtual function. The visitor takes the instance as input, and implements the goal through double dispatch.
class etl::visitable |
The visitable base class for four visitor types. Derive visitable classes from this.
Public Member Functions | |
virtual void | accept (T1 &)=0 |
virtual void | accept (T2 &)=0 |
virtual void | accept (T3 &)=0 |
virtual void | accept (T4 &)=0 |
class etl::visitable< T1, T2, T3 > |
class etl::visitable< T1, T2 > |
class etl::visitable< T1 > |
struct etl::visitor_tag |
The tag to identify an etl::visitor.
class etl::visitor |
The visitor base class for sixteen types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > |
The visitor base class for fifteen types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > |
The visitor base class for fourteen types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 > |
The visitor base class for thirteen types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 > |
The visitor base class for twelve types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 > |
The visitor base class for eleven types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > |
The visitor base class for ten types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8, T9 > |
The visitor base class for nine types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7, T8 > |
The visitor base class for eight types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6, T7 > |
The visitor base class for seven types. Derive visitors from this.
class etl::visitor< T1, T2, T3, T4, T5, T6 > |
The visitor base class for six types. Derive visitors from this.
Public Member Functions | |
virtual void | visit (T1)=0 |
virtual void | visit (T2)=0 |
virtual void | visit (T3)=0 |
virtual void | visit (T4)=0 |
virtual void | visit (T5)=0 |
virtual void | visit (T6)=0 |
class etl::visitor< T1, T2, T3, T4, T5 > |
The visitor base class for five types. Derive visitors from this.
Public Member Functions | |
virtual void | visit (T1)=0 |
virtual void | visit (T2)=0 |
virtual void | visit (T3)=0 |
virtual void | visit (T4)=0 |
virtual void | visit (T5)=0 |
class etl::visitor< T1, T2, T3, T4 > |
class etl::visitor< T1, T2, T3 > |
class etl::visitor< T1, T2 > |
class etl::visitor< T1 > |
struct etl::is_visitor |
Is the type an etl::visitor?
Additional Inherited Members | |
![]() | |
typedef bool | value_type |
typedef integral_constant< bool, VALUE > | type |
![]() | |
operator value_type () const | |
![]() | |
static const bool | value |