C
Christopher
I am surprised this hasn't come up for me more in the past, but the
situation is:
I need to have an interface that is usable for all
I need to have an interface that is only usable for some
I do not really know of a good way to achieve this. If I use friend
functions, I can no longer make methods virtual, right?
Example:
I am making a texture class for my graphics library
The only thing the application should have access to is a string
filename to create it with, perhaps dimensions, and a few other
things.
However, some classes inside the engine, such as say the renderer
should have access to the hardware level texture resource, which is in
this case a pointer to a struct from a 3rd party library. So, I need
accessors for my renderer to use, but do not want them to be available
to the application. Both are using the same class.
situation is:
I need to have an interface that is usable for all
I need to have an interface that is only usable for some
I do not really know of a good way to achieve this. If I use friend
functions, I can no longer make methods virtual, right?
Example:
I am making a texture class for my graphics library
The only thing the application should have access to is a string
filename to create it with, perhaps dimensions, and a few other
things.
However, some classes inside the engine, such as say the renderer
should have access to the hardware level texture resource, which is in
this case a pointer to a struct from a 3rd party library. So, I need
accessors for my renderer to use, but do not want them to be available
to the application. Both are using the same class.