C++ features by examples
Sample_component Struct Reference

one of many components is independed from Sample_visitor and implemenation of function visit. More...

Inheritance diagram for Sample_component:
Collaboration diagram for Sample_component:

Public Member Functions

string component_accept (Visitor &visitor) const override
 
string component_method () const
 is not virtual More...
 
- Public Member Functions inherited from Component
virtual string component_accept (Visitor &) const =0
 
virtual ~Component ()=default
 

Detailed Description

one of many components is independed from Sample_visitor and implemenation of function visit.

Definition at line 454 of file patterns.cpp.

Member Function Documentation

◆ component_accept()

string Sample_component::component_accept ( Visitor visitor) const
inlineoverridevirtual

Implements Component.

Definition at line 460 of file patterns.cpp.

460 {
461 return string(__func__) + " > " + visitor.visit(*this);
462 }
virtual string visit(const Sample_component &) const =0
overloaded function for each component
Here is the call graph for this function:

◆ component_method()

string Sample_component::component_method ( ) const
inline

is not virtual

Definition at line 464 of file patterns.cpp.

464 {
465 return __func__;
466 }
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: