LCOV - code coverage report
Current view: top level - rsc/inc - rsclex.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 17 17 100.0 %
Date: 2014-11-03 Functions: 8 8 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 INCLUDED_RSC_INC_RSCLEX_HXX
      21             : #define INCLUDED_RSC_INC_RSCLEX_HXX
      22             : 
      23             : #include <boost/unordered_set.hpp>
      24             : #include <rtl/strbuf.hxx>
      25             : #include <rtl/string.hxx>
      26             : 
      27             : // a buffer for unique strings
      28             : class StringContainer
      29             : {
      30             :     boost::unordered_set< OString, OStringHash >      m_aStrings;
      31             : public:
      32         475 :     StringContainer() {}
      33         475 :     ~StringContainer() {}
      34             : 
      35             :     const char* putString( const char* pString );
      36             : };
      37             : 
      38             : 
      39             : enum MODE_ENUM { MODE_MODELESS, MODE_APPLICATIONMODAL, MODE_SYSTEMMODAL };
      40             : 
      41             : enum JUSTIFY_ENUM { JUST_CENTER, JUST_RIGHT, JUST_LEFT };
      42             : 
      43             : enum SHOW_ENUM { SHOW_NORMAL, SHOW_MINIMIZED, SHOW_MAXIMIZED };
      44             : 
      45             : enum ENUMHEADER { HEADER_NAME, HEADER_NUMBER };
      46             : 
      47             : enum REF_ENUM { TYPE_NOTHING, TYPE_REF, TYPE_COPY };
      48             : 
      49             : struct RSCHEADER {
      50             :     RscTop *    pClass;
      51             :     RscExpType  nName1;
      52             :     REF_ENUM    nTyp;
      53             :     RscTop *    pRefClass;
      54             :     RscExpType  nName2;
      55             : };
      56             : 
      57             : /************** O b j e c t s t a c k ************************************/
      58             : struct Node
      59             : {
      60             :     Node*   pPrev;
      61             :     RSCINST aInst;
      62             :     sal_uInt32  nTupelRec;  // Rekursionstiefe fuer Tupel
      63      128769 :     Node() { pPrev = NULL; nTupelRec = 0; }
      64             : };
      65             : 
      66             : class ObjectStack
      67             : {
      68             :     private :
      69             :         Node* pRoot;
      70             :     public :
      71             : 
      72         419 :         ObjectStack ()   { pRoot = NULL; }
      73             : 
      74      439965 :         const RSCINST & Top  ()     { return pRoot->aInst; }
      75       41791 :         bool        IsEmpty()   { return( pRoot == NULL ); }
      76             :         void        IncTupelRec() { pRoot->nTupelRec++; }
      77             :         void        DecTupelRec() { pRoot->nTupelRec--; }
      78             :         sal_uInt32  TupelRecCount() const { return pRoot->nTupelRec; }
      79      128769 :         void        Push( RSCINST aInst )
      80             :                     {
      81             :                         Node* pTmp;
      82             : 
      83      128769 :                         pTmp         = pRoot;
      84      128769 :                         pRoot        = new Node;
      85      128769 :                         pRoot->aInst = aInst;
      86      128769 :                         pRoot->pPrev = pTmp;
      87      128769 :                     }
      88      128769 :         void        Pop()
      89             :                     {
      90             :                        Node* pTmp;
      91             : 
      92      128769 :                        pTmp  = pRoot;
      93      128769 :                        pRoot = pTmp->pPrev;
      94      128769 :                        delete pTmp;
      95      128769 :                     }
      96             : };
      97             : 
      98             : /****************** F o r w a r d s **************************************/
      99             : #if defined ( SOLARIS )
     100             : extern "C" int yyparse();   // forward Deklaration fuer erzeugte Funktion
     101             : extern "C" void yyerror( const char * );
     102             : extern "C" int  yylex( void );
     103             : #else
     104             : int yyparse();              // forward Deklaration fuer erzeugte Funktion
     105             : void yyerror( char * );
     106             : int  yylex( void );
     107             : #endif
     108             : 
     109             : class RscTypCont;
     110             : class RscFileInst;
     111             : 
     112             : extern RscTypCont*              pTC;
     113             : extern RscFileInst *            pFI;
     114             : extern RscExpression *          pExp;
     115             : extern ObjectStack              S;
     116             : extern StringContainer*         pStringContainer;
     117             : 
     118             : #endif // INCLUDED_RSC_INC_RSCLEX_HXX
     119             : 
     120             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10