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_OUT_TREE_HXX
21 : #define ADC_DISPLAY_OUT_TREE_HXX
22 :
23 :
24 : // USED SERVICES
25 : // BASE CLASSES
26 : // COMPONENTS
27 : #include "out_position.hxx"
28 : // PARAMETERS
29 :
30 :
31 : namespace output
32 : {
33 :
34 : inline const char *
35 32243 : ModuleFileName()
36 32243 : { return "module-ix.html"; }
37 : inline const char *
38 1 : IndexFilesDirName()
39 1 : { return "index-files"; }
40 : inline const char *
41 7804 : IndexFile_A()
42 7804 : { return "index-1.html"; }
43 :
44 :
45 : class Tree
46 : {
47 : public:
48 : // LIFECYCLE
49 : Tree();
50 : ~Tree();
51 :
52 : // OPERATIONS
53 : void Set_Overview(
54 : const StringVector &
55 : i_path,
56 : const String & i_sFileName );
57 : Node & Set_NamesRoot(
58 : const StringVector &
59 : i_path );
60 : Node & Set_IndexRoot(
61 : const StringVector &
62 : i_path );
63 : Node & Set_ProjectsRoot(
64 : const StringVector &
65 : i_path );
66 : Node & Provide_Node(
67 : const StringVector &
68 : i_path );
69 :
70 : // ACCESS
71 : Node & RootNode() { return *pRoot; }
72 : Node & NamesRootNode() { return *pNamesRoot; }
73 : Node & IndexRootNode() { return *pIndexRoot; }
74 : Node & ProjectsRootNode() { return *pProjectsRoot; }
75 :
76 4 : Position Root() { return Position(*pRoot); }
77 7831 : Position Overview() { return aOverview; }
78 2 : Position NamesRoot() { return Position(*pNamesRoot); }
79 15610 : Position IndexRoot() { return Position(*pIndexRoot); }
80 : Position ProjectsRoot() { return Position(*pProjectsRoot); }
81 :
82 : private:
83 : // forbidden:
84 : Tree(const Tree&);
85 : Tree & operator=(const Tree&);
86 :
87 : // DATA
88 : Dyn<Node> pRoot;
89 : Node * pNamesRoot;
90 : Node * pIndexRoot;
91 : Node * pProjectsRoot;
92 : Position aOverview;
93 : };
94 :
95 :
96 : // IMPLEMENTATION
97 :
98 : inline Node &
99 86675 : Tree::Provide_Node( const StringVector & i_path )
100 86675 : { return pRoot->Provide_Child(i_path); }
101 :
102 :
103 : inline void
104 1 : Tree::Set_Overview( const StringVector & i_path,
105 : const String & i_sFileName )
106 1 : { aOverview.Set(Provide_Node(i_path), i_sFileName); }
107 :
108 : inline Node &
109 1 : Tree::Set_NamesRoot( const StringVector & i_path )
110 1 : { pNamesRoot = &Provide_Node(i_path);
111 1 : return *pNamesRoot; }
112 :
113 : inline Node &
114 1 : Tree::Set_IndexRoot( const StringVector & i_path )
115 1 : { pIndexRoot = &Provide_Node(i_path);
116 1 : return *pIndexRoot; }
117 :
118 : inline Node &
119 : Tree::Set_ProjectsRoot( const StringVector & i_path )
120 : { pProjectsRoot = &Provide_Node(i_path);
121 : return *pProjectsRoot; }
122 :
123 :
124 :
125 : } // namespace output
126 :
127 :
128 : #endif
129 :
130 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|