xref: /AOO41X/main/autodoc/source/display/inc/toolkit/out_tree.hxx (revision 1c78a5d6c0093dece4c096ba53051800fbad6e33)
1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c78a5d6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c78a5d6SAndrew Rist  * distributed with this work for additional information
6*1c78a5d6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c78a5d6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist  * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1c78a5d6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist  * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c78a5d6SAndrew Rist  * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ADC_DISPLAY_OUT_TREE_HXX
25cdf0e10cSrcweir #define ADC_DISPLAY_OUT_TREE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir // USED SERVICES
29cdf0e10cSrcweir     // BASE CLASSES
30cdf0e10cSrcweir     // COMPONENTS
31cdf0e10cSrcweir #include "out_position.hxx"
32cdf0e10cSrcweir     // PARAMETERS
33cdf0e10cSrcweir 
34cdf0e10cSrcweir 
35cdf0e10cSrcweir namespace output
36cdf0e10cSrcweir {
37cdf0e10cSrcweir 
38cdf0e10cSrcweir inline const char *
ModuleFileName()39cdf0e10cSrcweir ModuleFileName()
40cdf0e10cSrcweir { return "module-ix.html"; }
41cdf0e10cSrcweir inline const char *
IndexFilesDirName()42cdf0e10cSrcweir IndexFilesDirName()
43cdf0e10cSrcweir { return "index-files"; }
44cdf0e10cSrcweir inline const char *
IndexFile_A()45cdf0e10cSrcweir IndexFile_A()
46cdf0e10cSrcweir { return "index-1.html"; }
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class Tree
50cdf0e10cSrcweir {
51cdf0e10cSrcweir   public:
52cdf0e10cSrcweir     // LIFECYCLE
53cdf0e10cSrcweir                         Tree();
54cdf0e10cSrcweir                         ~Tree();
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     // OPERATIONS
57cdf0e10cSrcweir     void                Set_Overview(
58cdf0e10cSrcweir                             const StringVector &
59cdf0e10cSrcweir                                                 i_path,
60cdf0e10cSrcweir                             const String &      i_sFileName );
61cdf0e10cSrcweir     Node &              Set_NamesRoot(
62cdf0e10cSrcweir                             const StringVector &
63cdf0e10cSrcweir                                                 i_path );
64cdf0e10cSrcweir     Node &              Set_IndexRoot(
65cdf0e10cSrcweir                             const StringVector &
66cdf0e10cSrcweir                                                 i_path );
67cdf0e10cSrcweir     Node &              Set_ProjectsRoot(
68cdf0e10cSrcweir                             const StringVector &
69cdf0e10cSrcweir                                                 i_path );
70cdf0e10cSrcweir     Node &              Provide_Node(
71cdf0e10cSrcweir                             const StringVector &
72cdf0e10cSrcweir                                                 i_path );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     // ACCESS
RootNode()75cdf0e10cSrcweir     Node &              RootNode()              { return *pRoot; }
NamesRootNode()76cdf0e10cSrcweir     Node &              NamesRootNode()	    	{ return *pNamesRoot; }
IndexRootNode()77cdf0e10cSrcweir     Node &              IndexRootNode()			{ return *pIndexRoot; }
ProjectsRootNode()78cdf0e10cSrcweir     Node &              ProjectsRootNode()		{ return *pProjectsRoot; }
79cdf0e10cSrcweir 
Root()80cdf0e10cSrcweir     Position            Root()                  { return Position(*pRoot); }
Overview()81cdf0e10cSrcweir     Position            Overview()				{ return aOverview; }
NamesRoot()82cdf0e10cSrcweir     Position            NamesRoot()				{ return Position(*pNamesRoot); }
IndexRoot()83cdf0e10cSrcweir     Position            IndexRoot()				{ return Position(*pIndexRoot); }
ProjectsRoot()84cdf0e10cSrcweir     Position            ProjectsRoot()			{ return Position(*pProjectsRoot); }
85cdf0e10cSrcweir 
86cdf0e10cSrcweir   private:
87cdf0e10cSrcweir     // forbidden:
88cdf0e10cSrcweir                         Tree(const Tree&);
89cdf0e10cSrcweir     Tree &              operator=(const Tree&);
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     // DATA
92cdf0e10cSrcweir     Dyn<Node>           pRoot;
93cdf0e10cSrcweir     Node *              pNamesRoot;
94cdf0e10cSrcweir     Node *              pIndexRoot;
95cdf0e10cSrcweir     Node *              pProjectsRoot;
96cdf0e10cSrcweir     Position            aOverview;
97cdf0e10cSrcweir };
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 
100cdf0e10cSrcweir // IMPLEMENTATION
101cdf0e10cSrcweir 
102cdf0e10cSrcweir inline Node &
Provide_Node(const StringVector & i_path)103cdf0e10cSrcweir Tree::Provide_Node( const StringVector & i_path )
104cdf0e10cSrcweir     { return pRoot->Provide_Child(i_path); }
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 
107cdf0e10cSrcweir inline void
Set_Overview(const StringVector & i_path,const String & i_sFileName)108cdf0e10cSrcweir Tree::Set_Overview( const StringVector & i_path,
109cdf0e10cSrcweir                     const String &		 i_sFileName )
110cdf0e10cSrcweir     { aOverview.Set(Provide_Node(i_path), i_sFileName); }
111cdf0e10cSrcweir 
112cdf0e10cSrcweir inline Node &
Set_NamesRoot(const StringVector & i_path)113cdf0e10cSrcweir Tree::Set_NamesRoot( const StringVector & i_path )
114cdf0e10cSrcweir     { pNamesRoot = &Provide_Node(i_path);
115cdf0e10cSrcweir 	  return *pNamesRoot; }
116cdf0e10cSrcweir 
117cdf0e10cSrcweir inline Node &
Set_IndexRoot(const StringVector & i_path)118cdf0e10cSrcweir Tree::Set_IndexRoot( const StringVector & i_path )
119cdf0e10cSrcweir     { pIndexRoot = &Provide_Node(i_path);
120cdf0e10cSrcweir 	  return *pIndexRoot; }
121cdf0e10cSrcweir 
122cdf0e10cSrcweir inline Node &
Set_ProjectsRoot(const StringVector & i_path)123cdf0e10cSrcweir Tree::Set_ProjectsRoot( const StringVector & i_path )
124cdf0e10cSrcweir     { pProjectsRoot = &Provide_Node(i_path);
125cdf0e10cSrcweir 	  return *pProjectsRoot; }
126cdf0e10cSrcweir 
127cdf0e10cSrcweir 
128cdf0e10cSrcweir 
129cdf0e10cSrcweir }   // namespace output
130cdf0e10cSrcweir 
131cdf0e10cSrcweir 
132cdf0e10cSrcweir #endif
133