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

Method del

lib_acl_cpp/include/acl_cpp/stdlib/trigger.hpp:39–49  ·  view source on GitHub ↗

* Delete a timer task with the same timestamp * @pararm o {T*} * @return {int} Return value >= 0 indicates remaining number of timer tasks * with the same timestamp, * returns -1 indicates this timer task does not exist */

Source from the content-addressed store, hash-verified

37 * returns -1 indicates this timer task does not exist
38 */
39 int del(T* o) {
40 for (typename std::vector<T*>::iterator it = objs_.begin();
41 it != objs_.end(); ++it) {
42
43 if (*it == o) {
44 objs_.erase(it);
45 return (int) objs_.size();
46 }
47 }
48 return -1;
49 }
50
51 /**
52 * Get all timer task collection with the same timestamp

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