TnxSim namespace
Classes
- struct CommandField
- struct CommandInfo
- struct CommandValue
- A field's value by name, for BuildCommand.
Enums
Functions
- auto CommandIDOf(std::string_view name) -> uint32_t constexpr
- A command's type ID: FNV-1a of its name.
- auto SendBytes(WorldBase& world, uint32_t type, const void* bytes, uint8_t size) -> bool
- Queue
bytesas a command oftypefromworld'slocal player. False if the queue is full. -
template<SimCommand T>auto Send(WorldBase& world, const T& command) -> bool
- Send
commandfrom the local player ofworld. Any thread. False if the queue is full. - void RegisterCommand(CommandInfo info)
- auto FindCommand(std::string_view name) -> const CommandInfo*
- Null if no command of that name is registered.
- auto Commands() -> const std::vector<CommandInfo>&
- Every registered command.
- auto BuildCommand(const CommandInfo& info, std::span<const CommandValue> values, uint8_t* out, std::string& why) -> bool
-
template<typename TField>auto KindOf(CommandFieldKind& kind) -> bool constexpr
-
template<SimCommand T>auto DescribeCommand() -> CommandInfo