Open 3D Engine ScriptCanvas Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ScriptCanvas::GraphVariableManagerRequests Class Referenceabstract

Inherits AZ::EBusTraits.

Public Types

using MutexType = AZStd::recursive_mutex
 
using BusIdType = ScriptCanvasId
 
using AllocatorType = AZStd::allocator
 

Public Member Functions

virtual AZ::Outcome< VariableId, AZStd::string > CloneVariable (const GraphVariable &baseVariable)=0
 
virtual AZ::Outcome< VariableId, AZStd::string > RemapVariable (const GraphVariable &variableConfiguration)=0
 
virtual AZ::Outcome< VariableId, AZStd::string > AddVariable (AZStd::string_view key, const Datum &value, bool functionScope)=0
 
virtual AZ::Outcome< VariableId, AZStd::string > AddVariablePair (const AZStd::pair< AZStd::string_view, Datum > &keyValuePair)=0
 
virtual VariableValidationOutcome IsNameValid (AZStd::string_view variableName)=0
 
template<typename InputIt >
AZStd::vector< AZ::Outcome< VariableId, AZStd::string > > AddVariables (InputIt first, InputIt last)
 
virtual bool RemoveVariable (const VariableId &)=0
 
virtual AZStd::size_t RemoveVariableByName (AZStd::string_view)=0
 
template<typename InputIt >
AZStd::size_t RemoveVariables (InputIt first, InputIt last)
 
virtual GraphVariableFindVariable (AZStd::string_view propName)=0
 
virtual GraphVariableFindVariableById (const VariableId &varId)=0
 
virtual GraphVariableFindFirstVariableWithType (const Data::Type &dataType, const AZStd::unordered_set< ScriptCanvas::VariableId > &excludedVariableIds)=0
 
virtual Data::Type GetVariableType (const VariableId &variableId)=0
 Returns the type associated with the specified variable.
 
virtual const GraphVariableMapping * GetVariables () const =0
 
virtual AZStd::string_view GetVariableName (const VariableId &) const =0
 Looks up the variable name that the variable data is associated with in the handler of the bus.
 
virtual AZ::Outcome< void, AZStd::string > RenameVariable (const VariableId &variableId, AZStd::string_view newVarName)=0
 
virtual bool IsRemappedId (const VariableId &remappedId) const =0
 
virtual const VariableDataGetVariableDataConst () const =0
 
virtual VariableDataGetVariableData ()=0
 
virtual void SetVariableData (const VariableData &variableData)=0
 Sets the VariableData and connects the variables ids to the VariableRequestBus for this handler.
 
virtual void DeleteVariableData (const VariableData &variableData)=0
 Deletes oldVariableData and sends out GraphVariableManagerNotifications for each deleted variable.
 
bool IsNameAvailable (AZStd::string_view key)
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Member Function Documentation

◆ AddVariables()

template<typename InputIt >
AZStd::vector< AZ::Outcome< VariableId, AZStd::string > > ScriptCanvas::GraphVariableManagerRequests::AddVariables ( InputIt  first,
InputIt  last 
)
inline

Adds properties from the range [first, last) returns vector of AZ::Outcome which for successful outcomes contains the VariableId and for failing outcome contains string detailing the reason for failing to add the variable

◆ CloneVariable()

virtual AZ::Outcome< VariableId, AZStd::string > ScriptCanvas::GraphVariableManagerRequests::CloneVariable ( const GraphVariable baseVariable)
pure virtual

Adds a variable that is keyed by the string and maps to a type that can be storedAZStd::any(any type with a AzTypeInfo specialization) returns an AZ::Outcome which on success contains the VariableId and on Failure contains a string with error information

◆ FindVariable()

virtual GraphVariable * ScriptCanvas::GraphVariableManagerRequests::FindVariable ( AZStd::string_view  propName)
pure virtual

Searches for a variable with the specified name returns pointer to the first variable with the specified name or nullptr

◆ FindVariableById()

virtual GraphVariable * ScriptCanvas::GraphVariableManagerRequests::FindVariableById ( const VariableId varId)
pure virtual

Searches for a variable by VariableId returns a pair of <variable datum pointer, variable name> with the supplied id The variable datum pointer is non-null if the variable has been found

◆ GetVariables()

virtual const GraphVariableMapping * ScriptCanvas::GraphVariableManagerRequests::GetVariables ( ) const
pure virtual

Retrieves all properties stored by the Handler returns variable container

◆ RemoveVariable()

virtual bool ScriptCanvas::GraphVariableManagerRequests::RemoveVariable ( const VariableId )
pure virtual

Remove a single variable which matches the specified variable id returns true if the variable with the variable id was removed

◆ RemoveVariableByName()

virtual AZStd::size_t ScriptCanvas::GraphVariableManagerRequests::RemoveVariableByName ( AZStd::string_view  )
pure virtual

Removes properties which matches the specified string name returns the number of properties removed

◆ RemoveVariables()

template<typename InputIt >
AZStd::size_t ScriptCanvas::GraphVariableManagerRequests::RemoveVariables ( InputIt  first,
InputIt  last 
)
inline

Removes properties which matches the specified variable ids returns the number of properties removed

◆ RenameVariable()

virtual AZ::Outcome< void, AZStd::string > ScriptCanvas::GraphVariableManagerRequests::RenameVariable ( const VariableId variableId,
AZStd::string_view  newVarName 
)
pure virtual

Changes the name of the variable with the specified @variableId within the handler returns an AZ::Outcome to indicate if the variable was able to be succesfully or an error message to indicate why the rename failed


The documentation for this class was generated from the following file: