2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 21:00:32 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2009-09-08 14:59:07 +02:00
|
|
|
#ifndef INCLUDED_CONFIGMGR_SOURCE_NODE_HXX
|
|
|
|
#define INCLUDED_CONFIGMGR_SOURCE_NODE_HXX
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2014-05-28 15:24:46 +02:00
|
|
|
#include <sal/config.h>
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2014-05-28 15:24:46 +02:00
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
#include <salhelper/simplereferenceobject.hxx>
|
2009-05-15 14:06:56 +02:00
|
|
|
|
|
|
|
namespace configmgr {
|
|
|
|
|
2014-06-26 14:24:20 +01:00
|
|
|
class NodeMap;
|
|
|
|
|
2009-05-19 10:49:37 +02:00
|
|
|
class Node: public salhelper::SimpleReferenceObject {
|
2009-05-15 14:06:56 +02:00
|
|
|
public:
|
2009-09-04 11:24:45 +02:00
|
|
|
enum Kind {
|
|
|
|
KIND_PROPERTY, KIND_LOCALIZED_PROPERTY, KIND_LOCALIZED_VALUE,
|
2011-12-13 12:37:00 +01:00
|
|
|
KIND_GROUP, KIND_SET, KIND_ROOT };
|
2009-09-04 11:24:45 +02:00
|
|
|
|
|
|
|
virtual Kind kind() const = 0;
|
|
|
|
|
2010-05-11 09:29:37 +02:00
|
|
|
virtual rtl::Reference< Node > clone(bool keepTemplateName) const = 0;
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2011-12-13 22:16:31 +01:00
|
|
|
virtual NodeMap & getMembers();
|
2012-12-10 23:06:10 +02:00
|
|
|
virtual OUString getTemplateName() const;
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2009-07-28 15:30:19 +02:00
|
|
|
virtual void setMandatory(int layer);
|
|
|
|
virtual int getMandatory() const;
|
2009-07-27 14:34:10 +02:00
|
|
|
|
2009-07-23 12:42:37 +02:00
|
|
|
void setLayer(int layer);
|
2014-06-09 10:09:42 +02:00
|
|
|
int getLayer() const { return layer_;}
|
2009-07-23 12:42:37 +02:00
|
|
|
|
2009-07-29 15:30:40 +02:00
|
|
|
void setFinalized(int layer);
|
2014-06-09 10:09:42 +02:00
|
|
|
int getFinalized() const { return finalized_;}
|
2009-07-29 15:30:40 +02:00
|
|
|
|
2012-12-10 23:06:10 +02:00
|
|
|
rtl::Reference< Node > getMember(OUString const & name);
|
2009-07-22 14:41:57 +02:00
|
|
|
|
2009-05-19 10:49:37 +02:00
|
|
|
protected:
|
2009-07-23 12:42:37 +02:00
|
|
|
explicit Node(int layer);
|
2015-09-07 09:12:55 +01:00
|
|
|
explicit Node(const Node & other);
|
2009-07-29 15:30:40 +02:00
|
|
|
|
2009-07-23 12:42:37 +02:00
|
|
|
virtual ~Node();
|
|
|
|
|
2009-07-22 14:41:57 +02:00
|
|
|
int layer_;
|
2009-07-29 15:30:40 +02:00
|
|
|
int finalized_;
|
2009-05-15 14:06:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|