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

Added function to retrieve all the resources<T> from the ResourceManager #364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added function to retrieve all the resources<T> from the ResourceManager #364

wants to merge 1 commit into from

Conversation

roig
Copy link
Contributor

@roig roig commented Aug 19, 2019

Hello mosra, I need that feature. #363

Let's discuss how to implement it 😄 I added a getAll function. Should I go with tests or do you want that feature implemented in another way?

@mosra
Copy link
Owner

mosra commented Aug 19, 2019

Hi, sorry, being busy with other things. How fast you need that?

I think the best way to go about this is exposing a resources<T>() that returns something that can be iterated through (so, having a begin()/end()), as that's better than forcing the users into a std::vector and is also allocation-free. I have a sketch in mind, but won't be able to get to it until much later today (but more likely tomorrow) -- in the meantime, can you live with the code you have right now?

@mosra mosra added this to the 2019.0b milestone Aug 19, 2019
@roig
Copy link
Contributor Author

roig commented Aug 19, 2019

Yes of course. In the meantime I will try to implement it myself.

@roig
Copy link
Contributor Author

roig commented Aug 19, 2019

woah.. I don't have the knowledge to do this.. sorry. I will wait your implementation. 😢

I started a class Resources with begin and end methods that will return a ResourceIterator. But don't know exactly how to retrieve iterators from Implementation::ResourceManagerData.

@mosra mosra mentioned this pull request Oct 15, 2019
60 tasks
@mosra mosra modified the milestones: 2019.0b, 2019.0c Oct 19, 2019
@mosra mosra modified the milestones: 2020.0a, 2020.0b Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants