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

Method add

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

* Add a task object * @pararm o {T*} */

Source from the content-addressed store, hash-verified

120 * @pararm o {T*}
121 */
122 void add(T* o) {
123 int ttl = o->get_ttl();
124 long long key = get_curr_stamp() + ttl;
125
126 trigger_item<T>* item;
127 trigger_iter_t it = items_.find(key);
128 if (it == items_.end()) {
129 item = new trigger_item<T>(items_);
130 items_[key] = item;
131 } else
132 item = it->second;
133 item->add(o);
134 o->set_key(key);
135 }
136
137 /**
138 * Delete a task object. Internally calls o->get_key() method to get the key of

Callers

nothing calls this directly

Calls 6

get_curr_stampFunction · 0.85
get_ttlMethod · 0.80
findMethod · 0.45
endMethod · 0.45
addMethod · 0.45
set_keyMethod · 0.45

Tested by

no test coverage detected