KickJava   Java API By Example, From Geeks To Geeks.

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


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  * FixedTypeRefImpl is a wrapper for fixed IDL type references.
31  *
32  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
33  * <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
34  *
35  * @version 0.1
36  */

37
38 public class FixedTypeRefImpl
39        extends TypeRefImpl
40        implements org.objectweb.openccm.ast.api.FixedTypeRef
41 {
42     // ==================================================================
43
//
44
// Internal state.
45
//
46
// ==================================================================
47

48     /** Associated digits. */
49     private short digits_;
50
51     /** Associated scale. */
52     private short scale_;
53
54     // ==================================================================
55
//
56
// Constructor.
57
//
58
// ==================================================================
59

60     /**
61      * The constructor.
62      *
63      * @param type The IDLType that should be referenced.
64      * @param digits The associated digits.
65      * @param scale The associated scale.
66      */

67     protected
68     FixedTypeRefImpl(org.omg.CORBA.IDLType JavaDoc type,
69                      short digits,
70                      short scale)
71     {
72         // Call the TypeRefImpl constructor.
73
super(type, org.objectweb.openccm.ast.api.TypeKind.tk_fixed);
74
75         // Init internal state.
76
digits_ = digits;
77         scale_ = scale;
78     }
79
80     // ==================================================================
81
//
82
// Internal methods.
83
//
84
// ==================================================================
85

86     // ==================================================================
87
//
88
// Public methods.
89
//
90
// ==================================================================
91

92     // ==================================================================
93
//
94
// Methods for OMG IDL org.objectweb.openccm.ast.api.FixedTypeRef
95
//
96
// ==================================================================
97

98     /**
99      * Set the associated digits.
100      *
101      * @param digits The associated digits.
102      */

103     public void
104     setDigits(short digits)
105     {
106         digits_ = digits;
107     }
108
109     /**
110      * Obtain the associated digits.
111      *
112      * @return The associated digits.
113      */

114     public short
115     getDigits()
116     {
117         return digits_;
118     }
119
120     /**
121      * Set the associated scale.
122      *
123      * @param scale The associated scale.
124      */

125     public void
126     setScale(short scale)
127     {
128         scale_ = scale;
129     }
130
131     /**
132      * Obtain the associated scale.
133      *
134      * @return The associated scale.
135      */

136     public short
137     getScale()
138     {
139         return scale_;
140     }
141 }
142
Popular Tags