merged tag ooo/DEV300_m102
[LibreOffice.git] / hwpfilter / source / nodes.h
blob681af19cf30205dab9a8e37c35fb7690f0a6d0ca
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __NODES_H__
29 #define __NODES_H__
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include "list.hxx"
35 enum IDLIST {
36 ID_MATHML,
37 ID_LINES,
38 ID_LINE,
39 ID_EXPRLIST,
40 ID_EXPR,
41 ID_BEGIN,
42 ID_END,
43 ID_LEFT,
44 ID_RIGHT,
45 ID_SUBEXPR,
46 ID_SUPEXPR,
47 ID_SUBSUPEXPR,
48 ID_FRACTIONEXPR,
49 ID_OVER,
50 ID_DECORATIONEXPR,
51 ID_SQRTEXPR,
52 ID_ROOTEXPR,
53 ID_ARROWEXPR,
54 ID_ACCENTEXPR,
55 ID_UNARYEXPR,
56 ID_PRIMARYEXPR,
57 ID_BRACKET,
58 ID_BLOCK,
59 ID_PARENTH,
60 ID_FENCE,
61 ID_ABS,
62 ID_IDENTIFIER,
63 ID_STRING,
64 ID_CHARACTER,
65 ID_NUMBER,
66 ID_OPERATOR,
67 ID_SPACE,
68 ID_DELIMETER
71 class Node{
72 public:
73 Node(int _id) : id(_id)
75 value = 0L;
76 child = 0L;
77 next = 0L;
78 #ifdef NODE_DEBUG
79 count++;
80 printf("Node count : [%d]\n",count);
81 #endif
83 ~Node()
85 if( value ) free( value );
86 // if( child ) delete child;
87 // if( next ) delete next;
88 next = 0L;
89 child = 0L;
90 #ifdef NODE_DEBUG
91 count--;
92 printf("Node count : [%d]\n",count);
93 #endif
95 void print(){
97 public:
98 static int count; /* For memory debugging */
99 int id;
100 char *value;
101 Node *child;
102 Node *next;
105 //static LinkedList<Node> nodelist;
107 #endif