1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 #ifndef ADC_DISPLAY_HI_ARY_HXX
25 #define ADC_DISPLAY_HI_ARY_HXX
26
27
28 // USED SERVICES
29 // BASE CLASSES
30 // COMPONENTS
31 #include <ary/idl/i_types4idl.hxx>
32 // PARAMETERS
33 #include <ary/idl/i_gate.hxx>
34 #include <ary/doc/d_docu.hxx>
35 #include <ary/doc/d_oldidldocu.hxx>
36
37
38 namespace ary
39 {
40 namespace idl
41 {
42 class Module;
43 class Gate;
44 class CePilot;
45 class TypePilot;
46 }
47 }
48 namespace output
49 {
50 class Position;
51 }
52
53
54
55
56 inline const ary::doc::OldIdlDocu *
Get_IdlDocu(const ary::doc::Documentation & i_doc)57 Get_IdlDocu(const ary::doc::Documentation & i_doc)
58 {
59 return dynamic_cast< const ary::doc::OldIdlDocu* >(i_doc.Data());
60 }
61
62
63
64
65
66 /** A helper class to wrap the access to data in the Autodoc Repository.
67 */
68 class AryAccess
69 {
70 public:
71 // LIFECYCLE
72 AryAccess(
73 const ary::idl::Gate &
74 i_rGate );
75 // INQUIRY
76 const ary::idl::Module &
77 GlobalNamespace() const;
78 const ary::idl::Module &
79 Find_Module(
80 ary::idl::Ce_id i_ce ) const;
81 const ary::idl::CodeEntity &
82 Find_Ce(
83 ary::idl::Ce_id i_ce ) const;
84 const ary::idl::Type &
85 Find_Type(
86 ary::idl::Type_id i_type ) const;
87 ary::idl::Ce_id CeFromType(
88 ary::idl::Type_id i_type ) const;
89 bool IsBuiltInOrRelated(
90 const ary::idl::Type &
91 i_type ) const;
92 bool Search_Ce(
93 StringVector & o_module,
94 String & o_mainEntity,
95 String & o_memberEntity,
96 const char * i_sText,
97 const ary::idl::Module &
98 i_referingScope ) const;
99 bool Search_CesModule(
100 StringVector & o_module,
101 const String & i_scope,
102 const String & i_ce,
103 const ary::idl::Module &
104 i_referingScope ) const;
105 const ary::idl::Module *
106 Search_Module(
107 const StringVector &
108 i_nameChain ) const;
109
110 void Get_CeText(
111 StringVector & o_module,
112 String & o_ce,
113 String & o_member,
114 const ary::idl::CodeEntity &
115 i_ce ) const;
116 void Get_TypeText(
117 StringVector & o_module,
118 String & o_sCe,
119 ary::idl::Ce_id & o_nCe,
120 int & o_sequenceCount,
121 const ary::idl::Type &
122 i_type ) const;
123 void Get_IndexData(
124 std::vector<ary::idl::Ce_id> &
125 o_data,
126 ary::idl::alphabetical_index::E_Letter
127 i_letter ) const;
128
129 const ary::idl::CePilot &
130 Ces() const;
131 private:
132 const ary::idl::Module *
133 find_SubModule(
134 const ary::idl::Module &
135 i_parent,
136 const String & i_name ) const;
137
138 /// Gets "::"-separated names out of a string.
139 bool nextName(
140 const char * & io_TextPtr,
141 String & o_name ) const;
142
143
144 const ary::idl::Gate &
145 gate() const;
146 const ary::idl::CePilot &
147 ces() const;
148 const ary::idl::TypePilot &
149 types() const;
150 // DATA
151 const ary::idl::Gate &
152 rGate;
153 };
154
155
156 #endif
157
158
159