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 
26 public:
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.
36  UniTransaction(const UniTransaction &base)
38  new UniUnwrapGen(base))), false)
39  {
40  }
41 };
42 
43 #endif /* _UNITRANSACTION_H */
UniConfRoot::UniConfRoot
UniConfRoot()
Creates an empty UniConf tree with no mounted stores.
Definition: uniconfroot.cc:14
UniConf
UniConf instances function as handles to subtrees of a UniConf tree and expose a high-level interface...
Definition: uniconf.h:50
UniBachelorGen
Definition: unibachelorgen.h:14
UniTransactionGen
A UniConfGen that represents pending transactions to another generator.
Definition: unitransactiongen.h:80
UniUnwrapGen
Deprecated: a UniConfGen that delegates all requests to an inner UniConf.
Definition: uniunwrapgen.h:33
UniTransaction
Wraps an existing UniConf tree with a transaction generator.
Definition: unitransaction.h:20
UniConfRoot
Represents the root of a hierarhical registry consisting of pairs of UniConfKeys and associated strin...
Definition: uniconfroot.h:73
UniConf::Iter
This iterator walks through all immediate children of a UniConf node.
Definition: uniconf.h:435
UniConf::RecursiveIter
This iterator performs depth-first traversal of a subtree.
Definition: uniconf.h:466