I'm trying to pass a function pointer into the constructor of a class, and I want to have a getter that will return that function so I can be called as an instance of that class. Does that sound possible? Here is what I have right now.
You're doing it almost perfectly, but what I don't understand is why are you passing the function pointer through a generic pointer? You seem to understand the function pointer syntax, so that doesn't really make sense.
FYI, casting between function pointers and data pointers is unsafe.
This is all possible, but note that the syntax you have above will only bind the 'validation_function_' pointer to a non-member or static member function. The syntax (and pointer structure) is different for member function pointers, so the above will only work if 'validate_printer' is either static or not a member of any class. Also, you could change the syntax such that validation_function_ is specifically defined to be a member function pointer of some class (for example, "void (GUIClass::*validation_function_)();"), but then only member functions of GUIClass could be called using this function pointer, and you would need a pointer to a GUIClass object to actually call validation_function_.
Post more code with a simple example of what you are trying to do, and someone will likely be able to offer suggestions on how to make it work.