Hello, I have another one question about functions reference. For example, I have such definition:
typedef boost::function<bool (Entity &handle)> behaviorRef;
std::map< std::string, ptr_vector<behaviorRef> > eventAssociation;
The first question is: how to insert values into such map object?
I tried:
eventAssociation.insert(std::pair< std::string, ptr_vector<behaviorRef> >(eventType, ptr_vector<behaviorRef>(callback)));
But the error:
no matching function for call to ‘boost::ptr_vector<boost::function<bool(Entity&)> >::push_back(Entity::behaviorRef&)’
And I undersatnd it, but can't make workable code.
The second question is how to call such functions? For example, I have one object of behaviorRef, how to call it with boost::bind with passing my own values?