Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::Callable Class Reference

Represents something that can be called. More...

#include <callable.h>

Inheritance diagram for sen::Callable:

Public Member Functions

 Callable (CallableSpec spec)
 Copies the spec into a member.
virtual ~Callable ()=default
std::string_view getName () const noexcept
 Callable name.
std::string_view getDescription () const noexcept
 Callable description.
TransportMode getTransportMode () const noexcept
 The transport mode of this callable.
Span< const ArggetArgs () const noexcept
 Gets the arguments.
const ArggetArgFromName (std::string_view name) const
 Get the field data given a name. Nullptr means not found.
size_t getArgIndexFromNameHash (MemberHash nameHash) const
 Get the index in the vector of Args given a name hash.
bool operator== (const Callable &other) const noexcept
bool operator!= (const Callable &other) const noexcept

Static Public Member Functions

static void checkSpec (const CallableSpec &spec)
 Throws std::exception if the callable spec is invalid.

Protected Member Functions

const CallableSpecgetCallableSpec () const noexcept
 The spec of this callable.

Detailed Description

Represents something that can be called.

Constructor & Destructor Documentation

◆ Callable()

sen::Callable::Callable ( CallableSpec spec)
explicit

Copies the spec into a member.

◆ ~Callable()

virtual sen::Callable::~Callable ( )
virtualdefault

Member Function Documentation

◆ getName()

std::string_view sen::Callable::getName ( ) const
nodiscardnoexcept

Callable name.

◆ getDescription()

std::string_view sen::Callable::getDescription ( ) const
nodiscardnoexcept

Callable description.

◆ getTransportMode()

TransportMode sen::Callable::getTransportMode ( ) const
nodiscardnoexcept

The transport mode of this callable.

◆ getArgs()

Span< const Arg > sen::Callable::getArgs ( ) const
nodiscardnoexcept

Gets the arguments.

◆ getArgFromName()

const Arg * sen::Callable::getArgFromName ( std::string_view name) const
nodiscard

Get the field data given a name. Nullptr means not found.

Parameters
namethe name of the field.

◆ getArgIndexFromNameHash()

size_t sen::Callable::getArgIndexFromNameHash ( MemberHash nameHash) const
nodiscard

Get the index in the vector of Args given a name hash.

◆ operator==()

bool sen::Callable::operator== ( const Callable & other) const
nodiscardnoexcept

◆ operator!=()

bool sen::Callable::operator!= ( const Callable & other) const
nodiscardnoexcept

◆ checkSpec()

void sen::Callable::checkSpec ( const CallableSpec & spec)
static

Throws std::exception if the callable spec is invalid.

◆ getCallableSpec()

const CallableSpec & sen::Callable::getCallableSpec ( ) const
nodiscardprotectednoexcept

The spec of this callable.


The documentation for this class was generated from the following file: