Apparatus Version 1.10
ECS data-oriented workflow for Unreal Engine.
Classes | Macros | Functions
Subjective.h File Reference
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "GameFramework/Actor.h"
#include "GameFramework/Pawn.h"
#include "BeltSlot.h"
#include "Detail.h"
#include "TraitRecord.h"
#include "Fingerprint.h"
#include "SubjectHandle.h"
#include "ConstSubjectHandle.h"
#include "Subjective.generated.h"
Include dependency graph for Subjective.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  FStandardSubjectivePropertyBlock
 The standard subjective property block. More...
 
struct  FStandardSubjectiveNetworkPropertyBlock
 A block of standard properties used for networking. More...
 
class  ISubjective
 An interface for all sorts of subjects. More...
 

Macros

#define ASSERT_SUBJECTIVE_PROPERTY_BLOCK(ClassT)
 
#define ASSERT_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK(ClassT)
 
#define END_STANDARD_SUBJECTIVE_PROPERTY_BLOCK(ClassT)
 Finish the standard subjective properties specification. More...
 
#define END_STANDARD_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK(ClassT)
 Finish the standard networked subjective properties specification. More...
 

Functions

uint32 GetTypeHash (const TWeakInterfacePtr< ISubjective > &Subjective)
 

Macro Definition Documentation

◆ ASSERT_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK

#define ASSERT_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK (   ClassT)
Value:
static constexpr size_t StandardNetworkBlockOffset = offsetof(ClassT, TraitmarkPass); \
static_assert(offsetof(FStandardSubjectiveNetworkPropertyBlock, TraitmarkPass) == \
offsetof(ClassT, TraitmarkPass) - StandardNetworkBlockOffset, \
"The traitmark pass offsets must match."); \
static_assert(offsetof(FStandardSubjectiveNetworkPropertyBlock, SubjectNetworkId) == \
offsetof(ClassT, SubjectNetworkId) - StandardNetworkBlockOffset, \
"The subject network identifier offsets must match.")
#define ASSERT_SUBJECTIVE_PROPERTY_BLOCK(ClassT)
Definition: Subjective.h:89
A block of standard properties used for networking.
Definition: Subjective.h:72

◆ ASSERT_SUBJECTIVE_PROPERTY_BLOCK

#define ASSERT_SUBJECTIVE_PROPERTY_BLOCK (   ClassT)
Value:
static constexpr size_t StandardBlockOffset = offsetof(ClassT, Traits); \
static_assert(offsetof(FStandardSubjectivePropertyBlock, Traits) == \
offsetof(ClassT, Traits) - StandardBlockOffset, \
"The traits offsets must match."); \
static_assert(offsetof(FStandardSubjectivePropertyBlock, Details) == \
offsetof(ClassT, Details) - StandardBlockOffset, \
"The details offsets must match."); \
static_assert(offsetof(FStandardSubjectivePropertyBlock, PreferredBelt) == \
offsetof(ClassT, PreferredBelt) - StandardBlockOffset, \
"The preferred belt offsets must match."); \
static_assert(offsetof(FStandardSubjectivePropertyBlock, Flagmark) == \
offsetof(ClassT, Flagmark) - StandardBlockOffset, \
"The flagmark offsets must match.") \
The standard subjective property block.
Definition: Subjective.h:46

◆ END_STANDARD_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK

#define END_STANDARD_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK (   ClassT)
Value:
FORCEINLINE bool IsNetworkCapable() const override \
{ \
return true; \
} \
DoGetStandardPropertyBlock() override \
{ \
ASSERT_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK(ClassT); \
return (FStandardSubjectivePropertyBlock*)std::addressof(Traits); \
} \
DoGetStandardPropertyBlock() const override \
{ \
return (FStandardSubjectivePropertyBlock*)std::addressof(Traits); \
} \
DoGetStandardNetworkPropertyBlock() override \
{ \
ASSERT_NETWORKED_SUBJECTIVE_PROPERTY_BLOCK(ClassT); \
return (FStandardSubjectiveNetworkPropertyBlock*)std::addressof(TraitmarkPass); \
} \
DoGetStandardNetworkPropertyBlock() const override \
{ \
return (FStandardSubjectiveNetworkPropertyBlock*)std::addressof(TraitmarkPass); \
}

Finish the standard networked subjective properties specification.

Checks the necessary data and its layout. Provides the standard properties block accessor.

Parameters
ClassTA class that actually implements the networked subjective.

◆ END_STANDARD_SUBJECTIVE_PROPERTY_BLOCK

#define END_STANDARD_SUBJECTIVE_PROPERTY_BLOCK (   ClassT)
Value:
DoGetStandardPropertyBlock() override \
{ \
ASSERT_SUBJECTIVE_PROPERTY_BLOCK(ClassT); \
return (FStandardSubjectivePropertyBlock*)std::addressof(Traits); \
} \
DoGetStandardPropertyBlock() const override \
{ \
return (FStandardSubjectivePropertyBlock*)std::addressof(Traits); \
}

Finish the standard subjective properties specification.

Checks the necessary data and its layout. Provides the standard properties block accessor.

Parameters
ClassTA class that actually implements the subjective.

Function Documentation

◆ GetTypeHash()

uint32 GetTypeHash ( const TWeakInterfacePtr< ISubjective > &  Subjective)
inline