Man it’s been a while since the last time I’ve worked on my personal project. Been busy with work lately. Anyway, back to my resource manager.
I’ve been really productive in my project for the past 2 days and I think I have got a lot of things done. But I’m still far from finishing my resource manager. I’ve finished implementing all the base component of my resource manager and what is left is to actually work on THE Resource Manager itself. Although before I present the design, I would like to give credit to this one author who really helped me in designing my manager. I need to give credit where credit is due! His name is Greg Snook. I don’t have direct affiliation with him but I stumbled upon his book in my book collection recently, and his engine presented in his book contains A LOT of invaluable treasures! One of them is the design of the resource manager and while I was in the process of designing mine, I found out that my general design somewhat aligns with his. So I decided to use his as a general guideline instead.
Below I present an insanely tangled UML Class Diagram on how the sub-components are designed. The base storage class that holds the resource is StorageData. This acts like a static vector class. Another class is derived from it called StoragePool where it is composed of a list of StorageData. Thus StoragePool acts as a dynamic container that dynamically extends the list if StoragePool gets pool and vice-versa. Since StoragePool is a generic Storage Pool class, I’ve developed another class the simply extends and formalized the methods for resource handling and using the StoragePool(composite) class.
Ultimately, the StoragePool class will be used the ResourceManager which I haven’t finished working yet. For now I present the UML diagram and the links for the source code.