Rob's profileSoftware.PhotosBlogListsMore ![]() | Help |
|
February 23 Strike IRC bot.Finally got round to porting the Stike IRC bot to Linux. The Linux binary is now included within the .zip file. I'm sure you Linux users can cope without the config file editor. October 13 Head first design patterns.Illustration of the relationship between classes in the 'Strategy' pattern. PS- nearly finished porting the Strike IRC bot to Linux. August 06 The factory pattern.After reading a few explanations of the factory design pattern and viewing some not so simple examples i thought id try an explain it.
Why use it?
Flexible code and can be used to encapsulate code if the creation of an object is complicated.
Psuedo code example shows how it might be used in a cross platform graphics library.
class GenericFactory
{ GenericFactory * getFactory() { if(MyOs() == Windows) return(new WindowsFactory); if(MyOs() == Linux)
return(new LinuxFactory); } virtual void drawbutton();
}; class WindowsFactory:GenericFactory
{ drawbutton() { Do some windows specific stuff } }; class LinuxFactory:GenericFactory
{ drawbutton() { Do some Linux specific stuff } }; int main()
{ GenericFactory genfactory ; GenericFactory * Factory = genfactory.getFactory();
Factory.drawButton(); } August 04 Task explorerSimilar to windows Task Manager but with extra features:
August 03 File hunterFile hunter is a file search utility written in Java. Designed to run on both on Windows + Linux. Supports entering a regular expression as search criteria. See: http://www.regular-expressions.info/ April 03 StrikeStrike is a windows based IRC bot. Written in C++, winsock. Features: Can administrate multiple rooms. Can easily be configured using the editor. Secure user authentication system. DartDart is a simple game written in c++. Features collision detection and animation. |
|
|