Frames | No Frames |
1: /* DynValueOperations.java -- 2: Copyright (C) 2005 Free Software Foundation, Inc. 3: 4: This file is part of GNU Classpath. 5: 6: GNU Classpath is free software; you can redistribute it and/or modify 7: it under the terms of the GNU General Public License as published by 8: the Free Software Foundation; either version 2, or (at your option) 9: any later version. 10: 11: GNU Classpath is distributed in the hope that it will be useful, but 12: WITHOUT ANY WARRANTY; without even the implied warranty of 13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14: General Public License for more details. 15: 16: You should have received a copy of the GNU General Public License 17: along with GNU Classpath; see the file COPYING. If not, write to the 18: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19: 02110-1301 USA. 20: 21: Linking this library statically or dynamically with other modules is 22: making a combined work based on this library. Thus, the terms and 23: conditions of the GNU General Public License cover the whole 24: combination. 25: 26: As a special exception, the copyright holders of this library give you 27: permission to link this library with independent modules to produce an 28: executable, regardless of the license terms of these independent 29: modules, and to copy and distribute the resulting executable under 30: terms of your choice, provided that you also meet, for each linked 31: independent module, the terms and conditions of the license of that 32: module. An independent module is a module which is not derived from 33: or based on this library. If you modify this library, you may extend 34: this exception to your version of the library, but you are not 35: obligated to do so. If you do not wish to do so, delete this 36: exception statement from your version. */ 37: 38: 39: package org.omg.DynamicAny; 40: 41: import org.omg.CORBA.TCKind; 42: import org.omg.DynamicAny.DynAnyPackage.InvalidValue; 43: import org.omg.DynamicAny.DynAnyPackage.TypeMismatch; 44: 45: /** 46: * Defines operations, applicable to DynValue. From the view point of DynAny, 47: * the Value is very much like structure. However, differently from the 48: * structure, the value type can also have private members. The private members 49: * of DynValue are also accessible via this interface, but this possibility 50: * should only be used in applications like in debuggers or inter-orb bridges. 51: * Unlike structure, the value can also be equal to <code>null</code>. 52: * 53: * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) 54: */ 55: public interface DynValueOperations 56: extends DynAnyOperations, DynValueCommonOperations 57: { 58: /** 59: * Get the kind of the current member. 60: * 61: * @return the kind of member at the current position. 62: * 63: * @throws TypeMismatch if this DynValue is holding <code>null</code>. 64: * @thorws InvalidValue if the current position does not indicate the member. 65: */ 66: TCKind current_member_kind() 67: throws TypeMismatch, InvalidValue; 68: 69: /** 70: * Get the name of the current member. 71: * 72: * @return the name of the current member as defined by the typecode. May be 73: * an empty string. 74: * 75: * @throws TypeMismatch if this DynValue is holding <code>null</code>. 76: * @thorws InvalidValue if the current position does not indicate the member. 77: */ 78: String current_member_name() 79: throws TypeMismatch, InvalidValue; 80: 81: /** 82: * Get all members as an array of the named DynAny's. The returned names are 83: * set as they are defined by typecode. 84: * 85: * @return the array, representing the members of this instance of value. 86: * 87: * @throws InvalidValue if this DynValue is holding <code>null</code>. 88: */ 89: NameDynAnyPair[] get_members_as_dyn_any() 90: throws InvalidValue; 91: 92: /** 93: * Get all members as an array of the named Any's. The returned names are set 94: * as they are defined by typecode. 95: * 96: * @return the array, representing the members of this instance of value. 97: * 98: * @throws InvalidValue if this DynValue is holding <code>null</code>. 99: */ 100: NameValuePair[] get_members() 101: throws InvalidValue; 102: 103: /** 104: * Set all members from the array of the named Any's. 105: * 106: * @param value the array, where the data for fields of the structure must 107: * occur exactly in the same order, as defined by typecode. 108: * 109: * @throws TypeMismatch if the type or name of the array member does not match 110: * the name and type of the corresponding field in the DynValue data 111: * structure. The empty string is assumed matching any name. 112: * 113: * @throws InvalidValue if the size of the array does not match the number of 114: * fields. 115: */ 116: void set_members_as_dyn_any(NameDynAnyPair[] value) 117: throws TypeMismatch, InvalidValue; 118: 119: /** 120: * Set all members from the array of the named Any's. 121: * 122: * @param value the array, where the data for fields of the structure must 123: * occur exactly in the same order, as defined by typecode. 124: * 125: * @throws TypeMismatch if the type or name of the array member does not match 126: * the name and type of the corresponding field in the DynValue data 127: * structure. The empty string is assumed matching any name. 128: * 129: * @throws InvalidValue if the size of the array does not match the number of 130: * fields. 131: */ 132: void set_members(NameValuePair[] value) 133: throws TypeMismatch, InvalidValue; 134: }