C++ features by examples
Composite Struct Reference
Inheritance diagram for Composite:
Collaboration diagram for Composite:

Public Member Functions

int method () override
 
- Public Member Functions inherited from Interface
virtual int method ()=0
 
virtual ~Interface ()=default
 

Public Attributes

forward_list< reference_wrapper< Interface > > children
 

Detailed Description

Definition at line 351 of file patterns.cpp.

Member Function Documentation

◆ method()

int Composite::method ( )
inlineoverridevirtual

Implements Interface.

Definition at line 354 of file patterns.cpp.

354 {
355 //trace();
356 for (Interface& i : children) i.method();
357 return 0;
358 }
forward_list< reference_wrapper< Interface > > children
Definition: patterns.cpp:359
is a common pure virtual interface
Definition: patterns.cpp:167
Here is the caller graph for this function:

Member Data Documentation

◆ children

forward_list<reference_wrapper<Interface> > Composite::children

Definition at line 359 of file patterns.cpp.


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