Sunday, July 10, 2011

Using Common::

This was a smooth week for me. I had no big glitches, no unpretictable segmantation faults etc. I worked on different parts, but the most important class I created is the Stack class.
There was a implementation of stack in stack.h/cpp, but fingolfin leave a TODO comment that suggest replacing with Common::Stack, so I did that. I had seen code parts using Common but this was the first time I did. The stack was used for both int16 and void*. There is a union of those two, and a enum for type, capsulated as stackElementStruck, so it uses spesific pop and push functions. first I made it a class, and added constructors for both possible data type, then created a new Stack class, inherited Common:Stack, and added pop & push methods to it. It is pretty straight forward, but it feels better integrated.
I am thinking about using Common::List for some of the parts I already worked on, but it has to wait after midterms, which is this week.

No comments: