1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef ADC_DISPLAY_HI_ENV_HXX 29*cdf0e10cSrcweir #define ADC_DISPLAY_HI_ENV_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir // USED SERVICES 33*cdf0e10cSrcweir // BASE CLASSES 34*cdf0e10cSrcweir // COMPONENTS 35*cdf0e10cSrcweir #include <cosv/ploc.hxx> 36*cdf0e10cSrcweir #include <cosv/ploc_dir.hxx> 37*cdf0e10cSrcweir // PARAMETERS 38*cdf0e10cSrcweir #include <toolkit/out_position.hxx> 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir namespace ary 41*cdf0e10cSrcweir { 42*cdf0e10cSrcweir namespace idl 43*cdf0e10cSrcweir { 44*cdf0e10cSrcweir class Gate; 45*cdf0e10cSrcweir class CodeEntity; 46*cdf0e10cSrcweir } 47*cdf0e10cSrcweir } 48*cdf0e10cSrcweir namespace display 49*cdf0e10cSrcweir { 50*cdf0e10cSrcweir class CorporateFrame; 51*cdf0e10cSrcweir } 52*cdf0e10cSrcweir namespace output 53*cdf0e10cSrcweir { 54*cdf0e10cSrcweir class Tree; 55*cdf0e10cSrcweir } 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir class AryAccess; 58*cdf0e10cSrcweir class LinkHelper; 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir /** @resp 61*cdf0e10cSrcweir Provides enviroment information to the HTML factory 62*cdf0e10cSrcweir classes. 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir @descr 65*cdf0e10cSrcweir All information that is not included in the data, especially 66*cdf0e10cSrcweir about the layout of the output tree and the access to 67*cdf0e10cSrcweir information from the repository are provided here. 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir @see HtmlFactory 70*cdf0e10cSrcweir */ 71*cdf0e10cSrcweir class HtmlEnvironment_Idl 72*cdf0e10cSrcweir { 73*cdf0e10cSrcweir public: 74*cdf0e10cSrcweir // LIFECYCLE 75*cdf0e10cSrcweir HtmlEnvironment_Idl( 76*cdf0e10cSrcweir const csv::ploc::Path & 77*cdf0e10cSrcweir io_rOutputDir, 78*cdf0e10cSrcweir const ary::idl::Gate & 79*cdf0e10cSrcweir i_rGate, 80*cdf0e10cSrcweir const display::CorporateFrame & 81*cdf0e10cSrcweir i_rLayout ); 82*cdf0e10cSrcweir ~HtmlEnvironment_Idl(); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir // OPERATIONS 85*cdf0e10cSrcweir void Goto_Directory( 86*cdf0e10cSrcweir output::Position i_pos, 87*cdf0e10cSrcweir bool i_bCreateDirectoryIfNecessary ); 88*cdf0e10cSrcweir void Goto_DirectoryLevelDown( 89*cdf0e10cSrcweir const String & i_subDirName, 90*cdf0e10cSrcweir bool i_bCreateDirectoryIfNecessary ); 91*cdf0e10cSrcweir void Goto_DirectoryLevelUp(); 92*cdf0e10cSrcweir void Set_CurFile( 93*cdf0e10cSrcweir const String & i_fileName ); 94*cdf0e10cSrcweir void Set_CurPageCe( 95*cdf0e10cSrcweir const ary::idl::CodeEntity * 96*cdf0e10cSrcweir i_ce ) 97*cdf0e10cSrcweir { pCurPageCe = i_ce; } 98*cdf0e10cSrcweir // INQUIRY 99*cdf0e10cSrcweir const ary::idl::Gate & 100*cdf0e10cSrcweir Gate() const { return *pGate; } 101*cdf0e10cSrcweir const AryAccess & Data() const { return *pData; } 102*cdf0e10cSrcweir const char * Link2Manual( 103*cdf0e10cSrcweir const String & i_link ) const; 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir /// This may be reimplemented for removing dead links to members. 106*cdf0e10cSrcweir bool Is_MemberExistenceCheckRequired() const 107*cdf0e10cSrcweir { return false; } 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir /// @return Holds only the current directory, not the current file. 110*cdf0e10cSrcweir output::Position & CurPosition() const { return aCurPosition; } 111*cdf0e10cSrcweir void Get_CurFilePath( 112*cdf0e10cSrcweir StreamStr & o_buffer ) const 113*cdf0e10cSrcweir { o_buffer << aCurPath; } 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir const display::CorporateFrame & 116*cdf0e10cSrcweir Layout() const { return *pLayout; } 117*cdf0e10cSrcweir const LinkHelper & Linker() const { return *pLinker; } 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir void Get_LinkTo( 120*cdf0e10cSrcweir StreamStr & o_result, 121*cdf0e10cSrcweir output::Position i_destination ) 122*cdf0e10cSrcweir { CurPosition().Get_LinkTo(o_result, i_destination); } 123*cdf0e10cSrcweir String CurPageCe_AsText() const; 124*cdf0e10cSrcweir String CurPageCe_AsFile( 125*cdf0e10cSrcweir const char * i_sEnding) const; 126*cdf0e10cSrcweir const ary::idl::CodeEntity * 127*cdf0e10cSrcweir CurPageCe() const { return pCurPageCe; } 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir // ACCESS 130*cdf0e10cSrcweir output::Tree & OutputTree() { return *pOutputTree; } 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir private: 133*cdf0e10cSrcweir // Local 134*cdf0e10cSrcweir void create_Directory( 135*cdf0e10cSrcweir const csv::ploc::Path & 136*cdf0e10cSrcweir i_path ); 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir // DATA 139*cdf0e10cSrcweir csv::ploc::Directory 140*cdf0e10cSrcweir aOutputRoot; 141*cdf0e10cSrcweir csv::ploc::Path aCurPath; 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir Dyn<AryAccess> pData; /// @invariant *pData is valid. 144*cdf0e10cSrcweir const ary::idl::Gate * 145*cdf0e10cSrcweir pGate; /// @invariant pGate != 0. 146*cdf0e10cSrcweir Dyn<output::Tree> pOutputTree; /// @invariant *pOutputTree is valid. 147*cdf0e10cSrcweir mutable output::Position 148*cdf0e10cSrcweir aCurPosition; 149*cdf0e10cSrcweir const ary::idl::CodeEntity * 150*cdf0e10cSrcweir pCurPageCe; 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir const display::CorporateFrame * 153*cdf0e10cSrcweir pLayout; 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir Dyn<LinkHelper> pLinker; 156*cdf0e10cSrcweir }; 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir #endif 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir 162