2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * A class that does add_callback when created and del_callback when
6 * destroyed, thus making it harder to do one or the other incorrectly.
8 * Because it's an object itself, it uses its own 'this' pointer as the
9 * 'cookie', so you don't have to come up with one.
23 // standard "add_callback" version
24 UniWatch(const UniConf
&_cfg
, const UniConfCallback
&_cb
,
25 bool _recurse
= true);
27 // special "add_setbool" version
28 UniWatch(const UniConf
&_cfg
, bool *b
, bool _recurse
= true);
33 DeclareWvList2(UniWatchListBase
, UniWatch
);
35 class UniWatchList
: public UniWatchListBase
38 void add(const UniConf
&_cfg
, const UniConfCallback
&_cb
,
40 { append(new UniWatch(_cfg
, _cb
, _recurse
), true); }
41 void add(const UniConf
&_cfg
, bool *b
, bool _recurse
= true)
42 { append(new UniWatch(_cfg
, b
, _recurse
), true); }
46 #endif // __UNIWATCH_H