views:

58

answers:

1

Hello, 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. 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?

+3  A: 
typedef boost::function<bool (Entity&)> behaviorRef_type;
std::vector<behaviorRef_type> listPointers;
sbi
Heh, I forgot about typedef. Thank you.
Ockonal
sbi
Éric Malenfant
@Eric: Indeed. Damn. `<hangs_head_in_shame>`
sbi