Okay, this is my second attempt. I strongly believe that these improvements do not complicate the system in any way. They even make it easier. The reinterpret_cast existed because of a design flaw, that is now removed. The majority of changes is in Property.h. It is not much. However, I had to remove the reinterpret_casts from most of the accept methods, that is why it seems like a lot changed. There is now only one Property template, which makes it less “fragile”. The specialization takes now place in the PropertyClass template. What still bothers me is that you have to forward the constructor of your own properties. If we are going to remove the “value storing properties”, I would like to remove this boilerplate code as well.
I also simplified the code by merging the PropertyVisitor and PropertyCategoryVisitor.
Edit: Tested on Mac and Windows. ref #85. No macros used.
Okay, this is my second attempt. I strongly believe that these improvements do not complicate the system in any way. They even make it easier. The reinterpret_cast existed because of a design flaw, that is now removed. The majority of changes is in
Property.h
. It is not much. However, I had to remove the reinterpret_casts from most of the accept methods, that is why it seems like a lot changed. There is now only oneProperty
template, which makes it less “fragile”. The specialization takes now place in thePropertyClass
template. What still bothers me is that you have to forward the constructor of your own properties. If we are going to remove the “value storing properties”, I would like to remove this boilerplate code as well. I also simplified the code by merging the PropertyVisitor and PropertyCategoryVisitor.Edit: Tested on Mac and Windows. ref #85. No macros used.