Class FTryllAgentVariables¶
ClassList > FTryllAgentVariables
#include <TryllAgentVariables.h>
Public Attributes¶
| Type | Name |
|---|---|
| TFunction< void(TArray< FTryllVariableUpdate >, TFunction< void(const FTryllError &)>)> | TestSendUpdate |
Public Functions¶
| Type | Name |
|---|---|
| FTryllError | AddToSet (const FString & Name, const FString & Element) |
| TOptional< ETryllVariableType > | DeclaredType (const FString & Name) const |
| FTryllAgentVariables (FTryllAgent * InAgent, const TArray< FTryllVariableDecl > & Declared) |
|
| void | FlushIfDirty (TFunction< void(const FTryllError &)> OnComplete=nullptr, uint64 CarrierRequestId=0) |
| bool | GetBool (const FString & Name) const |
| double | GetFloat (const FString & Name) const |
| int64 | GetInt (const FString & Name) const |
| FString | GetString (const FString & Name) const |
| TArray< FString > | GetStringSet (const FString & Name) const |
| bool | IsDeclared (const FString & Name) const |
| bool | IsDirty () const |
| FTryllError | RemoveFromSet (const FString & Name, const FString & Element) |
| FTryllError | Reset (const FString & Name) |
| FTryllError | SetBool (const FString & Name, bool bValue) |
| FTryllError | SetFloat (const FString & Name, double Value) |
| FTryllError | SetInt (const FString & Name, int64 Value) |
| FTryllError | SetString (const FString & Name, const FString & Value) |
| FTryllError | SetStringSet (const FString & Name, const TArray< FString > & Values) |
| TMap< FString, FTryllVariableDecl > | Snapshot () const |
| void | SyncFromServerAsync (TArray< FString > Names={}, TFunction< void(const FTryllError &)> OnComplete=nullptr) |
Detailed Description¶
Local mirror of one agent's declared per-agent Variables (C++ surface). Obtained via FTryllAgent::GetVariables(). Blueprint code uses the UTryllAgentVariables wrapper (UTryllAgentComponent::GetVariables()) instead.
Public Attributes Documentation¶
variable TestSendUpdate¶
TFunction<void(TArray<FTryllVariableUpdate>, TFunction<void(const FTryllError&)>)> FTryllAgentVariables::TestSendUpdate;
Test hook: when set, FlushIfDirty invokes this instead of the live agent wire send. Signature is (WireBatch, OnComplete).
Public Functions Documentation¶
function AddToSet¶
Idempotent — a no-op success if Element is already present.
function DeclaredType¶
function FTryllAgentVariables¶
FTryllAgentVariables::FTryllAgentVariables (
FTryllAgent * InAgent,
const TArray< FTryllVariableDecl > & Declared
)
function FlushIfDirty¶
void FTryllAgentVariables::FlushIfDirty (
TFunction< void(const FTryllError &)> OnComplete=nullptr,
uint64 CarrierRequestId=0
)
Send every staged mutation as one batched UpdateAgentVariablesRequest. Called automatically at the top of FTryllAgent::SendMessage/Resume/ ChangeParams — deliberately NOT before Cancel. No-op (invokes OnComplete with Ok) when nothing is staged.
function GetBool¶
function GetFloat¶
function GetInt¶
function GetString¶
function GetStringSet¶
function IsDeclared¶
function IsDirty¶
True when one or more mutations are staged and not yet flushed.
function RemoveFromSet¶
Idempotent — a no-op success if Element is already absent.
function Reset¶
Restores the CreateAgent-time initial value for Name.
function SetBool¶
function SetFloat¶
function SetInt¶
function SetString¶
function SetStringSet¶
FTryllError FTryllAgentVariables::SetStringSet (
const FString & Name,
const TArray< FString > & Values
)
function Snapshot¶
Copy of every declared variable's current local value, keyed by name.
function SyncFromServerAsync¶
void FTryllAgentVariables::SyncFromServerAsync (
TArray< FString > Names={},
TFunction< void(const FTryllError &)> OnComplete=nullptr
)
Refresh the local mirror from the server's authoritative current values. Names with a locally newer (staged or in-flight) write are skipped. Empty Names = every declared variable.
The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllAgentVariables.h