e*r
3 楼
这个CALLBACK到底指的是call什么东西back?
每次就见pass 进去一个function pointer, 然后在操作中的某一步用到这个function pointer.
的f
多态
质上
【在 w***g 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: callback function一般使用function pointer实现的。C++里的functor就是包装了的f
: unction pointer。function pointer除了用来callback,还可以用来干别的,比如多态
: 在不少语言里就是通过function pointer实现的,比如C++里的virtual function本质上
: 就是function pointer,C虽然不直接支持多态,但是用function pointer可以模拟。
w*g
4 楼
j*r
5 楼
Call-back is widely used for asynchornized interaction. It's implemented by
passing a function pointer to a call. when the called operation is exceuted,
at some point, the call-back function is called to do something for the
caller.
function pointer is like a variable for functions, and a variable for values.
passing a function pointer to a call. when the called operation is exceuted,
at some point, the call-back function is called to do something for the
caller.
function pointer is like a variable for functions, and a variable for values.
h*o
6 楼
For what I see so far, most call back functions are life cycle functions.
In other words, once you make a call to a functionality, the container/
framework/function code will provide a chance for you to know the major
events or mess up with the process. Usually they provide you a chance to
inject your own code into the process if you want to step in. Or the process
just fires the event which you can register.
In other words, once you make a call to a functionality, the container/
framework/function code will provide a chance for you to know the major
events or mess up with the process. Usually they provide you a chance to
inject your own code into the process if you want to step in. Or the process
just fires the event which you can register.
相关阅读
被三哥写的java绕晕了最速降线求解[bssd]宇宙论这玩意儿凭什么卖60m?!一个华为, 就把美国吓破了胆Re: 觉得FB尹伊非常不简单 (转载)StackOverflow咋回事谁捅了卫老师哪根神经了? 出来道歉!看把卫老师这几天累的!Dansy推出震撼歌曲:硅谷华人雄风震天吼!有没有想过那些IoT大数据平台以后可能没鸟用了?Re: 自从java出现 美国就已经走快速下波路 (转载)这个小姐姐不简单前后端分离为什么最近几年才开始流行?移动端能部署一些用deep learning做的简单姿态估计吗?C/C++ 不火了, 代表美帝的科技产业不再领先全球了systemd的问题,忘记了是哪位网友?netghost还是HCI找了个人跑xgboostC开发速度是python 5-10倍这个匿名类怎么写?C++的又一作用