MCPcopy Create free account
hub / github.com/acl-dev/acl / del

Method del

lib_acl_cpp/include/acl_cpp.cn/stdlib/trigger.hpp:38–48  ·  view source on GitHub ↗

* ɾ��һ��������ͬʱ��صĶ�ʱ���� * @pararm o {T*} * @return {int} ����ֵ >= 0 ��ʾʣ��ľ�����ͬʱ��صĶ�ʱ�������� * ���� -1 ��ʾ�ö�ʱ���񲻴��� */

Source from the content-addressed store, hash-verified

36 * ���� -1 ��ʾ�ö�ʱ���񲻴���
37 */
38 int del(T* o) {
39 for (typename std::vector<T*>::iterator it = objs_.begin();
40 it != objs_.end(); ++it) {
41
42 if (*it == o) {
43 objs_.erase(it);
44 return (int) objs_.size();
45 }
46 }
47 return -1;
48 }
49
50 /**
51 * ��ȡ������ͬʱ��ص����ж�ʱ���񼯺�

Callers 2

delMethod · 0.45
runMethod · 0.45

Calls 3

beginMethod · 0.80
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected