Update ooo320-m1
[ooovba.git] / autodoc / source / display / inc / toolkit / out_tree.hxx
blob4264e6c749c09e0c3dd23c8843f4abe284e82ed8
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: out_tree.hxx,v $
10 * $Revision: 1.3 $
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_OUT_TREE_HXX
32 #define ADC_DISPLAY_OUT_TREE_HXX
35 // USED SERVICES
36 // BASE CLASSES
37 // COMPONENTS
38 #include "out_position.hxx"
39 // PARAMETERS
42 namespace output
45 inline const char *
46 ModuleFileName()
47 { return "module-ix.html"; }
48 inline const char *
49 IndexFilesDirName()
50 { return "index-files"; }
51 inline const char *
52 IndexFile_A()
53 { return "index-1.html"; }
56 class Tree
58 public:
59 // LIFECYCLE
60 Tree();
61 ~Tree();
63 // OPERATIONS
64 void Set_Overview(
65 const StringVector &
66 i_path,
67 const String & i_sFileName );
68 Node & Set_NamesRoot(
69 const StringVector &
70 i_path );
71 Node & Set_IndexRoot(
72 const StringVector &
73 i_path );
74 Node & Set_ProjectsRoot(
75 const StringVector &
76 i_path );
77 Node & Provide_Node(
78 const StringVector &
79 i_path );
81 // ACCESS
82 Node & RootNode() { return *pRoot; }
83 Node & NamesRootNode() { return *pNamesRoot; }
84 Node & IndexRootNode() { return *pIndexRoot; }
85 Node & ProjectsRootNode() { return *pProjectsRoot; }
87 Position Root() { return Position(*pRoot); }
88 Position Overview() { return aOverview; }
89 Position NamesRoot() { return Position(*pNamesRoot); }
90 Position IndexRoot() { return Position(*pIndexRoot); }
91 Position ProjectsRoot() { return Position(*pProjectsRoot); }
93 private:
94 // forbidden:
95 Tree(const Tree&);
96 Tree & operator=(const Tree&);
98 // DATA
99 Dyn<Node> pRoot;
100 Node * pNamesRoot;
101 Node * pIndexRoot;
102 Node * pProjectsRoot;
103 Position aOverview;
107 // IMPLEMENTATION
109 inline Node &
110 Tree::Provide_Node( const StringVector & i_path )
111 { return pRoot->Provide_Child(i_path); }
114 inline void
115 Tree::Set_Overview( const StringVector & i_path,
116 const String & i_sFileName )
117 { aOverview.Set(Provide_Node(i_path), i_sFileName); }
119 inline Node &
120 Tree::Set_NamesRoot( const StringVector & i_path )
121 { pNamesRoot = &Provide_Node(i_path);
122 return *pNamesRoot; }
124 inline Node &
125 Tree::Set_IndexRoot( const StringVector & i_path )
126 { pIndexRoot = &Provide_Node(i_path);
127 return *pIndexRoot; }
129 inline Node &
130 Tree::Set_ProjectsRoot( const StringVector & i_path )
131 { pProjectsRoot = &Provide_Node(i_path);
132 return *pProjectsRoot; }
136 } // namespace output
139 #endif