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

Supports STL containers? #58

Open
iceboundflame opened this issue Sep 30, 2016 · 2 comments
Open

Supports STL containers? #58

iceboundflame opened this issue Sep 30, 2016 · 2 comments
Labels

Comments

@iceboundflame
Copy link

This library looks pretty neat! Does it support containers (e.g. std::map, std::vector, std::set) of objects? I see ArrayProperty but it only seems to support vectors. I am dealing with some objects that have multiple layers of containers, e.g. map of map of vectors.

If it's not supported, how might this library be extended to support these containers?

@billyquith
Copy link
Owner

billyquith commented Sep 30, 2016

Thanks! - Most of the effort so far has been in refactoring Boost out of the library, and now separating "uses" of the type data from the the type data itself. I'm gradually adding functionality as is required. Containers haven't really had much attention, but that doesn't mean they are going to be ignored.

Please look at the 2.1 branch if you are grokking the code. This is will shortly be in master. There isn't really a rigorous versioning system at the moment, it is really so I don't break master whilst refactoring and there is a show of progress.

How might the library be extended? This usually involves finding some use cases, branching, refactoring, and the arm waving and wailing when the problem becomes harder than anticipated. Then lots of ☕ and I find thinking in the 🛀 very constructive, but not ideal for meetings. 😄

A map of map of map of vectors. Hmm. Just thinking out loud... Ponder declarations require concrete types, i.e. you can't register a template. STL containers have a standard interfaces, perhaps there needs to be a utility class when you can declare a container by passing it the type it contains? This would save duplication of declarations. e.g.

ponder::stl::declareMap<K,V>();
ponder::stl::declareVector<V>();

ObjectTraits may need work.

What are you trying to do with the API, broadly speaking?

@billyquith
Copy link
Owner

how might this library be extended to support these containers?

You could perhaps use properties or regular class functions to access and modify your containers. These can then be declared in the usual way?

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

No branches or pull requests

2 participants