Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make AbstractObject move constructible and move assignable #357

Open
untereiner opened this issue Feb 5, 2025 · 1 comment
Open

make AbstractObject move constructible and move assignable #357

untereiner opened this issue Feb 5, 2025 · 1 comment

Comments

@untereiner
Copy link

Is your feature request related to a problem? Please describe.
I would like to transform the unordered_map from getDataObjects. However it is not possible to process it because the object behind of std::unique_ptr is not movable.

Describe the solution you'd like
Make AbstractObject movable or remove the unique_ptr

Describe alternatives you've considered
n.a.

Additional context
n.a.

@philippeVerney
Copy link
Member

Hi Lionel,

The ownership of an AbstractObject is managed by the DataObjectRepository. So, I think I should even make AbstractObject non copyable (and still non movable).
Which kind of transform is not allowed? Could you share some few lines of codes?

Removing unique_ptr would somehow lead to the same result than getDataObjectsGroupedByDataType() (grouping by datatype instead of grouping by UUID), is it not OK with you?
You also have the option to loop on getUuids and then getDataObjectByUuid

getDataObjects returns unique_ptr because it is a direct (const) reference on the class member to get most of performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants