fix8  version 1.4.0
Open Source C++ FIX Framework
coroutine.hpp File Reference

Go to the source code of this file.

Classes

class  coroutine
 
class  coroutine_ref
 

Macros

#define CORO_REENTER(c)
 
#define CORO_YIELD_IMPL(n)
 
#define CORO_FORK_IMPL(n)
 
#define CORO_YIELD   CORO_YIELD_IMPL(__LINE__)
 
#define CORO_FORK   CORO_FORK_IMPL(__LINE__)
 

Macro Definition Documentation

#define CORO_FORK   CORO_FORK_IMPL(__LINE__)

Definition at line 84 of file coroutine.hpp.

#define CORO_FORK_IMPL (   n)
Value:
for (_coro_value = -(n);; _coro_value = (n)) \
if (_coro_value == (n)) \
{ \
case -(n): ; \
break; \
} \
else

Definition at line 70 of file coroutine.hpp.

#define CORO_REENTER (   c)
Value:
switch (coroutine_ref _coro_value = c) \
case -1: if (_coro_value) \
{ \
goto terminate_coroutine; \
terminate_coroutine: \
_coro_value = -1; \
goto bail_out_of_coroutine; \
bail_out_of_coroutine: \
break; \
} \
else case 0:

Definition at line 40 of file coroutine.hpp.

#define CORO_YIELD   CORO_YIELD_IMPL(__LINE__)

Definition at line 83 of file coroutine.hpp.

#define CORO_YIELD_IMPL (   n)
Value:
for (_coro_value = (n);;) \
if (_coro_value == 0) \
{ \
case (n): ; \
break; \
} \
else \
switch (_coro_value ? 0 : 1) \
for (;;) \
case -1: if (_coro_value) \
goto terminate_coroutine; \
else for (;;) \
case 1: if (_coro_value) \
goto bail_out_of_coroutine; \
else case 0:

Definition at line 53 of file coroutine.hpp.