DynUnion.java revision 608:7e06bf1dcb09
1/*
2 * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26
27package org.omg.CORBA;
28
29/**
30 * The <code>DynUnion</code> interface represents a <code>DynAny</code> object
31 * that is associated with an IDL union.
32 * Union values can be traversed using the operations defined in <code>DynAny</code>.
33 * The first component in the union corresponds to the discriminator;
34 * the second corresponds to the actual value of the union.
35 * Calling the method <code>next()</code> twice allows you to access both components.
36 * @deprecated Use the new <a href="../DynamicAny/DynUnion.html">DynUnion</a> instead
37 */
38@Deprecated
39public interface DynUnion extends org.omg.CORBA.Object, org.omg.CORBA.DynAny
40{
41    /**
42     * Determines whether the discriminator associated with this union has been assigned
43     * a valid default value.
44     * @return <code>true</code> if the discriminator has a default value;
45     * <code>false</code> otherwise
46     */
47    public boolean set_as_default();
48
49    /**
50    * Determines whether the discriminator associated with this union gets assigned
51    * a valid default value.
52    * @param arg <code>true</code> if the discriminator gets assigned a default value
53    */
54    public void set_as_default(boolean arg);
55
56    /**
57    * Returns a DynAny object reference that must be narrowed to the type
58    * of the discriminator in order to insert/get the discriminator value.
59    * @return a <code>DynAny</code> object reference representing the discriminator value
60    */
61    public org.omg.CORBA.DynAny discriminator();
62
63    /**
64    * Returns the TCKind object associated with the discriminator of this union.
65    * @return the <code>TCKind</code> object associated with the discriminator of this union
66    */
67    public org.omg.CORBA.TCKind discriminator_kind();
68
69    /**
70    * Returns a DynAny object reference that is used in order to insert/get
71    * a member of this union.
72    * @return the <code>DynAny</code> object representing a member of this union
73    */
74    public org.omg.CORBA.DynAny member();
75
76    /**
77    * Allows for the inspection of the name of this union member
78    * without checking the value of the discriminator.
79    * @return the name of this union member
80    */
81    public String member_name();
82
83    /**
84    * Allows for the assignment of the name of this union member.
85    * @param arg the new name of this union member
86    */
87    public void member_name(String arg);
88
89    /**
90    * Returns the TCKind associated with the member of this union.
91    * @return the <code>TCKind</code> object associated with the member of this union
92    */
93    public org.omg.CORBA.TCKind member_kind();
94}
95