MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / Inform

Method Inform

binaryninjaapi.h:10083–10098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10081#if ((__cplusplus >= 201403L) || (_MSVC_LANG >= 201703L))
10082 template <typename... Args>
10083 bool Inform(Args... args)
10084 {
10085 // using T = std::variant<Args...>; // FIXME: remove type duplicates
10086 using T = std::variant<std::string, const char*, uint64_t, Ref<Architecture>>;
10087 std::vector<T> unpackedArgs {args...};
10088 Json::Value request(Json::arrayValue);
10089 for (auto& arg : unpackedArgs)
10090 std::visit(overload {[&](Ref<Architecture> arch) { request.append(Json::Value(arch->GetName())); },
10091 [&](uint64_t val) { request.append(Json::Value(val)); },
10092 [&](auto& val) {
10093 request.append(Json::Value(std::forward<decltype(val)>(val)));
10094 }},
10095 arg);
10096
10097 return Inform(Json::writeString(m_builder, request));
10098 }
10099#endif
10100 };
10101

Callers

nothing calls this directly

Calls 4

writeStringFunction · 0.85
ValueClass · 0.50
appendMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected