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

Method getCmd

src/SimpleCLI.cpp:170–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170Command SimpleCLI::getCmd() {
171 if (!cmdQueue) return Command();
172
173 // "Pop" cmd pointer from queue
174 cmd* ptr = cmdQueue;
175
176 cmdQueue = cmdQueue->next;
177
178 // Create wrapper class and copy cmd
179 Command c(ptr, COMMAND_TEMPORARY);
180
181 // Destroy old cmd from queue
182 cmd_destroy(ptr);
183
184 return c;
185}
186
187Command SimpleCLI::getCmd(String name) {
188 return getCmd(name.c_str());

Callers

nothing calls this directly

Calls 3

CommandClass · 0.85
cmd_destroyFunction · 0.85
cmd_name_equalsFunction · 0.85

Tested by

no test coverage detected