Exemplo n.º 1
0
  /**
   * Sets the current position to index. The current position is indexed 0 to n-1, that is, index
   * zero corresponds to the first component. The operation returns true if the resulting current
   * position indicates a component of the DynAny and false if index indicates a position that does
   * not correspond to a component. Calling seek with a negative index is legal. It sets the current
   * position to -1 to indicate no component and returns false. Passing a non-negative index value
   * for a DynAny that does not have a component at the corresponding position sets the current
   * position to -1 and returns false.
   */
  public boolean seek(int index) {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("seek", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.seek(index);
    } finally {
      _servant_postinvoke($so);
    }
  } // seek
Exemplo n.º 2
0
  /** Is equivalent to seek(0). */
  public void rewind() {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("rewind", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      $self.rewind();
    } finally {
      _servant_postinvoke($so);
    }
  } // rewind
Exemplo n.º 3
0
  /**
   * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
   * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
   * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
   *
   * @return a deep copy of the DynAny object
   */
  public org.omg.DynamicAny.DynAny copy() {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("copy", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.copy();
    } finally {
      _servant_postinvoke($so);
    }
  } // copy
Exemplo n.º 4
0
  /**
   * Returns the TypeCode associated with this DynAny object. A DynAny object is created with a
   * TypeCode value assigned to it. This TypeCode value determines the type of the value handled
   * through the DynAny object. Note that the TypeCode associated with a DynAny object is
   * initialized at the time the DynAny is created and cannot be changed during lifetime of the
   * DynAny object.
   *
   * @return The TypeCode associated with this DynAny object
   */
  public org.omg.CORBA.TypeCode type() {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("type", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.type();
    } finally {
      _servant_postinvoke($so);
    }
  } // type
Exemplo n.º 5
0
  /** Returns the value of a DynFixed. */
  public String get_value() {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("get_value", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.get_value();
    } finally {
      _servant_postinvoke($so);
    }
  } // get_value
Exemplo n.º 6
0
  /**
   * Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are
   * equivalent and, recursively, all component DynAnys have equal values. The current position of
   * the two DynAnys being compared has no effect on the result of equal.
   *
   * @return true of the DynAnys are equal, false otherwise
   */
  public boolean equal(org.omg.DynamicAny.DynAny dyn_any) {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("equal", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.equal(dyn_any);
    } finally {
      _servant_postinvoke($so);
    }
  } // equal
Exemplo n.º 7
0
  /**
   * Returns the number of components of a DynAny. For a DynAny without components, it returns zero.
   * The operation only counts the components at the top level. For example, if component_count is
   * invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of
   * the member.
   *
   * <UL>
   *   <LI>For sequences, the operation returns the current number of elements.
   *   <LI>For structures, exceptions, and value types, the operation returns the number of members.
   *   <LI>For arrays, the operation returns the number of elements.
   *   <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is
   *       active, otherwise, it returns 1.
   *   <LI>For DynFixed and DynEnum, the operation returns zero.
   * </UL>
   */
  public int component_count() {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("component_count", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.component_count();
    } finally {
      _servant_postinvoke($so);
    }
  } // component_count
Exemplo n.º 8
0
  /**
   * Advances the current position to the next component. The operation returns true while the
   * resulting current position indicates a component, false otherwise. A false return value leaves
   * the current position at -1. Invoking next on a DynAny without components leaves the current
   * position at -1 and returns false.
   */
  public boolean next() {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("next", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.next();
    } finally {
      _servant_postinvoke($so);
    }
  } // next
Exemplo n.º 9
0
  /**
   * Initializes the value associated with a DynAny object with the value associated with another
   * DynAny object. The current position of the target DynAny is set to zero for values that have
   * components and to -1 for values that do not have components.
   *
   * @param dyn_any
   * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of
   *     target DynAny
   */
  public void assign(org.omg.DynamicAny.DynAny dyn_any)
      throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("assign", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      $self.assign(dyn_any);
    } finally {
      _servant_postinvoke($so);
    }
  } // assign
Exemplo n.º 10
0
  /**
   * Returns the DynAny for the component at the current position. It does not advance the current
   * position, so repeated calls to current_component without an intervening call to rewind, next,
   * or seek return the same component. The returned DynAny object reference can be used to get/set
   * the value of the current component. If the current component represents a complex type, the
   * returned reference can be narrowed based on the TypeCode to get the interface corresponding to
   * the to the complex type. Calling current_component on a DynAny that cannot have components,
   * such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a
   * DynAny whose current position is -1 returns a nil reference. The iteration operations, together
   * with current_component, can be used to dynamically compose an any value. After creating a
   * dynamic any, such as a DynStruct, current_component and next can be used to initialize all the
   * components of the value. Once the dynamic value is completely initialized, to_any creates the
   * corresponding any value.
   *
   * @exception TypeMismatch If called on a DynAny that cannot have components, such as a DynEnum or
   *     an empty exception
   */
  public org.omg.DynamicAny.DynAny current_component()
      throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("current_component", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.current_component();
    } finally {
      _servant_postinvoke($so);
    }
  } // current_component
Exemplo n.º 11
0
  /**
   * Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java
   * Serializable type.
   *
   * @exception TypeMismatch if the accessed component in the DynAny is of a type that is not
   *     equivalent to the requested type.
   * @exception TypeMismatch if called on a DynAny whose current component itself has components
   * @exception InvalidValue if this DynAny has components but has a current position of -1
   */
  public java.io.Serializable get_val()
      throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
          org.omg.DynamicAny.DynAnyPackage.InvalidValue {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("get_val", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.get_val();
    } finally {
      _servant_postinvoke($so);
    }
  } // get_val
Exemplo n.º 12
0
  /**
   * Inserts the Any value contained in the parameter DynAny into the Any represented by this
   * DynAny.
   *
   * @exception InvalidValue if this DynAny has components but has a current position of -1
   * @exception TypeMismatch if called on a DynAny whose current component itself has components
   */
  public void insert_dyn_any(org.omg.DynamicAny.DynAny value)
      throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
          org.omg.DynamicAny.DynAnyPackage.InvalidValue {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("insert_dyn_any", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      $self.insert_dyn_any(value);
    } finally {
      _servant_postinvoke($so);
    }
  } // insert_dyn_any
Exemplo n.º 13
0
  /**
   * Sets the value of the DynFixed. The val string must contain a fixed string constant in the same
   * format as used for IDL fixed-point literals. However, the trailing d or D is optional. The
   * return value is true if val can be represented as the DynFixed without loss of precision. If
   * val has more fractional digits than can be represented in the DynFixed, fractional digits are
   * truncated and the return value is false.
   *
   * @exception TypeMismatch If val does not contain a valid fixed-point literal or contains
   *     extraneous characters other than leading or trailing white space
   * @exception InvalidValue If val contains a value whose scale exceeds that of the DynFixed or is
   *     not initialized
   */
  public boolean set_value(String val)
      throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
          org.omg.DynamicAny.DynAnyPackage.InvalidValue {
    org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke("set_value", _opsClass);
    DynFixedOperations $self = (DynFixedOperations) $so.servant;

    try {
      return $self.set_value(val);
    } finally {
      _servant_postinvoke($so);
    }
  } // set_value