UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ArchiveCountMem.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/Object.h"
8
13{
14public:
16 : Num(0)
17 , Max(0)
18 {
19 ArIsCountingMemory = true;
21 if( Src )
22 {
23 Src->Serialize( *this );
24 }
25 }
26 SIZE_T GetNum() const
27 {
28 return Num;
29 }
30 SIZE_T GetMax() const
31 {
32 return Max;
33 }
34
35 virtual void CountBytes( SIZE_T InNum, SIZE_T InMax ) override
36 {
37 Num += InNum;
38 Max += InMax;
39 }
46 virtual FString GetArchiveName() const override { return TEXT("FArchiveCountMem"); }
47
48protected:
50};
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ArchiveCountMem.h:13
SIZE_T Num
Definition ArchiveCountMem.h:49
SIZE_T GetNum() const
Definition ArchiveCountMem.h:26
virtual void CountBytes(SIZE_T InNum, SIZE_T InMax) override
Definition ArchiveCountMem.h:35
virtual FString GetArchiveName() const override
Definition ArchiveCountMem.h:46
FArchiveCountMem(UObject *Src, bool bFilterEditorOnly=false)
Definition ArchiveCountMem.h:15
SIZE_T GetMax() const
Definition ArchiveCountMem.h:30
SIZE_T Max
Definition ArchiveCountMem.h:49
Definition ArchiveUObject.h:17
uint8 ArIsCountingMemory
Definition Archive.h:921
uint8 ArIsFilterEditorOnly
Definition Archive.h:927
Definition Object.h:95
virtual COREUOBJECT_API void Serialize(FArchive &Ar)