Loading...
Searching...
No Matches
BinaryNinja::MCP::IntegerExpression Class Reference

A parameter for ToolBuilder::Param, or an item kind for List, that accepts an unsigned integer, or an expression string evaluated against the call's binary view. More...

Detailed Description

A parameter for ToolBuilder::Param, or an item kind for List, that accepts an unsigned integer, or an expression string evaluated against the call's binary view.

Public Member Functions

IntegerExpression & RelativeTo (std::string name)
 Evaluates expressions with the value of the earlier Address, IntegerExpression, UInt or Int parameter name as the current address.
const std::string * GetRelativeTo () const
rapidjson::Value Schema (detail::Allocator &allocator) const
rapidjson::Value DefaultJson (uint64_t value, detail::Allocator &allocator) const
std::string MissingMessage () const
ArgumentResult< uint64_t > Convert (ToolCall &call, const rapidjson::Value &value, const ConvertedArguments &converted) const
Public Member Functions inherited from BinaryNinja::MCP::ValueParam< IntegerExpression, uint64_t >
OptionalParam< IntegerExpression > Optional () const
DefaultParam< IntegerExpression > Default (uint64_t value) const
Public Member Functions inherited from BinaryNinja::MCP::Param< IntegerExpression, uint64_t >
 Param (std::string name, std::string description)
const std::string & GetName () const
bool IsRequired () const
const std::string * GetRelativeTo () const
 The earlier parameter this one is evaluated relative to, if any.
void AddSchema (rapidjson::Value &properties, detail::Allocator &allocator) const
ArgumentResult< Value > Absent () const

Additional Inherited Members

Public Types inherited from BinaryNinja::MCP::Param< IntegerExpression, uint64_t >
using Value
using Parsed
Protected Member Functions inherited from BinaryNinja::MCP::Param< IntegerExpression, uint64_t >
const IntegerExpression & Self () const
Protected Attributes inherited from BinaryNinja::MCP::Param< IntegerExpression, uint64_t >
std::string m_name
std::string m_description

Member Function Documentation

◆ RelativeTo()

IntegerExpression & IntegerExpression::RelativeTo ( std::string name)

Evaluates expressions with the value of the earlier Address, IntegerExpression, UInt or Int parameter name as the current address.

When that argument is absent, its default is used, or 0 when it has none. Registration fails if name is not such a parameter declared before this one.

◆ GetRelativeTo()

const std::string * BinaryNinja::MCP::IntegerExpression::GetRelativeTo ( ) const
inline

◆ Schema()

rapidjson::Value IntegerExpression::Schema ( detail::Allocator & allocator) const

◆ DefaultJson()

rapidjson::Value IntegerExpression::DefaultJson ( uint64_t value,
detail::Allocator & allocator ) const

◆ MissingMessage()

std::string IntegerExpression::MissingMessage ( ) const

◆ Convert()

ArgumentResult< uint64_t > IntegerExpression::Convert ( ToolCall & call,
const rapidjson::Value & value,
const ConvertedArguments & converted ) const