Loading...
Searching...
No Matches
BinaryNinja::MCP::Param< Derived, ValueType > Class Template Reference

Parameters for MakeTool. More...

Detailed Description

template<class Derived, class ValueType>
class BinaryNinja::MCP::Param< Derived, ValueType >

Parameters for MakeTool.

Each parameter kind declares the JSON Schema it advertises and how its argument is checked and converted before the handler runs. Value is the type the handler receives. A parameter is required unless it is made optional or given a default.

A kind provides Schema, Convert and MissingMessage, and a DefaultJson to support Default. Convert turns one argument into a value, and its error is reported as invalid_params. converted holds the values of earlier integer arguments, which IntegerExpression::RelativeTo uses.

Public Types

using Value = ValueType
using Parsed = ValueType

Public Member Functions

 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

Protected Member Functions

const Derived & Self () const

Protected Attributes

std::string m_name
std::string m_description

Member Typedef Documentation

◆ Value

template<class Derived, class ValueType>
using BinaryNinja::MCP::Param< Derived, ValueType >::Value = ValueType

◆ Parsed

template<class Derived, class ValueType>
using BinaryNinja::MCP::Param< Derived, ValueType >::Parsed = ValueType

Constructor & Destructor Documentation

◆ Param()

template<class Derived, class ValueType>
BinaryNinja::MCP::Param< Derived, ValueType >::Param ( std::string name,
std::string description )
inline

Member Function Documentation

◆ Self()

template<class Derived, class ValueType>
const Derived & BinaryNinja::MCP::Param< Derived, ValueType >::Self ( ) const
inlineprotected

◆ GetName()

template<class Derived, class ValueType>
const std::string & BinaryNinja::MCP::Param< Derived, ValueType >::GetName ( ) const
inline

◆ IsRequired()

template<class Derived, class ValueType>
bool BinaryNinja::MCP::Param< Derived, ValueType >::IsRequired ( ) const
inline

◆ GetRelativeTo()

template<class Derived, class ValueType>
const std::string * BinaryNinja::MCP::Param< Derived, ValueType >::GetRelativeTo ( ) const
inline

The earlier parameter this one is evaluated relative to, if any.

◆ AddSchema()

template<class Derived, class ValueType>
void BinaryNinja::MCP::Param< Derived, ValueType >::AddSchema ( rapidjson::Value & properties,
detail::Allocator & allocator ) const
inline

◆ Absent()

template<class Derived, class ValueType>
ArgumentResult< Value > BinaryNinja::MCP::Param< Derived, ValueType >::Absent ( ) const
inline

Member Data Documentation

◆ m_name

template<class Derived, class ValueType>
std::string BinaryNinja::MCP::Param< Derived, ValueType >::m_name
protected

◆ m_description

template<class Derived, class ValueType>
std::string BinaryNinja::MCP::Param< Derived, ValueType >::m_description
protected