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

Generated by: LCOV version 1.10