=encoding euc-jp =head1 NAME =begin original Win32::OLE::Enum - OLE Automation Collection Objects =end original Win32::OLE::Enum - OLE オートメーションコレクションオブジェクト =head1 SYNOPSIS my $Sheets = $Excel->Workbooks(1)->Worksheets; my $Enum = Win32::OLE::Enum->new($Sheets); my @Sheets = $Enum->All; while (defined(my $Sheet = $Enum->Next)) { ... } =head1 DESCRIPTION =begin original This module provides an interface to OLE collection objects from Perl. It defines an enumerator object closely mirroring the functionality of the IEnumVARIANT interface. =end original このモジュールは Perl から OLE コレクションオブジェクトへのインタフェースを 提供します。 これは IEnumVARIANT インターフェースの機能をほとんどそのままのような列挙する オブジェクトを定義します。 =begin original Please note that the Reset() method is not available in all implementations of OLE collections (like Excel 7). In that case the Enum object is good only for a single walk through of the collection. =end original Reset() メソッドが OLE コレクションのすべての実装で利用できるわけではない (Excel7 のように)ことに注意してください。 その場合、Enum オブジェクトはコレクションを一度だけ通してみていくためだけに 有効です。 =head2 Functions/Methods (関数/メソッド) =over 8 =item Win32::OLE::Enum->new($object) =begin original Creates an enumerator for $object, which must be a valid OLE collection object. Note that correctly implemented collection objects must support the C and C methods, so creating an enumerator is not always necessary. =end original $object のための Enum オブジェクトを作成します。 $object は正しい OLE コレクションオブジェクトでなければなりません。 正しく実装されたコレクションオブジェクトは C と C メソッドを サポートしていなければならないことに注意してください; そのため Enum オブジェクトは常には必要ありません。 =item $Enum->All() =begin original Returns a list of all objects in the collection. You have to call $Enum->Reset() before the enumerator can be used again. The previous position in the collection is lost. =end original そのコレクションのなかのすべてのオブジェクトのリストを返します。 列挙するオブジェクトをもう一度、使う前に $Enum->Reset() を 呼ばなければなりません。 コレクション内の以前の位置は失われます。 =begin original This method can also be called as a class method: =end original このメソッドはクラスメソッドとしても呼び出すことができます: my @list = Win32::OLE::Enum->All($Collection); =item $Enum->Clone() =begin original Returns a clone of the enumerator maintaining the current position within the collection (if possible). Note that the C method is often not implemented. Use $Enum->Clone() in an eval block to avoid dying if you are not sure that Clone is supported. =end original (もし可能であれば)コレクションでの現在の位置を保持する Enum オブジェクトの クローンを返します。 C メソッドはしばしば実装されていないことに注意してください。 Clone がサポートされているかどうかわからなければ、die するのを避けるため eval ブロックで $Enum->Clone() を使ってください。 =item $Enum->Next( [$count] ) =begin original Returns the next element of the collection. In a list context the optional $count argument specifies the number of objects to be returned. In a scalar context only the last of at most $count retrieved objects is returned. The default for $count is 1. =end original コレクションの次の要素を返します。 リストコンテキストではオプションの $count 引数は返されるオブジェクトの数を 指定します。 スカラコンテキストでは $count の取り出されたオブジェクトの最後のものが 返されます。 $count のデフォルトは 1 です。 =item $Enum->Reset() =begin original Resets the enumeration sequence to the beginning. There is no guarantee that the exact same set of objects will be enumerated again (e.g. when enumerating files in a directory). The methods return value indicates the success of the operation. (Note that the Reset() method seems to be unimplemented in some applications like Excel 7. Use it in an eval block to avoid dying.) =end original 列挙の順番を最初に戻します。 全く同じオブジェクトの集合が再び列挙されるかどうかは保証されません(例えば ディレクトリに列挙されているファイルのとき)。 メソッドは処理が正常であることを示す値を返します(Reset() メソッドは Excel 7 のようにアプリケーションによっては実装されていないようであることに 注意してください。 die ことを避けるために、evalブロックを使ってください。) =item $Enum->Skip( [$count] ) =begin original Skip the next $count elements of the enumeration. The default for $count is 1. The functions returns TRUE if at least $count elements could be skipped. It returns FALSE if not enough elements were left. =end original 列挙の次の $count 分の要素を飛ばします。 $count のデフォルトは 1 です。 もし少なくとも $count 分の要素が飛ばすことができれば関数は TRUE を返します。 十分な数の要素が残っていなければ FALSE を返します。 =back =head1 AUTHORS/COPYRIGHT =begin original This module is part of the Win32::OLE distribution. =end original このモジュールは Win32::OLE ディストリビューションの一部です。 =begin meta Translate: Hippo2000 (0.14) Update: SHIRAKATA Kentaro (0.1502) Status: completed =end meta =cut