Update ooo320-m1
[ooovba.git] / autodoc / source / display / idl / hi_env.hxx
blob41758f706c93573aea7f032226751f7c257eefb0
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: hi_env.hxx,v $
10 * $Revision: 1.6 $
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 ADC_DISPLAY_HI_ENV_HXX
32 #define ADC_DISPLAY_HI_ENV_HXX
35 // USED SERVICES
36 // BASE CLASSES
37 // COMPONENTS
38 #include <cosv/ploc.hxx>
39 #include <cosv/ploc_dir.hxx>
40 // PARAMETERS
41 #include <toolkit/out_position.hxx>
43 namespace ary
45 namespace idl
47 class Gate;
48 class CodeEntity;
51 namespace display
53 class CorporateFrame;
55 namespace output
57 class Tree;
60 class AryAccess;
61 class LinkHelper;
63 /** @resp
64 Provides enviroment information to the HTML factory
65 classes.
67 @descr
68 All information that is not included in the data, especially
69 about the layout of the output tree and the access to
70 information from the repository are provided here.
72 @see HtmlFactory
74 class HtmlEnvironment_Idl
76 public:
77 // LIFECYCLE
78 HtmlEnvironment_Idl(
79 const csv::ploc::Path &
80 io_rOutputDir,
81 const ary::idl::Gate &
82 i_rGate,
83 const display::CorporateFrame &
84 i_rLayout );
85 ~HtmlEnvironment_Idl();
87 // OPERATIONS
88 void Goto_Directory(
89 output::Position i_pos,
90 bool i_bCreateDirectoryIfNecessary );
91 void Goto_DirectoryLevelDown(
92 const String & i_subDirName,
93 bool i_bCreateDirectoryIfNecessary );
94 void Goto_DirectoryLevelUp();
95 void Set_CurFile(
96 const String & i_fileName );
97 void Set_CurPageCe(
98 const ary::idl::CodeEntity *
99 i_ce )
100 { pCurPageCe = i_ce; }
101 // INQUIRY
102 const ary::idl::Gate &
103 Gate() const { return *pGate; }
104 const AryAccess & Data() const { return *pData; }
105 const char * Link2Manual(
106 const String & i_link ) const;
108 /// This may be reimplemented for removing dead links to members.
109 bool Is_MemberExistenceCheckRequired() const
110 { return false; }
112 /// @return Holds only the current directory, not the current file.
113 output::Position & CurPosition() const { return aCurPosition; }
114 void Get_CurFilePath(
115 StreamStr & o_buffer ) const
116 { o_buffer << aCurPath; }
118 const display::CorporateFrame &
119 Layout() const { return *pLayout; }
120 const LinkHelper & Linker() const { return *pLinker; }
122 void Get_LinkTo(
123 StreamStr & o_result,
124 output::Position i_destination )
125 { CurPosition().Get_LinkTo(o_result, i_destination); }
126 String CurPageCe_AsText() const;
127 String CurPageCe_AsFile(
128 const char * i_sEnding) const;
129 const ary::idl::CodeEntity *
130 CurPageCe() const { return pCurPageCe; }
132 // ACCESS
133 output::Tree & OutputTree() { return *pOutputTree; }
135 private:
136 // Local
137 void create_Directory(
138 const csv::ploc::Path &
139 i_path );
141 // DATA
142 csv::ploc::Directory
143 aOutputRoot;
144 csv::ploc::Path aCurPath;
146 Dyn<AryAccess> pData; /// @invariant *pData is valid.
147 const ary::idl::Gate *
148 pGate; /// @invariant pGate != 0.
149 Dyn<output::Tree> pOutputTree; /// @invariant *pOutputTree is valid.
150 mutable output::Position
151 aCurPosition;
152 const ary::idl::CodeEntity *
153 pCurPageCe;
155 const display::CorporateFrame *
156 pLayout;
158 Dyn<LinkHelper> pLinker;
162 #endif