July 23rd, 2010, 10:20 PM
very detailed exposition!upstairs friend deeply comprehend the design pattern.
July 23rd, 2010, 08:16 AM
I refactor the first sample you have given as follow:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
abstact Brush (the Abstraction)
<----- RGBBrush // RGB-brush-specific code
<----- CYMKBrush //...
July 23rd, 2010, 12:07 AM
1.There is an object varying for two dimensionality which change commonly.we can decouple the two dimensionality ,so they can vary indepently and not mutually affect.For example ,when we want to draw...
July 22nd, 2010, 01:03 AM
thanks for your reply!
In debug mode, a assert will be throwed.Ignoring the assert,the application would continue to execute well. If creating second CWinApp-derived object in release mode, there is...
July 21st, 2010, 10:53 PM
Generally,singleton pattern is applied by the way that the ctor is private and gives a member funtion named getInstance, but CWinApp's instance is defined as a global object,its ctor is not...