LCOV - code coverage report
Current view: top level - libreoffice/autodoc/inc/ary - entity.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 7 100.0 %
Date: 2012-12-27 Functions: 4 5 80.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_ENTITY_HXX
      21             : #define ARY_ENTITY_HXX
      22             : 
      23             : // BASE CLASSES
      24             : #include <ary/object.hxx>
      25             : 
      26             : 
      27             : 
      28             : 
      29             : namespace ary
      30             : {
      31             : 
      32             : 
      33             : /** Interface for every class, whose objects are searchable within the
      34             :     Autodoc Repository by an id.
      35             : 
      36             :     @todo
      37             :     Possibly make ->Set_Id() less public accessible.
      38             : */
      39             : class Entity : public Object
      40             : {
      41             :   public:
      42       23223 :     virtual             ~Entity() {}
      43             : 
      44             :     Rid                 Id() const;
      45             : 
      46             :     /// @attention Must be used only by ->ary::stg::Storage<>
      47             :     void                Set_Id(
      48             :                             Rid                 i_nId );
      49             :   protected:
      50       28318 :                         Entity()      : nId(0) {}
      51             :   private:
      52             :     // DATA
      53             :     Rid                 nId;
      54             : };
      55             : 
      56             : 
      57             : inline Rid
      58      194584 : Entity::Id() const
      59             : {
      60      194584 :     return nId;
      61             : }
      62             : 
      63             : inline void
      64       28318 : Entity::Set_Id(Rid i_nId)
      65             : {
      66       28318 :     nId = i_nId;
      67       28318 : }
      68             : 
      69             : 
      70             : 
      71             : 
      72             : }   // namespace ary
      73             : #endif
      74             : 
      75             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10