UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VehicleSystemTemplate.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// includes common to all vehicle systems
6#include "CoreMinimal.h"
7
11template <typename T>
13{
14public:
15
17 {
18 }
19
21 {
22 check(SetupPtr != nullptr);
23 }
24
26 {
27 check(SetupPtr != nullptr);
28 return (T&)(*SetupPtr);
29 }
30
31 const T& Setup() const
32 {
33 check(SetupPtr != nullptr);
34 return (*SetupPtr);
35 }
36
37 /*
38 * Setup data pointer is public if you want to use it directly
39 */
40 const T* SetupPtr;
41};
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition VehicleSystemTemplate.h:13
TVehicleSystem(const T *SetupIn)
Definition VehicleSystemTemplate.h:20
TVehicleSystem()
Definition VehicleSystemTemplate.h:16
T & AccessSetup()
Definition VehicleSystemTemplate.h:25
const T & Setup() const
Definition VehicleSystemTemplate.h:31
const T * SetupPtr
Definition VehicleSystemTemplate.h:40