xref: /aoo41x/main/autodoc/inc/ary/cpp/c_enum.hxx (revision 1c78a5d6)
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 ARY_CPP_C_ENUM_HXX
25 #define ARY_CPP_C_ENUM_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 #include <ary/cpp/c_ce.hxx>
32 #include <ary/arygroup.hxx>
33 	// OTHER
34 #include <ary/cessentl.hxx>
35 #include <ary/cpp/c_types4cpp.hxx>
36 #include <ary/sequentialids.hxx>
37 
38 
39 
40 
41 
42 namespace ary
43 {
44 namespace cpp
45 {
46 
47 
48 /** A C++ enum declaration.
49 */
50 class Enum : public CodeEntity,
51              public AryGroup
52 {
53   public:
54     enum E_ClassId { class_id = 1002 };
55 
56     enum E_Slots
57     {
58         SLOT_Values = 1
59     };
60 
61     // LIFECYCLE
62                         Enum(
63                             const String  &     i_sLocalName,
64                             Ce_id               i_nOwner,
65                             E_Protection        i_eProtection,
66                             Lid                 i_nFile );
67                         ~Enum();
68 
69 	// OPERATIONS
70 	void				Add_Value(
71 							Ce_id               i_nId );
72 
73     // INQUIRY
Protection() const74     E_Protection        Protection() const      { return eProtection; }
75 
76   private:
77     // Interface csv::ConstProcessorClient
78     virtual void        do_Accept(
79                             csv::ProcessorIfc & io_processor ) const;
80 
81     // Interface ary::cpp::CodeEntity
82 	virtual const String  &
83                         inq_LocalName() const;
84 	virtual Cid         inq_Owner() const;
85 	virtual Lid			inq_Location() const;
86 
87     // Interface ary::cpp::CppEntity
88     virtual ClassId     get_AryClass() const;
89 
90     // Interface ary::AryGroup
91 	virtual Gid 		inq_Id_Group() const;
92     virtual const cpp::CppEntity &
93                         inq_RE_Group() const;
94 	virtual const group::SlotList &
95                         inq_Slots() const;
96     virtual DYN Slot *  inq_Create_Slot(
97                             SlotAccessId        i_nSlot ) const;
98 
99     // DATA
100    	CeEssentials		aEssentials;
101     SequentialIds<Ce_id>
102                         aValues;
103 	E_Protection		eProtection;
104 };
105 
106 
107 
108 
109 
110 }   // namespace cpp
111 }   // namespace ary
112 #endif
113