Exemplo n.º 1
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