lib

elementvisitor.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Ulrich Kuettler <ulrich.kuettler@gmx.de>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef ELEMENTVISITOR_H
21#define ELEMENTVISITOR_H
22
23#include "kformuladefs.h"
24
25KFORMULA_NAMESPACE_BEGIN
26
27class BasicElement;
28class BracketElement;
29class EmptyElement;
30class FractionElement;
31class IndexElement;
32class MatrixElement;
34class NameSequence;
35class OverlineElement;
36class RootElement;
37class SequenceElement;
38class SpaceElement;
39class SymbolElement;
40class TextElement;
42
43
48public:
49
50 virtual ~ElementVisitor() {}
51
52 virtual bool visit( BracketElement* ) { return true; }
53 virtual bool visit( EmptyElement* ) { return true; }
54 virtual bool visit( FractionElement* ) { return true; }
55 virtual bool visit( IndexElement* ) { return true; }
56 virtual bool visit( MatrixElement* ) { return true; }
57 virtual bool visit( MultilineElement* ) { return true; }
58 virtual bool visit( NameSequence* ) { return true; }
59 virtual bool visit( OverlineElement* ) { return true; }
60 virtual bool visit( RootElement* ) { return true; }
61 virtual bool visit( SequenceElement* ) { return true; }
62 virtual bool visit( SpaceElement* ) { return true; }
63 virtual bool visit( SymbolElement* ) { return true; }
64 virtual bool visit( TextElement* ) { return true; }
65 virtual bool visit( UnderlineElement* ) { return true; }
66};
67
68KFORMULA_NAMESPACE_END
69
70#endif // ELEMENTVISITOR_H
Basis of every formula element.
A left and/or right bracket around one child.
An element that represents an empty box.
The element with up to four indexes in the four corners.
Any number of lines.
The sequence thats a name.
A line above the content.
A nice graphical root.
Definition rootelement.h:35
The element that contains a number of children.
A element that represents a space.
A symbol is simply a piece of art.
An element that represents one char.
Definition textelement.h:37
A line below the content.