Demo8 shows two ways of implementing lists of settings groups of type TElem.
TIntIndexSettings shows how to implement a counted list of settings groups.
The group names are generated based on the groups position in the list of sub groups and are of no use except for when saving or loading. Elements are accessed using the GetElem method which uses an integer as an array index..
ex. In the XML file these nodes would exist:
<IntIndex Count="3">
<Group_0 IntVal="1" StrVal="aaa" />
<Group_1 IntVal="2" StrVal="bbb" />
<Group_2 IntVal="3" StrVal="ccc" />
</IntIndex>
The group names are the index names.
ex. In the XML file these nodes would exist:
<StrIndex>
<xxx IntVal="1" StrVal="aaa" />
<yyy IntVal="2" StrVal="bbb" />
<zzz IntVal="3" StrVal="ccc" />
</StrIndex>
In the Loaded method we get the ISettingsStorageQuery implementation of the storage which we use to find what sub groups the current group has.
It could be tricky making an implementation where a group can have several sub groups with the same group name. (This often occurs in XML structures.) PtSettings is not designed with that in mind. However, doing so would make such settings groups incompatible with storages other than XML storages.