-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Okay, so there is more than just the problems stated in #30 . Right now I wanted to actually remove one property from a RDFPropertyMap, but only implemented a workaround in b2ee78e because this touches something deep internally: Every map entry stores the index to where the actual RDF triple in the RDFEntity lies. So if I want to remove one entry I'd need to update all the other ones.
I'd like to rework this a bit, and provide an alternative implementation/strategy to the RDFPropertyMap.
The RDFPropertyMap right now is totally dynamic in size as well as in the types of its entries.
A static variant of it would be nice: Maybe fixed in size? But at least with somewhat fixed entries. A templated version of the RDFValueProxy, and maybe without the key but with indices instead, so that one could e.g. use it as
class MyEntity : public Entity {
using Ptr = std::shared_ptr<MyEntity>;
RDFTripleArray rdf_;
RDFValue<int> age_;
RDFValue<std::string> name_;
RDFValue<MyEntity::Ptr> someRelation_;
public:
MyEntity() : age_(rdf_, 0), name_(rdf_, 1), someRelation_(rdf_, 2)
{ }
};Or the like. Just some idea.
Woops: These are 2 things.
- Fix RDFPropertyMap to correctly remove entries.
- Implement a more static alternative.