LCOV - code coverage report
Current view: top level - configmgr/source - node.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 25 28 89.3 %
Date: 2014-04-11 Functions: 11 14 78.6 %
Legend: Lines: hit not hit

          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       17343 : OUString Node::getTemplateName() const {
      44       17343 :     return OUString();
      45             : }
      46             : 
      47       81234 : void Node::setMandatory(int layer) {
      48             :     (void) layer; // avoid warnings
      49             :     assert(layer == Data::NO_LAYER);
      50       81234 : }
      51             : 
      52       81234 : int Node::getMandatory() const {
      53       81234 :     return Data::NO_LAYER;
      54             : }
      55             : 
      56     3367325 : void Node::setLayer(int layer) {
      57             :     assert(layer >= layer_);
      58     3367325 :     layer_ = layer;
      59     3367325 : }
      60             : 
      61     4429338 : int Node::getLayer() const {
      62     4429338 :     return layer_;
      63             : }
      64             : 
      65     4397053 : void Node::setFinalized(int layer) {
      66     4397053 :     finalized_ = layer;
      67     4397053 : }
      68             : 
      69     4269596 : int Node::getFinalized() const {
      70     4269596 :     return finalized_;
      71             : }
      72             : 
      73     7581131 : rtl::Reference< Node > Node::getMember(OUString const & name) {
      74     7581131 :     NodeMap const & members = getMembers();
      75     7581131 :     NodeMap::const_iterator i(members.find(name));
      76     7581131 :     return i == members.end() ? rtl::Reference< Node >() : i->second;
      77             : }
      78             : 
      79     1670658 : Node::Node(int layer): layer_(layer), finalized_(Data::NO_LAYER) {}
      80             : 
      81     6731306 : Node::Node(const Node & other):
      82     6731306 :     SimpleReferenceObject(), layer_(other.layer_), finalized_(other.finalized_)
      83     6731306 : {}
      84             : 
      85     8342235 : Node::~Node() {}
      86             : 
      87           0 : void Node::clear() {}
      88             : 
      89             : }
      90             : 
      91             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10