Defining hooks within (php)classes?

Hook can only be identified by string. So the only option to have dynamic hook is is use some variable(s) in its name:

do_action( $some_string_variable . '_top_page_hook' );

Depending on what you are trying to do this can be something meaningful (like prefix, defined by configuration) or something randomly generated to be unique ID (not so common).