xref: /AOO41X/main/autodoc/source/display/html/cre_link.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 
28 #ifndef ADC_DISPLAY_CRE_LINK_HXX
29 #define ADC_DISPLAY_CRE_LINK_HXX
30 
31 
32 // USED SERVICES
33 	// BASE CLASSES
34 #include <cosv/tpl/processor.hxx>
35 	// COMPONENTS
36 	// PARAMETERS
37 
38 namespace ary
39 {
40 namespace cpp
41 {
42  	class CodeEntity;
43     class Namespace;
44     class Class;
45     class Enum;
46     class Typedef;
47     class Function;
48     class Variable;
49     class EnumValue;
50     class Define;
51     class Macro;
52 }
53 }
54 
55 
56 class OuputPage_Environment;
57 
58 
59 
60 /** Displays links to ->{ary::cpp::CodeEntity CodeEntites}.
61 */
62 class LinkCreator : public csv::ProcessorIfc,
63                     public csv::ConstProcessor<ary::cpp::Namespace>,
64                     public csv::ConstProcessor<ary::cpp::Class>,
65                     public csv::ConstProcessor<ary::cpp::Enum>,
66                     public csv::ConstProcessor<ary::cpp::Typedef>,
67                     public csv::ConstProcessor<ary::cpp::Function>,
68                     public csv::ConstProcessor<ary::cpp::Variable>,
69                     public csv::ConstProcessor<ary::cpp::EnumValue>,
70                     public csv::ConstProcessor<ary::cpp::Define>,
71                     public csv::ConstProcessor<ary::cpp::Macro>
72 {
73   public:
74                         LinkCreator(
75                             char *              o_rOutput,
76                             uintt               i_nOutputSize );
77                         ~LinkCreator();
78 
79 
80     void                SetEnv(
81                             const OuputPage_Environment &
82                                                 i_rEnv );
83   private:
84     void                Create_PrePath(
85                             const ary::cpp::CodeEntity &
86                                                 i_rData );
87     // Interface csv::ConstProcessor<>
88     virtual void        do_Process(
89                             const ary::cpp::Namespace &
90                                                 i_rData );
91     virtual void        do_Process(
92                             const ary::cpp::Class &
93                                                 i_rData );
94     virtual void        do_Process(
95                             const ary::cpp::Enum &
96                                                 i_rData );
97     virtual void        do_Process(
98                             const ary::cpp::Typedef &
99                                                 i_rData );
100     virtual void        do_Process(
101                             const ary::cpp::Function &
102                                                 i_rData );
103 	virtual void        do_Process(
104                             const ary::cpp::Variable &
105                                                 i_rData );
106     virtual void        do_Process(
107                             const ary::cpp::EnumValue &
108                                                 i_rData );
109 	virtual void        do_Process(
110 							const ary::cpp::Define &
111                                                 i_rData );
112 	virtual void        do_Process(
113 							const ary::cpp::Macro &
114                                                 i_rData );
115 	// DATA
116     char *              pOut;
117     uintt               nOutMaxSize;
118     const OuputPage_Environment *
119                         pEnv;
120 };
121 
122 
123 
124 
125 // IMPLEMENTATION
126 inline void
127 LinkCreator::SetEnv( const OuputPage_Environment & i_rEnv )
128     { pEnv = &i_rEnv; }
129 
130 
131 
132 
133 #endif
134