|
Sen API
Sen Libraries
|
Represents a method. More...
#include <method.h>
Public Member Functions | |
| Method (const MethodSpec &spec, Private notUsable) | |
| Copies the spec into a member. Private to prevent direct instances. | |
| ~Method () override=default | |
| Constness | getConstness () const noexcept |
| The constness of the method. | |
| bool | getDeferred () const noexcept |
| True if the method is marked as deferred. | |
| ConstTypeHandle | getReturnType () const noexcept |
| Gets the return type of the method (nullptr means void). | |
| const PropertyRelation & | getPropertyRelation () const noexcept |
| Information about the relation to a property. | |
| bool | getLocalOnly () const noexcept |
| True if the method is the method is only locally available (within the same component). | |
| bool | operator== (const Method &other) const noexcept |
| Compares if it is equivalent to another method. | |
| bool | operator!= (const Method &other) const noexcept |
| Compares if it is not equivalent to another method. | |
| MemberHash | getHash () const noexcept |
| Returns a unique hash to identify the method. | |
| MemberHash | getId () const noexcept |
| Returns the hash of the method's unqualified name. | |
| 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 Arg > | getArgs () const noexcept |
| Gets the arguments. | |
| const Arg * | getArgFromName (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 std::shared_ptr< Method > | make (MethodSpec spec) |
| Factory function that validates the spec and creates a method. Throws std::exception if the spec is not valid. | |
| static void | checkSpec (const CallableSpec &spec) |
| Throws std::exception if the callable spec is invalid. | |
Protected Member Functions | |
| const CallableSpec & | getCallableSpec () const noexcept |
| The spec of this callable. | |
Represents a method.
| sen::Method::Method | ( | const MethodSpec & | spec, |
| Private | notUsable ) |
Copies the spec into a member. Private to prevent direct instances.
|
overridedefault |
|
staticnodiscard |
Factory function that validates the spec and creates a method. Throws std::exception if the spec is not valid.
|
nodiscardnoexcept |
The constness of the method.
|
nodiscardnoexcept |
True if the method is marked as deferred.
|
nodiscardnoexcept |
Gets the return type of the method (nullptr means void).
|
nodiscardnoexcept |
Information about the relation to a property.
|
nodiscardnoexcept |
True if the method is the method is only locally available (within the same component).
|
nodiscardnoexcept |
Compares if it is equivalent to another method.
|
nodiscardnoexcept |
Compares if it is not equivalent to another method.
|
nodiscardnoexcept |
Returns a unique hash to identify the method.
|
nodiscardnoexcept |
Returns the hash of the method's unqualified name.
|
nodiscardnoexceptinherited |
Callable name.
|
nodiscardnoexceptinherited |
Callable description.
|
nodiscardnoexceptinherited |
The transport mode of this callable.
|
nodiscardinherited |
Get the field data given a name. Nullptr means not found.
| name | the name of the field. |
|
nodiscardinherited |
Get the index in the vector of Args given a name hash.
|
nodiscardnoexceptinherited |
|
nodiscardnoexceptinherited |
|
staticinherited |
Throws std::exception if the callable spec is invalid.
|
nodiscardprotectednoexceptinherited |
The spec of this callable.