LCOV - code coverage report
Current view: top level - libreoffice/hwpfilter/source - nodes.h (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 10 0.0 %
Date: 2012-12-27 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 __NODES_H__
      21             : #define __NODES_H__
      22             : 
      23             : #include <stdio.h>
      24             : #include <stdlib.h>
      25             : #include "list.hxx"
      26             : 
      27             : enum IDLIST {
      28             :      ID_MATHML,
      29             :      ID_LINES,
      30             :      ID_LINE,
      31             :      ID_EXPRLIST,
      32             :      ID_EXPR,
      33             :      ID_BEGIN,
      34             :      ID_END,
      35             :      ID_LEFT,
      36             :      ID_RIGHT,
      37             :      ID_SUBEXPR,
      38             :      ID_SUPEXPR,
      39             :      ID_SUBSUPEXPR,
      40             :      ID_FRACTIONEXPR,
      41             :      ID_OVER,
      42             :      ID_DECORATIONEXPR,
      43             :      ID_SQRTEXPR,
      44             :      ID_ROOTEXPR,
      45             :      ID_ARROWEXPR,
      46             :      ID_ACCENTEXPR,
      47             :      ID_UNARYEXPR,
      48             :      ID_PRIMARYEXPR,
      49             :      ID_BRACKET,
      50             :      ID_BLOCK,
      51             :      ID_PARENTH,
      52             :      ID_FENCE,
      53             :      ID_ABS,
      54             :      ID_IDENTIFIER,
      55             :      ID_STRING,
      56             :      ID_CHARACTER,
      57             :      ID_NUMBER,
      58             :      ID_OPERATOR,
      59             :      ID_SPACE,
      60             :      ID_DELIMETER
      61             : };
      62             : 
      63             : class Node{
      64             : public:
      65           0 :      Node(int _id) : id(_id)
      66             :      {
      67           0 :           value = 0L;
      68           0 :           child = 0L;
      69           0 :           next = 0L;
      70             : #ifdef NODE_DEBUG
      71             :           count++;
      72             :           printf("Node count : [%d]\n",count);
      73             : #endif
      74           0 :      }
      75           0 :      ~Node()
      76             :      {
      77           0 :           if( value ) free( value );
      78             :          // if( child ) delete child;
      79             :          // if( next ) delete next;
      80           0 :           next = 0L;
      81           0 :           child = 0L;
      82             : #ifdef NODE_DEBUG
      83             :           count--;
      84             :           printf("Node count : [%d]\n",count);
      85             : #endif
      86           0 :      }
      87             :      void print(){
      88             :      }
      89             : public:
      90             :      static int count; /* For memory debugging */
      91             :      int id;
      92             :      char *value;
      93             :      Node *child;
      94             :      Node *next;
      95             : };
      96             : 
      97             : //static LinkedList<Node> nodelist;
      98             : 
      99             : #endif
     100             : 
     101             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10