xref: /aoo42x/main/autodoc/inc/ary/idl/i_enumvalue.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_IDL_I_ENUMVALUE_HXX
25 #define ARY_IDL_I_ENUMVALUE_HXX
26 
27 // BASE CLASSES
28 #include <ary/idl/i_ce.hxx>
29 
30 
31 
32 
33 namespace ary
34 {
35 namespace idl
36 {
37 namespace ifc_enumvalue
38 {
39     struct attr;
40 }
41 
42 
43 /** @resp
44     Represents an IDL enum value.
45 */
46 class EnumValue : public CodeEntity
47 {
48   public:
49     enum E_ClassId { class_id = 2006 };
50 
51     // LIFECYCLE
52                         EnumValue(
53                             const String &      i_sName,
54                             Ce_id               i_nOwner,
55                             Ce_id               i_nNameRoom,
56                             const String &      i_sInitValue );
57                         ~EnumValue();
58     // INQUIRY
59     const String &      Value() const;
60 
61   private:
62     // Interface csv::ConstProcessorClient:
63     virtual void        do_Accept(
64                             csv::ProcessorIfc & io_processor ) const;
65     // Interface ary::Object
66     virtual ClassId     get_AryClass() const;
67 
68     // Interface CodeEntity
69     virtual const String &  inq_LocalName() const;
70     virtual Ce_id           inq_NameRoom() const;
71     virtual Ce_id           inq_Owner() const;
72     virtual E_SightLevel    inq_SightLevel() const;
73 
74     friend struct ifc_enumvalue::attr;
75 
76     // DATA
77     String              sName;
78     Ce_id               nOwner;
79     Ce_id               nNameRoom;
80 
81     String              sValue;
82 };
83 
84 
85 
86 
87 // IMPLEMENTATION
88 inline const String &
Value() const89 EnumValue::Value() const
90 {
91     return sValue;
92 }
93 
94 
95 
96 
97 }   // namespace idl
98 }   // namespace ary
99 #endif
100