diff options
author | Jörg Barfurth <jb@openoffice.org> | 2001-07-20 09:58:46 +0000 |
---|---|---|
committer | Jörg Barfurth <jb@openoffice.org> | 2001-07-20 09:58:46 +0000 |
commit | 4fa0240253759320fe66d908ca99e20e12896f59 (patch) | |
tree | 585f988e8ae6da4af1343282faa71071491276b4 /configmgr/source/inc/roottree.hxx | |
parent | 668226633f1f519c278a9c7c1fab485135f3c6a0 (diff) |
#89821# Need to keep element trees alive while sending notifications (after finishCommit)
Diffstat (limited to 'configmgr/source/inc/roottree.hxx')
-rw-r--r-- | configmgr/source/inc/roottree.hxx | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/configmgr/source/inc/roottree.hxx b/configmgr/source/inc/roottree.hxx index 103601490336..ab4a52f8bdfa 100644 --- a/configmgr/source/inc/roottree.hxx +++ b/configmgr/source/inc/roottree.hxx @@ -2,9 +2,9 @@ * * $RCSfile: roottree.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: jb $ $Date: 2001-07-05 17:05:46 $ + * last change: $Author: jb $ $Date: 2001-07-20 10:58:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,7 +62,14 @@ #ifndef CONFIGMGR_ROOTTREE_HXX_ #define CONFIGMGR_ROOTTREE_HXX_ -#include <vector> +#ifndef CONFIGMGR_API_APITYPES_HXX_ +#include "apitypes.hxx" // for NotCopyable ... +#endif + +#ifndef INCLUDED_MEMORY +#include <memory> +#define INCLUDED_MEMORY +#endif namespace configmgr { @@ -93,20 +100,28 @@ namespace configmgr TemplateProvider const& aTemplateProvider); //----------------------------------------------------------------------------- - class CommitHelper + class CommitHelper : NotCopyable { - TreeImpl* m_pTree; + struct Data; + + std::auto_ptr<Data> m_pData; + TreeImpl* m_pTree; public: CommitHelper(Tree const& aTree); + ~CommitHelper(); // collect all changes into rChangeList bool prepareCommit(TreeChangeList& rChangeList); + // finish and clean up the changes in rChangeList after they are integrated void finishCommit(TreeChangeList& rChangeList); // restore the changes in rChangeList as pending void revertCommit(TreeChangeList& rChangeList); // throw away and clean up the changes in rChangeList after a commit failed void failedCommit(TreeChangeList& rChangeList); + + // dispose of auxiliary data for a commit operation + void reset(); }; //----------------------------------------------------------------------------- |