Here I want to say that this function just should be applied to the following classes: Conductors, RYSP and Officer.
This function just applies for/to Conductors, RYSP and Officers.
But once again I am not sure which preposition should I use ?
In this context,
So, the correct answer is:
"Apply to" is used when we are saying where something is relevant. e.g. "That rule doesn't apply to me." "Normal logic does not apply to political debates."
"Apply for" is used when we are requesting something. e.g. "I would like to apply for the job of senior sanitation engineer." "Jack applied for a credit card."