You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to extend ponder::Value to fully support arrays?
Currently, arrays (T[], std::vector, std::list) are supported as properties of classes. Alas, ponder::Value does not support arrays, i.e. it cannot hold an array. In my opinion, this has the following drawbacks:
I cannot declare a function to ponder that expects an array as parameter.
When I want to serialize an array, I have to do it value per value (through functionality of ponder::ArrayProperty). (Our domain is image processing where one has large arrays, making value per value serialization too expensive.)
If I have a class with an array property, calling ponder::Property::get(object) or ponder::Property::set(object, value), respectively, gets or sets the first element of the array (which is counterintuitive in my opinion).
I don't know what the best way would be for ponder::Value to support arrays. I could imagine that, once ponder::Value supports arrays, ponder::Property::get(object) and ponder::Property::set(object, value) work with the array rather with the first element. The value per value approach would still be possible through ponder::ArrayProperty.
In one of my earlier comments I wrote that maybe we try to use ponder for something it was not designed for. Therefore, I am curious about your opinion and plans regarding my recent issues. Thank you in advance.
The text was updated successfully, but these errors were encountered:
maybe we try to use ponder for something it was not designed for.
Perhaps just using it in an inefficient way. Marshalling all of the data backwards and forwards through an API like this will be less efficient in any form. E.g. similar problems occur if you are using a managed code wrapper in Dot Net.
Perhaps the way to go is just to write a load and save function an expose these?
Would it be possible to extend
ponder::Value
to fully support arrays?Currently, arrays (
T[]
,std::vector
,std::list
) are supported as properties of classes. Alas,ponder::Value
does not support arrays, i.e. it cannot hold an array. In my opinion, this has the following drawbacks:ponder::ArrayProperty
). (Our domain is image processing where one has large arrays, making value per value serialization too expensive.)ponder::Property::get(object)
orponder::Property::set(object, value)
, respectively, gets or sets the first element of the array (which is counterintuitive in my opinion).I don't know what the best way would be for
ponder::Value
to support arrays. I could imagine that, onceponder::Value
supports arrays,ponder::Property::get(object)
andponder::Property::set(object, value)
work with the array rather with the first element. The value per value approach would still be possible throughponder::ArrayProperty
.In one of my earlier comments I wrote that maybe we try to use ponder for something it was not designed for. Therefore, I am curious about your opinion and plans regarding my recent issues. Thank you in advance.
The text was updated successfully, but these errors were encountered: