summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorJörg Barfurth <jb@openoffice.org>2001-06-11 07:22:33 +0000
committerJörg Barfurth <jb@openoffice.org>2001-06-11 07:22:33 +0000
commit8ccb8501aaffe3326fdd38277da3309878e4f17b (patch)
tree4c4a7e6ce5465698bc7591cad9a930d7bc37fde4 /configmgr/source
parente8151408fd32abc3f389d72dab0a5f3c085802c5 (diff)
New member: create dummy tree (may become group or set later); Now exporting a default factory (lazily)
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/inc/treenodefactory.hxx11
-rw-r--r--configmgr/source/tree/treenodefactory.cxx18
2 files changed, 25 insertions, 4 deletions
diff --git a/configmgr/source/inc/treenodefactory.hxx b/configmgr/source/inc/treenodefactory.hxx
index 5de9f6bd2f14..3882b24f7c2a 100644
--- a/configmgr/source/inc/treenodefactory.hxx
+++ b/configmgr/source/inc/treenodefactory.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: treenodefactory.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: jb $ $Date: 2001-03-16 17:31:24 $
+ * last change: $Author: jb $ $Date: 2001-06-11 08:22:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,8 +108,15 @@ namespace configmgr
rtl::OUString const& _rTemplateModule,
configuration::Attributes _aAttrs);
//-----------------------------------------------
+
+ //= special case: Dummy ISubtree ============================================================
+ static std::auto_ptr<ISubtree> createDummyTree(
+ rtl::OUString const& aName);
+
+ //-----------------------------------------------
};
+ OTreeNodeFactory& getDefaultTreeNodeFactory();
//==========================================================================
inline
std::auto_ptr<INode> base_ptr(std::auto_ptr<ISubtree> pNode)
diff --git a/configmgr/source/tree/treenodefactory.cxx b/configmgr/source/tree/treenodefactory.cxx
index ee395edd3cc5..e44f6700ede0 100644
--- a/configmgr/source/tree/treenodefactory.cxx
+++ b/configmgr/source/tree/treenodefactory.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: treenodefactory.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: jb $ $Date: 2001-03-16 17:31:24 $
+ * last change: $Author: jb $ $Date: 2001-06-11 08:22:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,13 @@
namespace configmgr
{
+//= static default ============================================================
+OTreeNodeFactory& getDefaultTreeNodeFactory()
+{
+ static OTreeNodeFactory aDefaultFactory;
+ return aDefaultFactory;
+}
+
//= ValueNodes ============================================================
std::auto_ptr<ValueNode> OTreeNodeFactory::createValueNode(
@@ -109,6 +116,13 @@ std::auto_ptr<ValueNode> OTreeNodeFactory::createNullValueNode(
//= ISubtree ============================================================
+std::auto_ptr<ISubtree> OTreeNodeFactory::createDummyTree(rtl::OUString const& aName)
+{
+ return std::auto_ptr<ISubtree>( new Subtree(aName, configuration::Attributes()) );
+}
+
+//-----------------------------------------------
+
std::auto_ptr<ISubtree> OTreeNodeFactory::createGroupNode(
rtl::OUString const& aName,
configuration::Attributes _aAttrs)