bool DirectArrayProperty<ObjectType, MemberType>::WriteData(void *obj, unsigned index, const Variant &variant) const { if(index < Size(obj)) { return variant.ReadValue((translucent_cast<ObjectType *>(obj)->*mMember)[index]); } return false; }
bool DirectMapProperty<ObjectType, MemberType>::WriteData(void *out, const Variant &key, const Variant &value) const { MemberType &map = translucent_cast<ObjectType *>(out)->*mMember; typedef typename MemberType::key_type KeyType; typedef typename MemberType::mapped_type ValueType; if(key.CanReadAs<KeyType>()) { ValueType &target = map[key.AsValue<KeyType>()]; return value.ReadValue(target); } return false; }