WvStreams
uniconf
uniwatch.cc
1
/*
2
* Worldvisions Weaver Software:
3
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4
*
5
* A class that does add_callback when created and del_callback when
6
* destroyed. See uniwatch.h
7
*/
8
#include "uniwatch.h"
9
#include "uniconfroot.h"
10
11
12
UniWatch::UniWatch(
const
UniConf
&_cfg,
const
UniConfCallback &_cb,
13
bool
_recurse)
14
: cfg(_cfg), cb(_cb), recurse(_recurse)
15
{
16
cfg.add_callback(
this
, cb, recurse);
17
}
18
19
20
UniWatch::UniWatch(
const
UniConf
&_cfg,
bool
*b,
bool
_recurse)
21
: cfg(_cfg), cb(wv::bind(&
UniConfRoot
::setbool_callback, b, _1, _2)),
22
recurse(_recurse)
23
{
24
cfg.add_callback(
this
, cb, recurse);
25
}
26
27
28
UniWatch::~UniWatch()
29
{
30
cfg.
del_callback
(
this
, recurse);
31
}
UniConf::del_callback
void del_callback(void *cookie, bool recurse=true) const
Cancels notification requested using add_callback().
Definition:
uniconf.cc:175
UniConf
UniConf instances function as handles to subtrees of a UniConf tree and expose a high-level interface...
Definition:
uniconf.h:50
UniConfRoot
Represents the root of a hierarhical registry consisting of pairs of UniConfKeys and associated strin...
Definition:
uniconfroot.h:73
Generated by
1.8.17