DynValueOperations.java 5.1 KB

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