NAME

DynamicAny::DynAny - The generic API for dynamic any's


SYNOPSIS

  use lib "$ENV{OPALORB_ROOT}";
  use CORBA;
  use CORBA::Exception;
  try {
    my $orb = CORBA::ORB_init(\@ARGV);
    my $dynanyfactory = $orb->resolve_initial_references('DynAnyFactory');
    if (CORBA::is_nil($dynanyfactory)) {
      print STDERR "Unable to resolve the DynAnyFactory\n";
      exit(1);
    }
    my $members = new CORBA::StructMemberSeq();
    push(@$members, new CORBA::StructMember('line', CORBA::_tc_long));
    my $tc = $orb->create_exception_tc('IDL:SyntaxError:1.0', 'e', $members);
    my $da = $dynanyfactory->create_dyn_any_from_type_code($tc);
    $da->insert_long($line_number);
    ...
    $da->destroy();
  }
  catch CORBA::Exception with {
    my $ex = shift;
    print STDERR "Exception: $ex\n";
  }
  catch Error::Simple with {
    my $ex = shift;
    print STDERR "Exception: $ex\n";
  };


DESCRIPTION

This is the base class for all dynamic any's.


METHODS

assign - Assign another DynAny to this DynAny. The DynamicAny::DynAny::TypeMismatch exception will be thrown if the type codes are not equivalent.

component_count - Returns the number of components that belong to this DynAny. It will return zero for those DynAny's that can not contain components (i.e., DynAny's with simple type codes).

copy - Make a copy of the DynAny. If, for example, the DynAny is really a DynStruct, the copy will also be a DynStruct.

current_component - Return the current component DynAny of the base DynAny. A DynamicAny::DynAny::TypeMismatch exception will be thrown, if this is called on a generic DynAny.

destroy - Clears the ``active'' flag. Objects are automatically reference counted, so this isn't truly necessary. However, invoking other methods on a ``destroyed'' DynAny will result in a CORBA::OBJECT_NOT_EXIST exception.

equal - Compare this DynAny to another. They will only be equal if the type codes are equivalent and the values stored are equal as well.

from_any - Set this DynAny from a CORBA::Any. The DynamicAny::DynAny::TypeMismatch exception will be thrown if the type codes are not equivalent.

get_any - Return the CORBA::Any from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_boolean - Return the boolean from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_boolean_seq - Return the boolean sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_char - Return the character from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_char_seq - Return the character sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_double - Return the double from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_double_seq - Return the double sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_dyn_any - Identical to get_any, but returns it as a DynAny.

get_float - Return the float from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_float_seq - Return the float sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_long - Return the long from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_long_seq - Return the long sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_longdouble - Return the long double from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_longdouble_seq - Return the long double sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_longlong - Return the long long from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_longlong_seq - Return the long long sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_octet - Return the octet from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_octet_seq - Return the octet sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_reference - Return the object reference from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_short - Return the short from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_short_seq - Return the short sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_string - Return the string from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_typecode - Return the CORBA::TypeCode from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_ulong - Return the unsigned long from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_ulong_seq - Return the unsigned long sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_ulonglong - Return the unsigned long long from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_ulonglong_seq - Return the unsigned long long sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_ushort - Return the unsigned short from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_ushort_seq - Return the unsigned short sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_wchar - Return the wchar from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_wchar_seq - Return the wchar sequence from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

get_wstring - Return the wstring from this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type specified by this method.

insert_any - Insert a CORBA::Any into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_boolean - Insert a boolean into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_boolean_seq - Insert a boolean sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_char - Insert a char into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_char_seq - Insert a char sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_double - Insert a double into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_double_seq - Insert a double sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_dyn_any - Identical to insert_any, but takes a DynAny instead of a CORBA::Any.

insert_float - Insert a float into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_float_seq - Insert a float sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_long - Insert a long into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_long_seq - Insert a long sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_longdouble - Insert a long double into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_longdouble_seq - Insert a long double sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_longlong - Insert a long long into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_longlong_seq - Insert a long long sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_octet - Insert an octet into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_octet_seq - Insert an octet sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_reference - Insert an object reference into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_short - Insert a short into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_short_seq - Insert a short sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_string - Insert a string into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_typecode - Insert a CORBA::TypeCode into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_ulong - Insert an unsigned long into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_ulong_seq - Insert an unsigned long sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_ulonglong - Insert an unsigned long long into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_ulonglong_seq - Insert an unsigned long long sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_ushort - Insert an unsigned short into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_ushort_seq - Insert an unsigned short sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_wchar - Insert an wchar into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_wchar_seq - Insert a wchar sequence into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

insert_wstring - Insert an wstring into this DynAny. It will throw a DynamicAny::DynAny::TypeMismatch exception if the stored type does not correspond to the type being inserted.

next - Advance the current position to the next component in the DynAny. It returns false if there are no more components.

rewind - This is equivalent to calling seek(0).

seek - Set the current position to the index provided. It returns false if the specified index does not correspond to the position of a component.

to_any - Convert this DynAny into a CORBA::Any.

type - Return the CORBA::TypeCode associated with this DynAny.