#248 closed defect (fixed)
psMetadataSetIterator/psMetadataGet{Next,Previous} doesn't match psListIterator API
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | Eric.VanAlst@… |
Description
The psList iterator API has been refactored, and the psMetadata iterator API no
longer matches it (as they are just wrappers to the psList iterator).
One option is to just remove these functions altogether and just use the psList
within the psMetadata if one needs to iterate over all the members, otherwise
there should be one-to-one wrappers to the psList iterator API in the psMetadata
API.
-rdd
Change History (4)
comment:1 by , 22 years ago
| Owner: | changed from to |
|---|
comment:2 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 21 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
We have decided to re-add the metadata iterators. We've decided we need the
feature of searching based on a matched string. I am specifying it as a regex,
and we can supply some regex code examples if you need. I have cleaned the SDRS
text to be more consistent with the psList method of creating and using iterators:
psListIterator *psMetadataIteratorAlloc(psMetadata *md, int location, bool mutable);
bool psMetadataIteratorSet(psListIterator *iterator, int location);
psMetadataItem *psMetadataGetAndIncrement(psListIterator *iterator, const char
*regex);
psMetadataItem *psMetadataGetAndDecrement(psListIterator *iterator, const char
*regex);
comment:4 by , 21 years ago
| Cc: | added |
|---|---|
| Resolution: | → fixed |
| Status: | reopened → closed |

The only concern I have with that solution is that it loses the feature
specified for the psMetadata iterators of being able to restrict the results on
the basis of a key (I assume this part of the iterators was not implemented
yet). On the other hand, it is not clear that this particular API is so useful
to the end user. I can imagine wanting to extract all of a subset of metadata
entries on the basis of the key (say, get all BIAS.* values), but I doubt I
would want to iterate over them like this. rather, I would probably want a list
of the possible keys, or perhaps a metadata subset or something.
So, in conclusion, let's go with your suggestion of dropping the psMetadata
iterator entries. In the SDRS, I'll keep the paragraph that discusses them with
a note identifying them as ides for a future feature, the details of which will
be deferred until we gain experience using the psMetadata structures.