Is there a way to re create blueprint macros in c++?

in which class should i create this? object or none