00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __UNIWATCH_H
00012 #define __UNIWATCH_H
00013
00014 #include "uniconf.h"
00015
00016 class UniWatch
00017 {
00018 UniConf cfg;
00019 UniConfCallback cb;
00020 bool recurse;
00021
00022 public:
00023
00024 UniWatch(const UniConf &_cfg, const UniConfCallback &_cb,
00025 bool _recurse = true);
00026
00027
00028 UniWatch(const UniConf &_cfg, bool *b, bool _recurse = true);
00029
00030 ~UniWatch();
00031 };
00032
00033 DeclareWvList2(UniWatchListBase, UniWatch);
00034
00035 class UniWatchList : public UniWatchListBase
00036 {
00037 public:
00038 void add(const UniConf &_cfg, const UniConfCallback &_cb,
00039 bool _recurse = true)
00040 { append(new UniWatch(_cfg, _cb, _recurse), true); }
00041 void add(const UniConf &_cfg, bool *b, bool _recurse = true)
00042 { append(new UniWatch(_cfg, b, _recurse), true); }
00043 };
00044
00045
00046 #endif // __UNIWATCH_H