OLE::PropertySet - Handles Property Sets |
OLE::PropertySet - Handles Property Sets
$Revision: 1.1.1.1 $ $Date: 1998/02/25 21:13:00 $
use OLE::Storage(); use OLE::PropertySet();
$Var = OLE::Storage -> NewVar; $Doc = OLE::Storage -> open ($Startup, $Var, "testfile.doc");
@list = string { $PS -> property (2, 5, 6) }
@list = string { $PS{2}, $PS{5}, $PS{6} }
OLE::PropertySet gives read access to property sets. These are streams, that e.g. are residing inside of Structured Storage documents. Because property set technology is not limited to these documents borders, this package was designed to connect easily to Structured Storage documents and to arbitrary property set streams.
To understand the use of this package, I recommend highly to study the tool ``ldat''.
1
||O
== $PS -> dictionary (\%dict [,1
])
Stores the dictionary of PropertySet $PS in hash %dict. The dictionary is a hash array having the property identifier numbers as keys and the identifier names as values. By default the default dictionaries defined in OLE::PropertySet are also printed out. To leave them out, specify the optional parameter 1.
Normally you will not need this method, but use idset()
instead.
1
||O
== $PS -> idset (\%idset [,1
]);
Stores the idset of PropertySet $PS in hash %idset. The idset is a hash array based on the really available property identifiers. %idset has property identifier numbers as keys and the identifier names according to the PropertySets dictionary as values. The optional parameter spares out the default dictionary (see dictionary).
Note: Some or all id names can be empty, if they cannot be figured out. Nevertheless the ids are valid.
undef
= $PS -> idstr ($id [,1
])
Returns the property identifier string for property $id according to the PropertySets dictionary. The optional parameter spares out the default dictionary (see dictionary).
0
==filter
])
2. load ($Startup, $Var, $name, \$buf [,filter
])
load()
is the constructor of OLE::PropertySet. You can call it
either with a Property Storage id $pps and a Structured Storage
document handle $Doc as parameters, or with an PropertySetName $name
and a reference to a PropertySetBuffer \$buf.
Creates a new Variable handling object and returns it. (see also: open)
Returns a $Property or a list of @Properties. (See OLE::Storage::Property to look what to do with it / them). If you applied a filter when loading $PS, property returns a scalar or a list of scalars.
$type||0 = PropertySet -> type ($name)
Returns the type of a PropertySet according to its name. The type is a OLE::PropertySet internal. It can be used to determine, if a property is a PropertySet or not. Momentarily are existing:
type meaning --------------------------------------------------- 0x01 property is a "\05" PropertySet 0x10 property is a "\01CompObj" fake PropertySet 0x00 property is no PropertySet at all
the OLE::Storage::Property manpage, demonstration program ``ldat''
Martin Schwartz <schwartz@cs.tu-berlin.de>.
OLE::PropertySet - Handles Property Sets |