LCOV - code coverage report
Current view: top level - idlc/inc/idlc - fehelper.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 15 15 100.0 %
Date: 2014-04-11 Functions: 7 7 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             : #ifndef _IDLC_FEHELPER_HXX_
      20             : #define _IDLC_FEHELPER_HXX_
      21             : 
      22             : #include <idlc/asttype.hxx>
      23             : #include <idlc/astinterface.hxx>
      24             : 
      25             : #include <vector>
      26             : 
      27             : class FeDeclarator
      28             : {
      29             : public:
      30             :     // Enum to denote types of declarators
      31             :     enum DeclaratorType
      32             :     {
      33             :         FD_simple,      // Simple declarator
      34             :         FD_complex      // Complex declarator (complex_part field used)
      35             :     };
      36             : 
      37             :     FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart);
      38             :     virtual ~FeDeclarator();
      39             : 
      40             :     AstDeclaration* getComplexPart()
      41             :         { return m_pComplexPart; }
      42         222 :     const OString& getName()
      43         222 :         { return m_name; }
      44             :     DeclaratorType  getDeclType()
      45             :         { return m_declType; }
      46             : 
      47             :     bool checkType(AstDeclaration const * pType);
      48             :     AstType const * compose(AstDeclaration const * pDecl);
      49             : private:
      50             :     AstDeclaration* m_pComplexPart;
      51             :     OString  m_name;
      52             :     DeclaratorType  m_declType;
      53             : };
      54             : 
      55             : typedef ::std::list< FeDeclarator* > FeDeclList;
      56             : 
      57             : class FeInheritanceHeader
      58             : {
      59             : public:
      60             :     FeInheritanceHeader(
      61             :         NodeType nodeType, OString* pName, OString* pInherits,
      62             :         std::vector< OString > * typeParameters);
      63             : 
      64         820 :     virtual ~FeInheritanceHeader()
      65         820 :     {
      66         410 :         if ( m_pName )
      67         410 :             delete m_pName;
      68         820 :      }
      69             : 
      70          40 :     NodeType getNodeType()
      71          40 :         { return m_nodeType; }
      72         413 :     OString* getName()
      73         413 :         { return m_pName; }
      74         410 :     AstDeclaration* getInherits()
      75         410 :         { return m_pInherits; }
      76             : 
      77         130 :     std::vector< OString > const & getTypeParameters() const
      78         130 :     { return m_typeParameters; }
      79             : 
      80             : private:
      81             :     void initializeInherits(OString* pinherits);
      82             : 
      83             :     NodeType        m_nodeType;
      84             :     OString* m_pName;
      85             :     AstDeclaration* m_pInherits;
      86             :     std::vector< OString > m_typeParameters;
      87             : };
      88             : 
      89             : #endif // _IDLC_FEHELPER_HXX_
      90             : 
      91             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10