add singleton in cpp and macro function into .h