So, I was experimenting a little bit with this idea and I came up with a solution that does what you expect.
When defining your map, do it like this:
TMap<FString, TFunction<void(USomeActorComponent*)>> StringFunctionMap;
In this way you are storing a pointer to a function whose first argument is a pointer to USomeActorComponent
. You just need to remember that a member function is just a function where the first parameter is the this
you can use inside the function.
You can create the map in the same way:
StringFunctionMap.Add(TEXT("FunctionA"), &USomeActorComponent::BlahBlah);
The only difference will be when you call this function:
StringFunctionMap["FunctionA"](this);
You just need to remember to pass the this
.