[Overview][Types][Classes][Index] | Reference for unit 'PropertyStorage' (#lcl)

# TStoredValues

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a collection for TStoredValue collection items.

## Declaration

Source position: propertystorage.pas line 67

`type TStoredValues = class(TOwnedCollection)`
`public`
`constructor Create();` |  | Constructor for the class instance.
`function IndexOf();` |  | Gets the ordinal position in Items for the collection item with the specified name.
`procedure SaveValues; virtual;` |  | Saves all of the collection items to the Storage container for the collection.
`procedure RestoreValues; virtual;` |  | Loads all of the values for the collection Items from the Storage container for the collection.
`property Storage: TCustomPropertyStorage; [rw]` |  | Storage container used to Save and Restore the Values for the collection Items.
`property Items []: TStoredValue; default; [rw]` |  | Provides indexed access to the TStoredValue collection items by their ordinal position.
`property Values []: TStoredValue; [rw]` |  | Provides indexed access to a TStoredValue instance in the collection by its name.
`property StoredValue []: TStoredType; [rw]` |  | Provides indexed access to the value for a collection item with the specified name.
`end;`

## Inheritance

`TStoredValues` |  | Implements a collection for TStoredValue collection items.
`TOwnedCollection`
?
`TObject`

## Description

TStoredValues is a TOwnedCollection descendant which implements an owned collection for TStoredValue collection items.

TStoredValues provides properties and methods used to access the TStoredValue collection items or their values. Use Items to read and write a collection item by its ordinal position in the collection. Use Values to read and write a collection item by its name. Use StoredValue to read and write the value for a collection item by its name.

The owner of the collection (passed as an argument to the constructor) is a TCustomPropertyStorage instance stored in the Storage property. It provides a container used to read and write name/value pairs which represent the items in the collection. Use RestoreValues and SaveValues methods to read and write the collection items using the Storage container for the collection.

## See also

TStoredValue |  | A key/value pair representing a property value, with added Save/Restore features.
TStoredType |  | Alias to the type used to store a property value.
TCustomPropertyStorage |  | Defines a container used to Save and Restore property values.
TOwnedCollection