You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb ryan.mangin, rob.gay, phil.popp #preflight 6418bfb2691c5ebc15931d3e [CL 24731517 by charlie huguenard in ue5-main branch]
81 lines
1.8 KiB
C++
81 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "MetasoundOutput.h"
|
|
|
|
#include "MetasoundPrimitives.h"
|
|
|
|
FMetaSoundOutput::FMetaSoundOutput(const FMetaSoundOutput& Other)
|
|
{
|
|
Name = Other.Name;
|
|
DataReference = MakeUnique<Metasound::FAnyDataReference>(*Other.DataReference);
|
|
}
|
|
|
|
FMetaSoundOutput& FMetaSoundOutput::operator=(const FMetaSoundOutput& Other)
|
|
{
|
|
if (this != &Other)
|
|
{
|
|
this->Name = Other.Name;
|
|
this->DataReference = MakeUnique<Metasound::FAnyDataReference>(*Other.DataReference);
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
bool FMetaSoundOutput::IsValid() const
|
|
{
|
|
return nullptr != DataReference;
|
|
}
|
|
|
|
FName FMetaSoundOutput::GetTypeName() const
|
|
{
|
|
return IsValid() ? DataReference->GetDataTypeName() : FName();
|
|
}
|
|
|
|
bool UMetasoundOutputBlueprintAccess::IsFloat(const FMetaSoundOutput& Output)
|
|
{
|
|
return Output.IsType<float>();
|
|
}
|
|
|
|
float UMetasoundOutputBlueprintAccess::GetFloat(const FMetaSoundOutput& Output, bool& Success)
|
|
{
|
|
float Value = 0;
|
|
Success = Output.Get(Value);
|
|
return Value;
|
|
}
|
|
|
|
bool UMetasoundOutputBlueprintAccess::IsInt32(const FMetaSoundOutput& Output)
|
|
{
|
|
return Output.IsType<int32>();
|
|
}
|
|
|
|
int32 UMetasoundOutputBlueprintAccess::GetInt32(const FMetaSoundOutput& Output, bool& Success)
|
|
{
|
|
int32 Value = 0;
|
|
Success = Output.Get(Value);
|
|
return Value;
|
|
}
|
|
|
|
bool UMetasoundOutputBlueprintAccess::IsBool(const FMetaSoundOutput& Output)
|
|
{
|
|
return Output.IsType<bool>();
|
|
}
|
|
|
|
bool UMetasoundOutputBlueprintAccess::GetBool(const FMetaSoundOutput& Output, bool& Success)
|
|
{
|
|
bool Value = false;
|
|
Success = Output.Get(Value);
|
|
return Value;
|
|
}
|
|
|
|
bool UMetasoundOutputBlueprintAccess::IsString(const FMetaSoundOutput& Output)
|
|
{
|
|
return Output.IsType<FString>();
|
|
}
|
|
|
|
FString UMetasoundOutputBlueprintAccess::GetString(const FMetaSoundOutput& Output, bool& Success)
|
|
{
|
|
FString Value;
|
|
Success = Output.Get(Value);
|
|
return Value;
|
|
}
|