LCOV - code coverage report
Current view: top level - configmgr/source - data.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 2 50.0 %
Date: 2014-11-03 Functions: 1 4 25.0 %
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             : #ifndef INCLUDED_CONFIGMGR_SOURCE_DATA_HXX
      21             : #define INCLUDED_CONFIGMGR_SOURCE_DATA_HXX
      22             : 
      23             : #include <sal/config.h>
      24             : 
      25             : #include <climits>
      26             : #include "config_map.hxx"
      27             : #include <vector>
      28             : 
      29             : #include <boost/noncopyable.hpp>
      30             : #include <rtl/ref.hxx>
      31             : #include <rtl/ustring.hxx>
      32             : #include <sal/types.h>
      33             : #include <salhelper/simplereferenceobject.hxx>
      34             : 
      35             : #include "additions.hxx"
      36             : #include "modifications.hxx"
      37             : #include "nodemap.hxx"
      38             : #include "path.hxx"
      39             : 
      40             : namespace configmgr {
      41             : 
      42             : class Node;
      43             : 
      44         381 : struct Data: private boost::noncopyable {
      45             :     enum { NO_LAYER = INT_MAX };
      46             : 
      47           0 :     struct ExtensionXcu: public salhelper::SimpleReferenceObject {
      48             :         int layer;
      49             :         Additions additions;
      50             :     };
      51             : 
      52             :     NodeMap templates;
      53             : 
      54             :     Modifications modifications;
      55             : 
      56             :     static OUString createSegment(
      57             :         OUString const & templateName, OUString const & name);
      58             : 
      59             :     static sal_Int32 parseSegment(
      60             :         OUString const & path, sal_Int32 index, OUString * name,
      61             :         bool * setElement, OUString * templateName);
      62             : 
      63             :     static OUString fullTemplateName(
      64             :         OUString const & component, OUString const & name);
      65             : 
      66             :     //TODO: better rules under which circumstances a short template name matches
      67             :     static bool equalTemplateNames(
      68             :         OUString const & shortName, OUString const & longName);
      69             : 
      70             :     Data();
      71             : 
      72             :     rtl::Reference< Node > resolvePathRepresentation(
      73             :         OUString const & pathRepresentation,
      74             :         OUString * canonicRepresenation, Path * path, int * finalizedLayer)
      75             :         const;
      76             : 
      77             :     rtl::Reference< Node > getTemplate(
      78             :         int layer, OUString const & fullName) const;
      79             : 
      80             :     NodeMap & getComponents() const;
      81             : 
      82             :     Additions * addExtensionXcuAdditions(
      83             :         OUString const & url, int layer);
      84             : 
      85             :     rtl::Reference< ExtensionXcu > removeExtensionXcuAdditions(
      86             :         OUString const & url);
      87             : 
      88             : private:
      89             :     typedef config_map< rtl::Reference< ExtensionXcu > >
      90             :         ExtensionXcuAdditions;
      91             : 
      92             :     rtl::Reference< Node > root_;
      93             : 
      94             :     ExtensionXcuAdditions extensionXcuAdditions_;
      95             : };
      96             : 
      97             : }
      98             : 
      99             : #endif
     100             : 
     101             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10