List of functions references
I'm using boost::function for making references to the functions. Can I make a list of references? For example:
boost::function<bool (Entity &handle)> behaviorRef;
And I need in a list of such pointers开发者_如何学Python. For example:
std::vector<behaviorRef> listPointers;
Of course it's wrong code due to behaviorRef isn't a type.
So the question is: how can I store a list of pointers for the function?
typedef boost::function<bool (Entity&)> behaviorRef_type;
std::vector<behaviorRef_type> listPointers;
精彩评论