I have static data which represents a Skin that has parts such as
- head
- body
- right hand
- left hand
- right leg
- left leg
and each of those parts have sides/faces:
- top
- bottom
- left
- right
- back
- front
Now I want to represent these in my code in such a way that I can relate them to each other such as
SkinPart.HEAD.TOP
SkinPart.HEAD.BOTTOM
and also from the sub part(top, bottom) i want to be able to access the data, whose top side is this?
Is this kind of relation possible to do in compile time(?)
My current implementation includes enums at it gets really messy..
I have bunch of maps that has parts as keys and side maps as values..
The compile time relation isn't really nessaccary.. I was just wondering how design wise I should do this without being bloated with maps of maps and without the need to write custom search functions in order to keep tracks whats whos
Is the only way to go to create a class and dynamically fill the lists and lose the ability to statically access the data eventhough the types are known and will never change(?)