LCOV - code coverage report
Current view: top level - slideshow/source/inc - doctreenodesupplier.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 2 0.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_SLIDESHOW_SOURCE_INC_DOCTREENODESUPPLIER_HXX
      21             : #define INCLUDED_SLIDESHOW_SOURCE_INC_DOCTREENODESUPPLIER_HXX
      22             : 
      23             : #include "doctreenode.hxx"
      24             : 
      25             : 
      26             : /* Definition of DocTreeNodeSupplier interface */
      27             : 
      28             : namespace slideshow
      29             : {
      30             :     namespace internal
      31             :     {
      32             :         /** Interface to retrieve DocTreeNodes from subsettable
      33             :             shapes.
      34             : 
      35             :             Shapes which implement the AttributableShape interface
      36             :             also provides this interface, providing methods to
      37             :             retrieve specific DocTreeNode objects from the shape. The
      38             :             methods mainly distinguish various ways on how to specify
      39             :             the actual DocTreeNode to return.
      40             : 
      41             :             If a requested DocTreeNode is not available when one of
      42             :             the methods below is called, an empty DocTreeNode will be
      43             :             returned (the predicate DocTreeNode::isEmpty() will return
      44             :             true). If, on the other hand, the shape cannot determine,
      45             :             for internal reasons, the internal tree node structure,
      46             :             all those methods will throw an
      47             :             ShapeLoadFailedException. This is, in fact, a delayed error
      48             :             that could also have been reported during shape
      49             :             construction, but might be postponed until the missing
      50             :             information is actually requested.
      51             :          */
      52           0 :         class DocTreeNodeSupplier
      53             :         {
      54             :         public:
      55             :             /** Query number of tree nodes of the given type this
      56             :                 shape contains.
      57             : 
      58             :                 The value returned by this method minus one is the
      59             :                 maximum value permissible at the getTreeNode()
      60             :                 method, for the given node type.
      61             : 
      62             :                 @throws ShapeLoadFailedException, if tree node structure
      63             :                 cannot be determined.
      64             :              */
      65             :             virtual sal_Int32 getNumberOfTreeNodes( DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
      66             : 
      67             :             /** Create DocTreeNode from shape.
      68             : 
      69             :                 This method creates a DocTreeNode from a shape, a
      70             :                 given node type and a running index into the shape's
      71             :                 DocTreeNodes of the given type.
      72             : 
      73             :                 @param nNodeIndex
      74             :                 Starting with 0, every DocTreeNode of the shape that
      75             :                 has type eNodeType is indexed. The DocTreeNode whose
      76             :                 index equals nNodeIndex will be returned.
      77             : 
      78             :                 @param eNodeType
      79             :                 Type of the node to return
      80             : 
      81             :                 @return the DocTreeNode found, or the empty
      82             :                 DocTreeNode, if nothing was found.
      83             : 
      84             :                 @throws ShapeLoadFailedException, if tree node structure
      85             :                 cannot be determined.
      86             :             */
      87             :             virtual DocTreeNode getTreeNode( sal_Int32              nNodeIndex,
      88             :                                              DocTreeNode::NodeType  eNodeType ) const = 0; // throw ShapeLoadFailedException;
      89             : 
      90             :             /** Query number of tree nodes of the given type this
      91             :                 subset contains.
      92             : 
      93             :                 The value returned by this method minus one is the
      94             :                 maximum value permissible at the
      95             :                 getSubsetTreeNode() method, for the given node
      96             :                 type.
      97             : 
      98             :                 @param rParentNode
      99             :                 The parent node, below which the number of tree nodes
     100             :                 of the given type shall be counted.
     101             : 
     102             :                 @param eNodeType
     103             :                 Node type to count.
     104             : 
     105             :                 @throws ShapeLoadFailedException, if tree node structure
     106             :                 cannot be determined.
     107             :              */
     108             :             virtual sal_Int32 getNumberOfSubsetTreeNodes( const DocTreeNode&    rParentNode,
     109             :                                                           DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
     110             : 
     111             :             /** Create DocTreeNode from shape subset.
     112             : 
     113             :                 This method creates a DocTreeNode from a shape, a
     114             :                 parent tree node, a given node type and a running
     115             :                 index into the shape's DocTreeNodes of the given type.
     116             : 
     117             :                 @param rParentNode
     118             :                 Parent node, below which the tree node with the given
     119             :                 type shall be selected.
     120             : 
     121             :                 @param nNodeIndex
     122             :                 Starting with 0, every DocTreeNode of the shape that
     123             :                 has type eNodeType is indexed. The DocTreeNode whose
     124             :                 index equals nNodeIndex will be returned.
     125             : 
     126             :                 @param eNodeType
     127             :                 Type of the node to return
     128             : 
     129             :                 @return the DocTreeNode found, or the empty
     130             :                 DocTreeNode, if nothing was found.
     131             : 
     132             :                 @throws ShapeLoadFailedException, if tree node structure
     133             :                 cannot be determined.
     134             :             */
     135             :             virtual DocTreeNode getSubsetTreeNode( const DocTreeNode&       rParentNode,
     136             :                                                    sal_Int32                nNodeIndex,
     137             :                                                    DocTreeNode::NodeType    eNodeType ) const = 0; // throw ShapeLoadFailedException;
     138             : 
     139             :         protected:
     140           0 :             ~DocTreeNodeSupplier() {}
     141             :         };
     142             : 
     143             :     }
     144             : }
     145             : 
     146             : #endif // INCLUDED_SLIDESHOW_SOURCE_INC_DOCTREENODESUPPLIER_HXX
     147             : 
     148             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11