Current location - Education and Training Encyclopedia - Resume - Cocos2dx resume template
Cocos2dx resume template
Use std::bind

Binding (&XXX:: b, this,? Std:: Placeholder:: _ 1,? ...)//There is a parameter to be passed to XXX:: b: class b function.

This class object pointer can also be a specific object pointer, such as xxx * px through px;

Std:: Placeholder:: _ 1 Number of parameters to pass.

In addition, when std::bind.

For example:

Double? xxx::C(double? * para? Bull? Su);

Binding (&xxx:: c, this,? Std:: Placeholder:: _ 1,? Really)? //? Pass a parameter to the outside and an additional parameter here.

Binding (&xxx:: c, this,? Std:: Placeholder:: _2)? //? If you pass two parameters outside, you can't pass parameters outside. You can use the following macro definition from cocos2dx X x.

# Definition? CC _ CALLBACK _ 0(__ Selector _ _, _ _ Target _ _,? ...)? Binding (&_ _ Selector _ _, _ _ Target _ _,? # # _ _ ARGS__ Virginia _ _)

# Definition? CC _ CALLBACK _ 1(__ selector _ _, _ _ target _ _,? ...)? Binding (&_ _ Selector _ _, _ _ Target _ _,? Std:: Placeholder:: _ 1,? # # _ _ ARGS__ Virginia _ _)

# Definition? CC _ CALLBACK _ 2(__ Selector _ _, _ _ Target _ _,? ...)? Binding (&_ _ Selector _ _, _ _ Target _ _,? Std:: Placeholder:: _ 1,? Std:: Placeholder:: _2,? # # _ _ ARGS__ Virginia _ _)

# Definition? CC _ CALLBACK _ 3(__ Selector _ _, _ _ Target _ _,? ...)? Binding (&_ _ Selector _ _, _ _ Target _ _,? Std:: Placeholder:: _ 1,? Std:: Placeholder:: _2,? Std:: Placeholder:: _3,? # # _ _ ARGS__ Virginia _ _)