RedCore
Loading...
Searching...
No Matches
red::ProfileCreateBuilder< T > Class Template Reference

#include <ProfileCreateBuilder.h>

Inherits red::ProfileBuilder< ProfileCreateBuilder< T > >.

Public Member Functions

 ProfileCreateBuilder (const sead::SafeString *identifier)
Profilebuild ()
Public Member Functions inherited from red::ProfileBuilder< ProfileCreateBuilder< T > >
ProfileCreateBuilder< T > & createInfo (const ActorCreateInfo *createInfo)
 Set the ActorCreateInfo field in the profile.
ProfileCreateBuilder< T > & flag (const Profile::Flag flag)
 Set the Flag field in the profile.
ProfileCreateBuilder< T > & drawPriority (const s16 drawPriority)
 Set the drawPriority field in the profile.
ProfileCreateBuilder< T > & executePriority (const s16 executePriority)
 Set the executePriority field in the profile.
ProfileCreateBuilder< T > & resources (ProfileInfo::ResType type)
 Set the resources field in the profile.

Additional Inherited Members

Protected Attributes inherited from red::ProfileBuilder< ProfileCreateBuilder< T > >
const ActorCreateInfomCreateInfo
 The createInfo data for the profile we are building.
Profile::Flag mFlag
 The flag data for the profile we are building.
s16 mDrawPriority
 The drawPriority data for the profile we are building.
s16 mExecutePriority
 The createInfo data for the profile we are building. This is a custom field added by RedCore.
u8 mResourceCount
 The entry for ProfileInfo::cResNum for the profile we are building. This is stored separately for custom profiles.
sead::SafeStringmResources
 The entry for ProfileInfo::cResList for the profile we are building. This is stored separately for custom profiles.
ProfileInfo::ResType mResourceType
 The entry for ProfileInfo::cResType for the profile we are building. This is stored separately for custom profiles.
bool mCreateInfoModified
 Whether mCreateInfo was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mFlagModified
 Whether mFlag was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mDrawPriorityModified
 Whether mDrawPriority was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mExecutePriorityModified
 Whether mExecutePriority was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mResourcesModified
 Whether mResources was modified. Used for validation and partial application in red::ProfileEditBuilder.

Detailed Description

template<class T>
requires std::derived_from<T, ActorBase>
class red::ProfileCreateBuilder< T >

Builder for creating new custom profiles to be registered by string-identifier.

Template Parameters
TTarget actor class that this profile represents and will instantiate.

Only intended to be constructed via a per-mod red::Registrar object which passes the namespace.

Constructor & Destructor Documentation

◆ ProfileCreateBuilder()

template<class T>
red::ProfileCreateBuilder< T >::ProfileCreateBuilder ( const sead::SafeString * identifier)
inlineexplicit

Begins creating a new custom profile.

Parameters
identifierThe namespaced identifier of this profile.

Member Function Documentation

◆ build()

template<class T>
Profile * red::ProfileCreateBuilder< T >::build ( )
inline

Completes the builder by registering the new profile.

Returns
The newly constructed profile object.