# Exposing C++ class thats inside a preprocessor

**URL:** <https://forums.unrealengine.com/t/exposing-c-class-thats-inside-a-preprocessor/243572>\
**Category:** C++\
**Tags:** General, unreal-engine\
**Created:** [August 2, 2021, 8:37pm UTC](https://forums.unrealengine.com/t/exposing-c-class-thats-inside-a-preprocessor/243572 "2021-08-02T20:37:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GambitFPS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GambitFPS](https://forums.unrealengine.com/u/GambitFPS)\
**Post date:** [August 2, 2021, 8:37pm UTC](https://forums.unrealengine.com/t/exposing-c-class-thats-inside-a-preprocessor/243572/1 "2021-08-02T20:37:09Z")

</div>

How should I go on about exposing this class to blueprints?

```cpp
class FOnlineSubsystemEOS;

#if WITH_EOS_SDK
#include "eos_stats_types.h"

/**
 * Interface for interacting with EOS stats
 */

UCLASS(Blueprintable, BlueprintType)
class FOnlineStatsEOS : public UObject
{
public:
    FOnlineStatsEOS() = delete;
    virtual ~FOnlineStatsEOS() = default;

// IOnlineStats Interface
    UFUNCTION(BlueprintCallable, Category = "OnlineStats")
    virtual void QueryStats(const TSharedRef<const FUniqueNetId> LocalUserId, const TSharedRef<const FUniqueNetId> StatsUser, const FOnlineStatsQueryUserStatsComplete& Delegate) override;
    UFUNCTION(BlueprintCallable, Category = "OnlineStats")
    virtual void QueryStats(const TSharedRef<const FUniqueNetId> LocalUserId, const TArray<TSharedRef<const FUniqueNetId>>& StatUsers, const TArray<FString>& StatNames, const FOnlineStatsQueryUsersStatsComplete& Delegate) override;
    virtual TSharedPtr<const FOnlineStatsUserStats> GetStats(const TSharedRef<const FUniqueNetId> StatsUserId) const override;
    virtual void UpdateStats(const TSharedRef<const FUniqueNetId> LocalUserId, const TArray<FOnlineStatsUserUpdatedStats>& UpdatedUserStats, const FOnlineStatsUpdateStatsComplete& Delegate) override;
#if !UE_BUILD_SHIPPING
    virtual void ResetStats(const TSharedRef<const FUniqueNetId> StatsUserId) override;
#endif
// ~IOnlineStats Interface

PACKAGE_SCOPE:
    FOnlineStatsEOS(FOnlineSubsystemEOS* InSubsystem)
        : EOSSubsystem(InSubsystem)
    {
    }

private:
    void WriteStats(EOS_ProductUserId LocalUserId, EOS_ProductUserId UserId, const FOnlineStatsUserUpdatedStats& PlayerStats);

    /** Reference to the main EOS subsystem */
    FOnlineSubsystemEOS* EOSSubsystem;
    /** Cached list of stats for users as they arrive */
    TUniqueNetIdMap<TSharedRef<FOnlineStatsUserStats>> StatsCache;
};

typedef TSharedPtr<FOnlineStatsEOS, ESPMode::ThreadSafe> FOnlineStatsEOSPtr;

#endif

```

I’ve read I have to “wrap it” or “create a wrapper” but how do I do that? (I need some code examples of how such an wrapper would look like)
