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
10*1c78a5d6SAndrew Rist  *
11*1c78a5d6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1c78a5d6SAndrew Rist  *
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.
19*1c78a5d6SAndrew Rist  *
20*1c78a5d6SAndrew Rist  *************************************************************/
21*1c78a5d6SAndrew Rist 
22*1c78a5d6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ADC_DISPLAY_ARYATTRS_HXX
25cdf0e10cSrcweir #define ADC_DISPLAY_ARYATTRS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // USED SERVICES
28cdf0e10cSrcweir #include <ary/cpp/c_types4cpp.hxx>
29cdf0e10cSrcweir #include <ary/doc/d_docu.hxx>
30cdf0e10cSrcweir #include <ary/doc/d_oldcppdocu.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace ary
33cdf0e10cSrcweir {
34cdf0e10cSrcweir  	namespace cpp
35cdf0e10cSrcweir     {
36cdf0e10cSrcweir         class CodeEntity;
37cdf0e10cSrcweir         class Class;
38cdf0e10cSrcweir         class DisplayGate;
39cdf0e10cSrcweir         class Function;
40cdf0e10cSrcweir         class Namespace;
41cdf0e10cSrcweir     }
42cdf0e10cSrcweir }
43cdf0e10cSrcweir 
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 
46cdf0e10cSrcweir 
47cdf0e10cSrcweir const char *        Get_ClassTypeKey(
48cdf0e10cSrcweir                         const ary::cpp::Class & i_rClass );
49cdf0e10cSrcweir const char *        Get_TypeKey(
50cdf0e10cSrcweir                         const ary::cpp::CodeEntity &
51cdf0e10cSrcweir                                                 i_rCe );
52cdf0e10cSrcweir bool                Ce_IsInternal(
53cdf0e10cSrcweir                         const ary::cpp::CodeEntity &
54cdf0e10cSrcweir                                                 i_rCe );
55cdf0e10cSrcweir const char *        SyntaxText_PreName(
56cdf0e10cSrcweir                         const ary::cpp::Function &
57cdf0e10cSrcweir                                                 i_rFunction,
58cdf0e10cSrcweir                         const ary::cpp::Gate &  i_rAryGate );
59cdf0e10cSrcweir const char *        SyntaxText_PostName(
60cdf0e10cSrcweir                         const ary::cpp::Function &
61cdf0e10cSrcweir                                                 i_rFunction,
62cdf0e10cSrcweir                         const ary::cpp::Gate &  i_rAryGate );
63cdf0e10cSrcweir 
64cdf0e10cSrcweir bool                Get_TypeText(
65cdf0e10cSrcweir                         const char * &          o_rPreName,
66cdf0e10cSrcweir                         const char * &          o_rName,
67cdf0e10cSrcweir                         const char * &          o_rPostName,
68cdf0e10cSrcweir                         ary::cpp::Type_id       i_nTypeid,
69cdf0e10cSrcweir                         const ary::cpp::Gate &  i_rAryGate );
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 
72cdf0e10cSrcweir inline const ary::doc::OldCppDocu *
Get_CppDocu(const ary::doc::Documentation & i_doc)73cdf0e10cSrcweir Get_CppDocu(const ary::doc::Documentation & i_doc)
74cdf0e10cSrcweir {
75cdf0e10cSrcweir     return dynamic_cast< const ary::doc::OldCppDocu* >(i_doc.Data());
76cdf0e10cSrcweir }
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 
79cdf0e10cSrcweir class FunctionParam_Iterator
80cdf0e10cSrcweir {
81cdf0e10cSrcweir   public:
82cdf0e10cSrcweir                     FunctionParam_Iterator();
83cdf0e10cSrcweir                     ~FunctionParam_Iterator();
84cdf0e10cSrcweir 
85cdf0e10cSrcweir                     operator bool() const;
86cdf0e10cSrcweir     FunctionParam_Iterator &
87cdf0e10cSrcweir                     operator++();
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     void            Assign(
90cdf0e10cSrcweir                         const ary::cpp::Function &
91cdf0e10cSrcweir                                                 i_rFunction );
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     ary::cpp::Type_id
94cdf0e10cSrcweir                     CurType() const;
95cdf0e10cSrcweir     const String  & CurName() const;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     bool            IsFunctionConst() const;
98cdf0e10cSrcweir     bool            IsFunctionVolatile() const;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir   private:
101cdf0e10cSrcweir     typedef std::vector<ary::cpp::Type_id>::const_iterator  Type_Iterator;
102cdf0e10cSrcweir     typedef StringVector::const_iterator                    Name_Iterator;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     bool                IsValid() const;
105cdf0e10cSrcweir 
106cdf0e10cSrcweir     // Forbidden
107cdf0e10cSrcweir     FunctionParam_Iterator &
108cdf0e10cSrcweir                     operator++(int);
109cdf0e10cSrcweir     // DATA
110cdf0e10cSrcweir     Type_Iterator       itTypes;
111cdf0e10cSrcweir     Type_Iterator       itTypes_end;
112cdf0e10cSrcweir     Name_Iterator       itNames_andMore;        /// Name, init-value.
113cdf0e10cSrcweir     Name_Iterator       itNames_andMore_end;
114cdf0e10cSrcweir 
115cdf0e10cSrcweir     ary::cpp::E_ConVol  eConVol;
116cdf0e10cSrcweir };
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 
120cdf0e10cSrcweir 
121cdf0e10cSrcweir // IMPLEMENTATION
122cdf0e10cSrcweir inline
123cdf0e10cSrcweir FunctionParam_Iterator::operator bool() const
124cdf0e10cSrcweir     { return IsValid(); }
125cdf0e10cSrcweir 
126cdf0e10cSrcweir inline bool
IsValid() const127cdf0e10cSrcweir FunctionParam_Iterator::IsValid() const
128cdf0e10cSrcweir {
129cdf0e10cSrcweir     // By C'tor and Assign(), it is assured, that
130cdf0e10cSrcweir     //   both iterators are valid, if one is valid.
131cdf0e10cSrcweir     return itTypes != itTypes_end;
132cdf0e10cSrcweir }
133cdf0e10cSrcweir 
134cdf0e10cSrcweir inline ary::cpp::Type_id
CurType() const135cdf0e10cSrcweir FunctionParam_Iterator::CurType() const
136cdf0e10cSrcweir     { return IsValid() ? *itTypes : ary::cpp::Type_id(0); }
137cdf0e10cSrcweir inline const String  &
CurName() const138cdf0e10cSrcweir FunctionParam_Iterator::CurName() const
139cdf0e10cSrcweir     { return IsValid() ? *itNames_andMore : String::Null_(); }
140cdf0e10cSrcweir inline bool
IsFunctionConst() const141cdf0e10cSrcweir FunctionParam_Iterator::IsFunctionConst() const
142cdf0e10cSrcweir     { return (eConVol & ary::cpp::CONVOL_const) != 0; }
143cdf0e10cSrcweir inline bool
IsFunctionVolatile() const144cdf0e10cSrcweir FunctionParam_Iterator::IsFunctionVolatile() const
145cdf0e10cSrcweir     { return (eConVol & ary::cpp::CONVOL_volatile) != 0; }
146cdf0e10cSrcweir 
147cdf0e10cSrcweir 
148cdf0e10cSrcweir 
149cdf0e10cSrcweir 
150cdf0e10cSrcweir #endif
151