J
James Pascoe
Dear All,
Apologies if this is OT.
I have a C program which processes an arbitrary number of structs that
are stored in a hash table. (The nature of the processing and the
layout of the structs is irrelevant to this post, so I wont bore you
with the details).
My problem is that I need some way of distinguishing the processed
structs from those that are unprocessed. Obviously, I can add a
`processed' field to the struct definition - but, I don't want to do
this as the struct is part of a public API and I want to keep internal
details hidden.
Also, I could have some other form of data structure - to keep track
of what has been processed, but ideally, I would like to avoid or at
best minimise the additional complexity. Whatsmore, I need to keep the
original structs in the hash table.
Has anybody got a really neat solution to this ?
Thanks in advance,
James
Apologies if this is OT.
I have a C program which processes an arbitrary number of structs that
are stored in a hash table. (The nature of the processing and the
layout of the structs is irrelevant to this post, so I wont bore you
with the details).
My problem is that I need some way of distinguishing the processed
structs from those that are unprocessed. Obviously, I can add a
`processed' field to the struct definition - but, I don't want to do
this as the struct is part of a public API and I want to keep internal
details hidden.
Also, I could have some other form of data structure - to keep track
of what has been processed, but ideally, I would like to avoid or at
best minimise the additional complexity. Whatsmore, I need to keep the
original structs in the hash table.
Has anybody got a really neat solution to this ?
Thanks in advance,
James