zworld-em/Plugins/sentry-unreal/Source/Sentry/Public/SentryTransactionContext.h

42 lines
1.0 KiB
C
Raw Permalink Normal View History

2025-05-11 22:07:21 +08:00
// Copyright (c) 2024 Sentry. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/Object.h"
#include "SentryTransactionContext.generated.h"
class ISentryTransactionContext;
UCLASS(BlueprintType)
class SENTRY_API USentryTransactionContext : public UObject
{
GENERATED_BODY()
public:
USentryTransactionContext();
/**
* Initializes transaction context with specified name and operation.
*
* @param Name Transaction name.
* @param Operation Operation name.
*/
UFUNCTION(BlueprintCallable, Category = "Sentry")
void Initialize(const FString& Name, const FString& Operation);
/** Gets transaction name. */
UFUNCTION(BlueprintPure, Category = "Sentry")
FString GetName() const;
/** Gets operation name. */
UFUNCTION(BlueprintPure, Category = "Sentry")
FString GetOperation() const;
void InitWithNativeImpl(TSharedPtr<ISentryTransactionContext> transactionContextImpl);
TSharedPtr<ISentryTransactionContext> GetNativeImpl();
private:
TSharedPtr<ISentryTransactionContext> SentryTransactionContextNativeImpl;
};