I am developing a mechanism for porting existing code to another platform. Existing code was developed using a third-party API, and my engine will override the functions of third-party APIs in terms of my new platform.
The following definitions are used in the API:
typedef unsigned long shape_handle;
shape_handle make_new_shape( int type );
I need to override make_new_shape, and I have the ability to override shape_handle.
I defined this structure (simplified):
struct Shape
{
int type
};
Caller make_new_shapedoes not care about the basic structure Shape, he just needs a “handle” so that he can call functions such as:
void `set_shape_color( myshape, RED );`
where myshapeis the form handle.
Shape, , Shape .
: - Shape std:: list - , , ?