KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > ir3 > NativeDef_impl


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle.
23 Contributor(s): Mathieu Vadet, Christophe Demarey.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.ir3;
28
29 // Package dependencies
30
import org.omg.CORBA.*;
31
32 /**
33  * Implementation of the CORBA::NativeDef interface.
34  *
35  * @author <a=href="Philippe.Merle@lifl.fr">Philippe Merle</a>
36  * <a=href="Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
37  *
38  * @version 0.3
39  */

40
41 public class NativeDef_impl
42        extends Contained_impl
43        implements NativeDefOperations
44 {
45     // ==================================================================
46
//
47
// Constructor.
48
//
49
// ==================================================================
50

51     /**
52      * TODO
53      */

54     public
55     NativeDef_impl(IFR ifr,
56                    Container_impl container)
57     {
58         // call the ContainedTypedefDef_impl contructor.
59
super(ifr, container);
60
61         // set the tie servant object.
62
setServant(new NativeDefPOATie(this));
63     }
64
65     // ==================================================================
66
//
67
// Internal state.
68
//
69
// ==================================================================
70

71     // ==================================================================
72
//
73
// Internal methods for the inherited IRObject_impl class.
74
//
75
// ==================================================================
76

77     /**
78      * Warning : this operation must be implemented by subclasses.
79      * It allows us to avoid some casts while creating ::CORBA::TypeCode
80      */

81     protected TypeCode
82     recursiveType(java.util.List JavaDoc idSeq)
83     {
84         return type();
85     }
86
87     // ==================================================================
88
//
89
// Public methods.
90
//
91
// ==================================================================
92

93     /**
94      * Obtain its CORBA::NativeDef object reference.
95      */

96     public NativeDef
97     asNativeDef()
98     {
99         return NativeDefHelper.narrow(asObject());
100     }
101
102     // ==================================================================
103
//
104
// For CORBA::IRObject interface.
105
//
106
// ==================================================================
107

108     /**
109      * IDL:omg.org/CORBA/IRObject/def_kind:1.0
110      */

111     public DefinitionKind
112     def_kind()
113     {
114         return DefinitionKind.dk_Native;
115     }
116
117     // ==================================================================
118
//
119
// For CORBA::IDLType interface.
120
//
121
// ==================================================================
122

123     /**
124      * IDL:omg.org/CORBA/IDLType/type:1.0
125      */

126     public TypeCode
127     type()
128     {
129         // delegate to the TypeCodeFactory.
130
return getIFR().getTCF().create_native_tc(id(), name());
131     }
132
133     // ==================================================================
134
//
135
// For CORBA::NativeDef interface.
136
//
137
// ==================================================================
138
}
139
Popular Tags