Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef ADC_DISPLAY_HI_ENV_HXX
21 : #define ADC_DISPLAY_HI_ENV_HXX
22 :
23 :
24 : // USED SERVICES
25 : // BASE CLASSES
26 : // COMPONENTS
27 : #include <cosv/ploc.hxx>
28 : #include <cosv/ploc_dir.hxx>
29 : // PARAMETERS
30 : #include <toolkit/out_position.hxx>
31 :
32 : namespace ary
33 : {
34 : namespace idl
35 : {
36 : class Gate;
37 : class CodeEntity;
38 : }
39 : }
40 : namespace display
41 : {
42 : class CorporateFrame;
43 : }
44 : namespace output
45 : {
46 : class Tree;
47 : }
48 :
49 : class AryAccess;
50 : class LinkHelper;
51 :
52 : /** @resp
53 : Provides enviroment information to the HTML factory
54 : classes.
55 :
56 : @descr
57 : All information that is not included in the data, especially
58 : about the layout of the output tree and the access to
59 : information from the repository are provided here.
60 :
61 : @see HtmlFactory
62 : */
63 : class HtmlEnvironment_Idl
64 : {
65 : public:
66 : // LIFECYCLE
67 : HtmlEnvironment_Idl(
68 : const csv::ploc::Path &
69 : io_rOutputDir,
70 : const ary::idl::Gate &
71 : i_rGate,
72 : const display::CorporateFrame &
73 : i_rLayout );
74 : ~HtmlEnvironment_Idl();
75 :
76 : // OPERATIONS
77 : void Goto_Directory(
78 : output::Position i_pos,
79 : bool i_bCreateDirectoryIfNecessary );
80 : void Goto_DirectoryLevelDown(
81 : const String & i_subDirName,
82 : bool i_bCreateDirectoryIfNecessary );
83 : void Goto_DirectoryLevelUp();
84 : void Set_CurFile(
85 : const String & i_fileName );
86 15635 : void Set_CurPageCe(
87 : const ary::idl::CodeEntity *
88 : i_ce )
89 15635 : { pCurPageCe = i_ce; }
90 : // INQUIRY
91 : const ary::idl::Gate &
92 27605 : Gate() const { return *pGate; }
93 282026 : const AryAccess & Data() const { return *pData; }
94 : const char * Link2Manual(
95 : const String & i_link ) const;
96 :
97 : /// This may be reimplemented for removing dead links to members.
98 47620 : bool Is_MemberExistenceCheckRequired() const
99 47620 : { return false; }
100 :
101 : /// @return Holds only the current directory, not the current file.
102 218700 : output::Position & CurPosition() const { return aCurPosition; }
103 7832 : void Get_CurFilePath(
104 : StreamStr & o_buffer ) const
105 7832 : { o_buffer << aCurPath; }
106 :
107 : const display::CorporateFrame &
108 3 : Layout() const { return *pLayout; }
109 146260 : const LinkHelper & Linker() const { return *pLinker; }
110 :
111 26871 : void Get_LinkTo(
112 : StreamStr & o_result,
113 : output::Position i_destination )
114 26871 : { CurPosition().Get_LinkTo(o_result, i_destination); }
115 : String CurPageCe_AsText() const;
116 : String CurPageCe_AsFile(
117 : const char * i_sEnding) const;
118 : const ary::idl::CodeEntity *
119 1096 : CurPageCe() const { return pCurPageCe; }
120 :
121 : // ACCESS
122 102310 : output::Tree & OutputTree() { return *pOutputTree; }
123 :
124 : private:
125 : // Local
126 : void create_Directory(
127 : const csv::ploc::Path &
128 : i_path );
129 :
130 : // DATA
131 : csv::ploc::Directory
132 : aOutputRoot;
133 : csv::ploc::Path aCurPath;
134 :
135 : Dyn<AryAccess> pData; /// @invariant *pData is valid.
136 : const ary::idl::Gate *
137 : pGate; /// @invariant pGate != 0.
138 : Dyn<output::Tree> pOutputTree; /// @invariant *pOutputTree is valid.
139 : mutable output::Position
140 : aCurPosition;
141 : const ary::idl::CodeEntity *
142 : pCurPageCe;
143 :
144 : const display::CorporateFrame *
145 : pLayout;
146 :
147 : Dyn<LinkHelper> pLinker;
148 : };
149 :
150 :
151 : #endif
152 :
153 :
154 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|