MCPcopy Create free account
hub / github.com/SpacehuhnTech/SimpleCLI / unpause

Method unpause

src/SimpleCLI.cpp:27–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void SimpleCLI::unpause() {
28 pauseParsing = false;
29
30 // Go through queued errors
31 while (onError && errored()) {
32 onError(getError().getPtr());
33 }
34
35 // Go through queued commands
36 if(available()) {
37 cmd* prev = NULL;
38 cmd* current = cmdQueue;
39 cmd* next = NULL;
40
41 while(current) {
42 next = current->next;
43
44 // Has callback, then run it and remove from queue
45 if(current->callback) {
46 current->callback(current);
47 if(prev) prev->next = next;
48 cmd_destroy(current);
49 } else {
50 prev = current;
51 }
52
53 current = next;
54 }
55 }
56}
57
58void SimpleCLI::parse(const String& input) {
59 parse(input.c_str(), input.length());

Callers

nothing calls this directly

Calls 2

cmd_destroyFunction · 0.85
getPtrMethod · 0.45

Tested by

no test coverage detected