How can I make UE4Editor automatically add boilerplate code to any sub-class of my custom classes?

I’v noticed that for certain UE classes, whenever I use UE4Editor to create a C++ class derived from that class, the generated header and cpp file will have some boilerplate functions already declared and defined. Is there an easy way for me to make this happened with my own classes that I create? For example, certain UFUNCTION specifiers or commenting markup that results in this? I tried looking at Actor.h but didn’t see anything obvious that would result in this, but it’s got to be a result of something. So I thought I’d see if any of you guys know?

As an example, whenever I create a class derived from “Actor” (actually called AActor), the following is automatically generated by UE4Editor:

in MyActor.h:

// Sets default values for this actor's properties
MyActor();

// Called when the game starts or when spawned
virtual void BeginPlay() override;

// Called every frame
virtual void Tick( float DeltaSeconds ) override;

in MyActor.cpp, an example of one of the definitions:

// Called when the game starts or when spawned
void MyActor::BeginPlay()
{
    Super::BeginPlay();

 }

The templates are stored in Engine/Content/Editor/Templates/ you could modify them if you want, but it’s a bit destructive, so you’d have a little more work copying your modifications back over when upgrading to the next release.

There’s another thing that may be helpful, under Engine/Extras/VisualStudioSnippets there is a ue4classa snippet, and if you modify it and install it like A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums shows, then in VS you can type
ue4classa<TAB> and VisualStudio will make the class according to the template file, which you can edit however you want. This is less ‘destructive’ because the templates are stored in your personal VisualStudio folder that wouldn’t change as often as UE4 is updated.

I’m running UE4Editor on Linux, so I won’t be using Visual Studio.

Unfortunately, I don’t particularly like either solution since I’d hoped to do this in a way that was local to the UE4 project that the custom classes pertained to. That said, maybe I’ll try the first option out.