How to convert this blueprint macro to c++ macro or c++ function?