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

Generated by: LCOV version 1.11