|
Sen API
Sen Libraries
|
Represents an event. More...
#include <event.h>
Public Member Functions | |
| ~Event () override=default | |
| bool | operator== (const Event &other) const noexcept |
| Checks if other is equivalent to this. | |
| bool | operator!= (const Event &other) const noexcept |
| Checks if other is not equivalent to this. | |
| MemberHash | getHash () const noexcept |
| Returns a unique hash to identify the Event. | |
| MemberHash | getId () const noexcept |
| Returns a name hash of the event. | |
| 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< Event > | make (const EventSpec &spec) |
| Factory function that validates the spec and creates a class type. 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 an event.
|
overridedefault |
|
staticnodiscard |
Factory function that validates the spec and creates a class type. Throws std::exception if the spec is not valid.
|
nodiscardnoexcept |
Checks if other is equivalent to this.
|
nodiscardnoexcept |
Checks if other is not equivalent to this.
|
nodiscardnoexcept |
Returns a unique hash to identify the Event.
|
nodiscardnoexcept |
Returns a name hash of the event.
|
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.