You may want to look at a ‘generic linked list’, this is a linked list with a void* in the node for the data. By typecasting, you can use the linked list for any type. You may be able to get that to do what you want.
1 2 3 4 5 6 7 8 9
Node -> Circle
|
Node -> Rectangle
|
Node -> Line
|
Node -> Polygone
|
NULL