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