2002-05-16 04:57:32 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* $RCSfile: mergedcomponentdata.hxx,v $
|
|
|
|
* $Revision: 1.6 $
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
2008-04-11 06:31:05 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2002-05-16 04:57:32 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
/* PLEASE DON'T DELETE ANY COMMENT LINES, ALSO IT'S UNNECESSARY. */
|
|
|
|
|
|
|
|
#ifndef CONFIGMGR_BACKEND_MERGEDCOMPONENTDATA_HXX
|
|
|
|
#define CONFIGMGR_BACKEND_MERGEDCOMPONENTDATA_HXX
|
|
|
|
|
|
|
|
#include "valuenode.hxx"
|
|
|
|
|
2003-04-17 07:17:47 -05:00
|
|
|
#include <com/sun/star/configuration/backend/TemplateIdentifier.hpp>
|
2002-05-16 04:57:32 -05:00
|
|
|
|
|
|
|
#ifndef INCLUDED_MEMORY
|
|
|
|
#include <memory>
|
|
|
|
#define INCLUDED_MEMORY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace configmgr
|
|
|
|
{
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
class OTreeNodeFactory;
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
namespace backend
|
|
|
|
{
|
|
|
|
// -----------------------------------------------------------------------------
|
2003-04-17 07:17:47 -05:00
|
|
|
namespace backenduno = ::com::sun::star::configuration::backend;
|
2002-05-16 04:57:32 -05:00
|
|
|
|
|
|
|
using backenduno::TemplateIdentifier;
|
|
|
|
|
|
|
|
using ::rtl::OUString;
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class MergedComponentData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MergedComponentData();
|
|
|
|
~MergedComponentData();
|
|
|
|
|
|
|
|
bool hasSchema() const;
|
|
|
|
bool hasTemplates() const;
|
2003-03-19 09:20:19 -06:00
|
|
|
bool hasTemplate(OUString const & _aTemplateName) const;
|
2002-05-16 04:57:32 -05:00
|
|
|
|
|
|
|
OUString getTemplateAccessor (TemplateIdentifier const & _aTemplateName) const;
|
|
|
|
|
2003-05-26 02:05:43 -05:00
|
|
|
ISubtree const * getSchemaTree() const { return m_pSchemaTree.get(); }
|
|
|
|
ISubtree const * getTemplatesTree() const { return m_pTemplatesTree.get(); }
|
2003-03-19 09:20:19 -06:00
|
|
|
ISubtree const * findTemplate(OUString const & _aTemplateName) const;
|
2002-05-16 04:57:32 -05:00
|
|
|
|
|
|
|
ISubtree * getSchemaTree() { return m_pSchemaTree.get(); }
|
|
|
|
ISubtree * getTemplatesTree() { return m_pTemplatesTree.get(); }
|
|
|
|
|
2003-03-19 09:20:19 -06:00
|
|
|
std::auto_ptr<INode> instantiateTemplate(OUString const & _aName, OUString const & _aTemplateName) const;
|
2002-05-16 04:57:32 -05:00
|
|
|
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
ISubtree * setSchemaRoot(std::auto_ptr<ISubtree> _aSchemaRoot);
|
|
|
|
ISubtree * addTemplate(std::auto_ptr<ISubtree> _aNode, TemplateIdentifier const & aTemplate);
|
2003-05-26 02:05:43 -05:00
|
|
|
void setTemplatesTree(std::auto_ptr<ISubtree> _aTemplateTree);
|
2002-05-16 04:57:32 -05:00
|
|
|
|
|
|
|
std::auto_ptr<ISubtree> extractSchemaTree();
|
|
|
|
std::auto_ptr<ISubtree> extractTemplatesTree();
|
2003-03-19 09:20:19 -06:00
|
|
|
std::auto_ptr<INode> extractTemplateNode(OUString const & _aTemplateName);
|
2002-05-16 04:57:32 -05:00
|
|
|
private:
|
|
|
|
std::auto_ptr<ISubtree> m_pSchemaTree;
|
|
|
|
std::auto_ptr<ISubtree> m_pTemplatesTree;
|
|
|
|
|
|
|
|
};
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
} // namespace backend
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
} // namespace configmgr
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|