Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include "sal/config.h"
21 :
22 : #include <cassert>
23 :
24 : #include "com/sun/star/uno/Reference.hxx"
25 : #include "com/sun/star/uno/RuntimeException.hpp"
26 : #include "com/sun/star/uno/XInterface.hpp"
27 : #include "rtl/ref.hxx"
28 : #include "rtl/ustring.h"
29 : #include "rtl/ustring.hxx"
30 :
31 : #include "data.hxx"
32 : #include "node.hxx"
33 : #include "nodemap.hxx"
34 :
35 : namespace configmgr {
36 :
37 0 : NodeMap & Node::getMembers() {
38 : assert(false);
39 : throw css::uno::RuntimeException(
40 0 : "this cannot happen", css::uno::Reference< css::uno::XInterface >());
41 : }
42 :
43 0 : OUString Node::getTemplateName() const {
44 0 : return OUString();
45 : }
46 :
47 0 : void Node::setMandatory(int layer) {
48 : (void) layer; // avoid warnings
49 : assert(layer == Data::NO_LAYER);
50 0 : }
51 :
52 0 : int Node::getMandatory() const {
53 0 : return Data::NO_LAYER;
54 : }
55 :
56 0 : void Node::setLayer(int layer) {
57 : assert(layer >= layer_);
58 0 : layer_ = layer;
59 0 : }
60 :
61 0 : int Node::getLayer() const {
62 0 : return layer_;
63 : }
64 :
65 0 : void Node::setFinalized(int layer) {
66 0 : finalized_ = layer;
67 0 : }
68 :
69 0 : int Node::getFinalized() const {
70 0 : return finalized_;
71 : }
72 :
73 0 : rtl::Reference< Node > Node::getMember(OUString const & name) {
74 0 : NodeMap const & members = getMembers();
75 0 : NodeMap::const_iterator i(members.find(name));
76 0 : return i == members.end() ? rtl::Reference< Node >() : i->second;
77 : }
78 :
79 0 : Node::Node(int layer): layer_(layer), finalized_(Data::NO_LAYER) {}
80 :
81 0 : Node::Node(const Node & other):
82 0 : SimpleReferenceObject(), layer_(other.layer_), finalized_(other.finalized_)
83 0 : {}
84 :
85 0 : Node::~Node() {}
86 :
87 0 : void Node::clear() {}
88 :
89 : }
90 :
91 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|