Closed niniemann closed 6 years ago
By the way, although this implementation differs from what I proposed previously, it fixes #31. The overhaul of RDFPropertyMap has removed the need for the workaround when deleting entries, and the SemanticEntity is the static alternative.
I've updated the TripleIterator to return triples by value instead of reference. I'm still open for naming-suggestions, but wouldn't mind to leave it as it is. :wink:
This PR implements two major changes which build upon each other:
Of course there are still some limitations. One of them is the fact that you need to derive from SemanticEntity to make use of its features... This may be improved in the future.
Oh, and I'm also not quite satisfied with the RDFEntity-iterator-stuff. Both the RDFPropertyMap and the SemanticEntity do not store any actual
Triple
s , but the iterator constructs them on demand, without storing them. I use a static variable in the iterators dereference-operator for that, but that means that the returnedconst Triple&
is not really const! As soon as the iterator is incremented and dereferenced again, the static local variable changes its value... And when the iterator goes out of scope? :slightly_frowning_face:So, be careful with that, I haven't really figured out how to do this properly. Any ideas? (Take a look at this part of the code to see what I mean).