LCOV - code coverage report
Current view: top level - libreoffice/autodoc/inc/ary/idl - i_namelookup.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2012-12-27 Functions: 1 1 100.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 ARY_IDL_I_NAMELOOKUP_HXX
      21             : #define ARY_IDL_I_NAMELOOKUP_HXX
      22             : 
      23             : // BASE CLASSES
      24             : #include <ary/idl/i_types4idl.hxx>
      25             : 
      26             : // USED SERVICES
      27             : #include <ary/stdconstiter.hxx>
      28             : #include <vector>
      29             : #include <map>
      30             : 
      31             : 
      32             : 
      33             : 
      34             : namespace ary
      35             : {
      36             : namespace idl
      37             : {
      38             : 
      39             : 
      40             : /** This class finds all occurrences in the current language of a
      41             :     name in the repository.
      42             : */
      43             : class NameLookup
      44             : {
      45             :   public:
      46             :     struct NameProperties
      47             :     {
      48             :                             NameProperties()
      49             :                                 :   nId(0),
      50             :                                     nClass(0),
      51             :                                     nOwner(0) {}
      52       19526 :                             NameProperties(
      53             :                                 Ce_id               i_id,
      54             :                                 ClassId             i_class,
      55             :                                 Ce_id               i_owner )
      56             :                                 :   nId(i_id),
      57             :                                     nClass(i_class),
      58       19526 :                                     nOwner(i_owner) {}
      59             :         Ce_id               nId;
      60             :         ClassId             nClass;
      61             :         Ce_id               nOwner;
      62             :     };
      63             : 
      64             :     /// Map from Name to NameProperties.
      65             :     typedef std::multimap<String, NameProperties>   Map_Names;
      66             : 
      67             :     // LIFECYCLE
      68             :                         NameLookup();
      69             :                         ~NameLookup();
      70             :     // OPERATIONS
      71             :     void                Add_Name(
      72             :                             const String &      i_name,
      73             :                             Ce_id               i_id,
      74             :                             ClassId             i_class,
      75             :                             Ce_id               i_owner );
      76             :   private:
      77             :     // DATA
      78             :     Map_Names           aNames;
      79             : };
      80             : 
      81             : 
      82             : 
      83             : 
      84             : }   // namespace idl
      85             : }   // namespace ary
      86             : #endif
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10