I read how to set regular vectors for python in boost python, but I want to know how to set and use a vector. For example, I have a shared_ptrs vector as follows:
std::vector<shared_ptr<StatusEffect> > Effects;
Based on material for exhibiting vectors, I should be able to expose this type of class. I want to know how can I add to it? How to create instances of shared_ptr<StatusEffect> , since I donโt have access to the new one, and shared_ptr can point to several derived types, which makes adding a static creation method to each class a little tedious.
Does anyone have pointers or can suggest how to do this? Finding a good example for boost :: python for what I want to do was difficult
Thanks in advance
Megatron
source share