I have a Window class and a Skin template. The Window will call a Skin instance but in it's operation the Skin needs to access some properties of the Window, my first thought was passing a set of pointers but the Skin template is complex enough for the implementation process to be annoying, especially as the Skin template is made as a tool to easily design any type of Skin. My second idea was having the Window inherit a class that the Skin could access, I had though to store all the pointer data in that class which wasn't my intention. The Window should be quite light. My third thought was a bit similar, but this time a Agent_type parameter is passed to the Skin template which the Window inherits to provide information to the Skin.
I'm not quite sure but if I pass the Window object as a Agent_type will it lose it's ability to access the Window's properties? I've heard about slicing, but not sure if this is the case. Is this idea useless?
I'm prefering not to use virtual functions for a common Agent base class, just for another bit of performance.