NAME

DynamicAny::DynAnyFactory - Factory object for creating DynAny'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 $tc = $orb->create_exception_tc('IDL:NotGood:1.0', 'e1', []);
    my $ds = $dynanyfactory->create_dyn_any_from_type_code($tc);
    ...
    $ds->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 factory object is used to create the various types of dynamic any's.


METHODS

create_dyn_any - Creates a new dynamic any based on the specified CORBA::Any parameter.

create_dyn_any_from_type_code - Creates a new dynamic any based on the specified CORBA::TypeCode parameter. The value is default initialized based on the kind of the type code.

create_dyn_any_without_truncation - This is exactly the same as create_dyn_any. It is here for completeness, since ValueType's are not supported.

create_multiple_anys - Creates a sequence of any's from a sequence of dynaic any's.

create_multiple_dyn_anys - Creates a sequence of dynamic any's from a sequence of any's.