merge the formfield patch from ooo-build
[ooovba.git] / sdext / source / pdfimport / tree / treevisiting.hxx
blobe88a25fe6ca71f289e96126969451b8d114f614f
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: treevisiting.hxx,v $
11 * $Revision: 1.2 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef INCLUDED_PDFI_TREEVISITING_HXX
33 #define INCLUDED_PDFI_TREEVISITING_HXX
35 #include <sal/config.h>
36 #include <list>
39 namespace pdfi
41 class PDFIProcessor;
42 class StyleContainer;
43 struct HyperlinkElement;
44 struct TextElement;
45 struct ParagraphElement;
46 struct FrameElement;
47 struct PolyPolyElement;
48 struct ImageElement;
49 struct PageElement;
50 struct DocumentElement;
51 struct EmitContext;
52 struct Element;
54 /** To be visited by all tree element types
56 Visitor interface from the "visitor pattern". Implementor gets
57 called with actual tree node instances.
59 struct ElementTreeVisitor
61 virtual void visit( HyperlinkElement&, const std::list< Element* >::const_iterator& ) = 0;
62 virtual void visit( TextElement&, const std::list< Element* >::const_iterator& ) = 0;
63 virtual void visit( ParagraphElement&, const std::list< Element* >::const_iterator& ) = 0;
64 virtual void visit( FrameElement&, const std::list< Element* >::const_iterator& ) = 0;
65 virtual void visit( PolyPolyElement&, const std::list< Element* >::const_iterator& ) = 0;
66 virtual void visit( ImageElement&, const std::list< Element* >::const_iterator& ) = 0;
67 virtual void visit( PageElement&, const std::list< Element* >::const_iterator& ) = 0;
68 virtual void visit( DocumentElement&, const std::list< Element* >::const_iterator& ) = 0;
70 typedef boost::shared_ptr<ElementTreeVisitor> ElementTreeVisitorSharedPtr;
72 /** Visitee interface
74 To be implemented by every tree node that needs to be
75 visitable.
77 struct ElementTreeVisitable
79 virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& rParentIt ) = 0;
81 typedef boost::shared_ptr<ElementTreeVisitable> ElementTreeVisitableSharedPtr;
84 #endif