载入中...
搜索中...
未找到
GameplayControl.h
浏览该文件的文档.
1#pragma once
2
8#include "common/Identity.h"
9#include "common/Result.h"
10#include "common/SubjectRef.h"
11#include "common/Time.h"
12#include "common/Value.h"
13
14#include <cstdint>
15#include <string>
16#include <string_view>
17#include <vector>
18
19namespace eve {
20
23
35
41
50
60
69
80
91public:
92 static constexpr const char* capabilityName = "IGameplayControlProvider";
94 virtual ~IGameplayControlProvider() = default;
95
97 [[nodiscard]] virtual std::string_view gameplayDomain() const noexcept = 0;
100 SubjectRef instance) const = 0;
103 const GameplaySession& session, SubjectRef instance, SubjectRef subject) const = 0;
106 SubjectRef instance,
107 const GameplayCommand& command) = 0;
110 SubjectRef instance,
111 const SimulationStep& step) = 0;
113 [[nodiscard]] virtual Result<std::vector<GameplayEvent>> gameplayEvents(const GameplaySession& session,
114 SubjectRef instance,
115 std::uint64_t afterSequence) const = 0;
116};
117
118} // namespace eve
int subject
Definition AnimSmr.cpp:163
Strong identity values shared by persistence, content and logical-name APIs.
Move-only, checked operation results for the common layer.
Stable reference to a runtime gameplay subject.
std::optional< InteractionSession > session
Definition Tactics.cpp:39
Common time values and an injectable deterministic simulation clock.
float step
Definition TreeMesh.cpp:314
Owning, renderer-independent dynamic values.
Multi-provider gameplay boundary consumed by input, scripts and automation.
virtual Result< GameplayCommandReceipt > submitGameplay(const GameplaySession &session, SubjectRef instance, const GameplayCommand &command)=0
Validate authority and atomically submit one domain command.
virtual Result< std::vector< GameplayActionDescriptor > > availableGameplayActions(const GameplaySession &session, SubjectRef instance, SubjectRef subject) const =0
Discover currently legal player-semantic actions for one subject.
virtual Result< GameplayObservation > observeGameplay(const GameplaySession &session, SubjectRef instance) const =0
Observe one provider-owned gameplay instance without mutation.
virtual Result< std::vector< GameplayEvent > > gameplayEvents(const GameplaySession &session, SubjectRef instance, std::uint64_t afterSequence) const =0
Return events strictly newer than an instance-local sequence cursor.
virtual ~IGameplayControlProvider()=default
Releases IGameplayControlProvider resources.
virtual Result< GameplayObservation > advanceGameplay(const GameplaySession &session, SubjectRef instance, const SimulationStep &step)=0
Advance one provider-owned instance using injected deterministic time.
static constexpr const char * capabilityName
virtual std::string_view gameplayDomain() const noexcept=0
Stable provider domain used for discovery and routing.
Human-readable, scoped identifier in the form namespace:name.
Definition Identity.h:411
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Strong, domain-neutral reference to a runtime subject.
Definition SubjectRef.h:26
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
static constexpr StrongUint64 zero() noexcept
Returns the zero value for this strong type.
Build metadata (engine git commit, build time, third-party version).
Definition Build.cpp:16
GameplayAccess
Authority profile applied by a gameplay provider before domain validation.
One discoverable domain action and its owning schema projection.
Owning evidence that a gameplay authority accepted one command.
One player-semantic command submitted to a domain authority.
std::uint64_t expectedRevision
SimulationTick observedTick
Owning event projection safe across frames and process boundaries.
SimulationTick tick
std::uint64_t sequence
std::string causationCommandId
std::string correlationId
Immutable owning observation of one authoritative gameplay instance.
Owning authorization context shared by player, script and automation adapters.
std::vector< SubjectRef > controlledSubjects
GameplayAccess access
One deterministic fixed-step emitted by SimulationClock.
Definition Time.h:158