MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / ChannelCommand

Method ChannelCommand

Src/ChannelLinter/ChannelLinter.cpp:270–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 }
269
270 ChannelLinter::ChannelCommand::ChannelCommand(json const& commandDefinition) : m_ArgumentsForm(commandDefinition.at("arguments"))
271 {
272 if (!commandDefinition.contains("id"))
273 throw std::invalid_argument{ "Command definition must contain 'id' property. Invalid command:\n" + commandDefinition.dump(4) };
274 m_Id = commandDefinition["id"].get<uint16_t>();
275 if (!commandDefinition.contains("name"))
276 throw std::invalid_argument{ "Command definition id = " + std::to_string(m_Id) + " must contain 'name' property" };
277 m_Name = commandDefinition["name"].get<std::string>();
278 }
279}

Callers

nothing calls this directly

Calls 3

containsMethod · 0.80
dumpMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected