KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CoroutineExample Class Reference

A simple harness that counts to a preset value in a couroutine, yielding each value. More...

Public Member Functions

 CoroutineExample (int aCount)
 
int CountTo (int n)
 
void Run ()
 

Public Attributes

std::unique_ptr< MyCoroutinem_cofunc
 
int m_count
 

Detailed Description

A simple harness that counts to a preset value in a couroutine, yielding each value.

This is a user-facing version of the "Increment" unit test in the "Coroutine" suite, in qa_common.

Definition at line 47 of file coroutines.cpp.

Constructor & Destructor Documentation

◆ CoroutineExample()

CoroutineExample::CoroutineExample ( int  aCount)
inline

Definition at line 50 of file coroutines.cpp.

Member Function Documentation

◆ CountTo()

int CoroutineExample::CountTo ( int  n)
inline

Definition at line 54 of file coroutines.cpp.

References m_cofunc.

Referenced by Run().

◆ Run()

void CoroutineExample::Run ( )
inline

Definition at line 64 of file coroutines.cpp.

References CountTo(), m_cofunc, and m_count.

Referenced by coroutine_main_func().

Member Data Documentation

◆ m_cofunc

std::unique_ptr<MyCoroutine> CoroutineExample::m_cofunc

Definition at line 75 of file coroutines.cpp.

Referenced by CountTo(), and Run().

◆ m_count

int CoroutineExample::m_count

Definition at line 76 of file coroutines.cpp.

Referenced by Run().


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