15#include "wvlinklist.h"
16#include "wvstreamsdebugger.h"
19typedef wv::function<
void*(
void*)> WvContCallback;
42 static DataList *data_list;
47 static void bouncer(
void *userdata);
54 {
return _call(data); }
60 static void *_call(
Data *data);
74 WvCont(
const WvContCallback &cb,
unsigned long stacksize = 64*1024);
77 WvCont(
const WvCont &cb);
107 static void *
yield(
void *ret = 0);
130 template <
typename R,
typename T>
133 WvCont &cont = *(WvCont *)_cont;
134 return (R)cont((T)t);
151 template <
typename R>
154 WvCont &cont = *(WvCont *)_cont;
160 WvStreamsDebugger::ResultCallback result_cb,
void *);
static WvCont current()
Get a copy of the current WvCont.
static void * yield(void *ret=0)
"return" from the current callback, giving value 'ret' to the person who called us.
static bool isok()
Tell us if the current context is "okay", that is, not trying to die.
void * operator()(void *p1=0)
call the callback, making p1 the return value of yield() or the parameter to the function,...
static R c_bouncer(void *_cont)
A templated function that allows you to pass a WvCont wherever a C-style function pointer of the form...
static R c_bouncer(T t, void *_cont)
A templated function that allows you to pass a WvCont wherever a C-style function pointer of the form...
A linked list container class.
This is a WvList of WvStrings, and is a really handy way to parse strings.
WvString is an implementation of a simple and efficient printable-string class.