KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > ast > lib > ForwardScopeIDLImpl


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, Mathieu Vadet.
23 Contributor(s): Christophe Demarey.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.ast.lib;
28
29 /**
30  * ForwardScopeIDLImpl is a wrapper class for Scopes
31  * which can be defined as forward.
32  *
33  * Inherits from:
34  * - ForwardScopeImpl as forward scopes are also IDL scopes.
35  *
36  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
37  * <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
38  *
39  * @version 0.3
40  */

41
42 abstract public class ForwardScopeIDLImpl
43               extends ForwardScopeImpl
44 {
45     // ==================================================================
46
//
47
// Internal state.
48
//
49
// ==================================================================
50

51     // ==================================================================
52
//
53
// Constructor.
54
//
55
// ==================================================================
56

57     /**
58      * The constructor with the parent scope.
59      *
60      * @param rep The repository of the declaration.
61      * @param parent The parent scope of the forward declaration.
62      */

63     protected
64     ForwardScopeIDLImpl(Repository rep,
65                         ScopeImpl parent)
66     {
67         // Call the ForwardScopeImpl constructor.
68
super(rep, parent);
69
70         // Init internal state.
71
}
72
73     // ==================================================================
74
//
75
// Internal methods.
76
//
77
// ==================================================================
78

79     /**
80      * Create the container object.
81      */

82     abstract protected void
83     createContainer();
84
85     /**
86      * Complete the container object.
87      */

88     abstract protected void
89     completeContainer();
90
91     // ==================================================================
92
//
93
// Internal methods for ForwardScopeImpl.
94
//
95
// ==================================================================
96

97     /**
98      * Tests if this forward declaration is already created.
99      *
100      * @return True if it is already created else false.
101      */

102     public boolean
103     isForwardCreated()
104     {
105         return getContainer() != null;
106     }
107  
108     /**
109      * Create thisforward declaration.
110      */

111     public void
112     createForward()
113     {
114         createContainer();
115     }
116
117     /**
118      * Complete this forward declaration.
119      */

120     public void
121     completeForward()
122     {
123         completeContainer();
124
125         // move it in the same container to have the good order
126
getContained().move(the_parent_.getContainer(), getName(), getVersion());
127     }
128
129     // ==================================================================
130
//
131
// Public methods.
132
//
133
// ==================================================================
134

135     // ==================================================================
136
//
137
// Methods for OMG IDL org.objectweb.openccm.ast.api.Declaration
138
//
139
// ==================================================================
140

141     // ==================================================================
142
//
143
// Methods for OMG IDL org.objectweb.openccm.ast.api.Scope
144
//
145
// ==================================================================
146

147     // ==================================================================
148
//
149
// Methods for OMG IDL org.objectweb.openccm.ast.api.ForwardScope
150
//
151
// ==================================================================
152
}
153
Popular Tags