WvStreams
unitransaction.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 2005 Net Integration Technologies, Inc.
4 *
5 * Allows one to wrap a UniConf tree with a transaction model. Use
6 * UniTransaction::commit() to commit, and
7 * UniTransaction::refresh() to rollback.
8 */
9#ifndef _UNITRANSACTION_H
10#define _UNITRANSACTION_H
11
12#include "unibachelorgen.h"
13#include "uniconfroot.h"
14#include "unitransactiongen.h"
15#include "uniunwrapgen.h"
16
21{
22 friend class UniConf;
23 friend class UniConf::Iter;
24 friend class UniConf::RecursiveIter;
25
26public:
27 UniTransaction(const UniConf &base)
29 new UniUnwrapGen(base))), false)
30 {
31 }
32
33 // C++ would auto-generate a "copy constructor" for this function, but
34 // what we really want is just to wrap a new transaction around the
35 // base, just like any other UniConf object.
38 new UniUnwrapGen(base))), false)
39 {
40 }
41};
42
43#endif /* _UNITRANSACTION_H */
Represents the root of a hierarhical registry consisting of pairs of UniConfKeys and associated strin...
Definition uniconfroot.h:74
UniConfRoot()
Creates an empty UniConf tree with no mounted stores.
This iterator walks through all immediate children of a UniConf node.
Definition uniconf.h:436
This iterator performs depth-first traversal of a subtree.
Definition uniconf.h:467
UniConf instances function as handles to subtrees of a UniConf tree and expose a high-level interface...
Definition uniconf.h:51
A UniConfGen that represents pending transactions to another generator.
Wraps an existing UniConf tree with a transaction generator.
Deprecated: a UniConfGen that delegates all requests to an inner UniConf.