Click here to Skip to main content
15,916,042 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Swap Bytes Pin
Christian Graus2-Feb-07 10:21
protectorChristian Graus2-Feb-07 10:21 
QuestionLoad a class depending on a string Pin
S.C.Wong1-Feb-07 22:57
S.C.Wong1-Feb-07 22:57 
AnswerRe: Load a class depending on a string Pin
Waldermort1-Feb-07 23:21
Waldermort1-Feb-07 23:21 
QuestionRe: Load a class depending on a string Pin
David Crow2-Feb-07 2:46
David Crow2-Feb-07 2:46 
AnswerRe: Load a class depending on a string Pin
jhwurmbach2-Feb-07 3:05
jhwurmbach2-Feb-07 3:05 
AnswerRe: Load a class depending on a string Pin
Cedric Moonen2-Feb-07 4:10
Cedric Moonen2-Feb-07 4:10 
GeneralRe: Load a class depending on a string Pin
Mark Salsbery2-Feb-07 5:53
Mark Salsbery2-Feb-07 5:53 
GeneralRe: Load a class depending on a string Pin
Cedric Moonen2-Feb-07 6:28
Cedric Moonen2-Feb-07 6:28 
Laugh | :laugh:

Yes, but your code is much more maintainable: you have no dependcy at all between the different classes and the 'factory'. The factory only knows the base class. You can even do better by using a template factory so that you have a completely generic factory.
And also, whenever you add a new class to your architecture, the only thing you have to change is the file in which you have your class (which must be created).


Cédric Moonen
Software developer

Charting control [v1.1]

GeneralRe: Load a class depending on a string Pin
Mark Salsbery2-Feb-07 7:11
Mark Salsbery2-Feb-07 7:11 
QuestionConvert LPWSTR to LPSTR Pin
ajitatif angajetor1-Feb-07 22:39
ajitatif angajetor1-Feb-07 22:39 
AnswerRe: Convert LPWSTR to LPSTR Pin
jhwurmbach1-Feb-07 22:46
jhwurmbach1-Feb-07 22:46 
QuestionCan load custom control with dll resource Pin
dungpapai1-Feb-07 22:36
dungpapai1-Feb-07 22:36 
Questionavailable characters Pin
vlad.gs1-Feb-07 22:19
vlad.gs1-Feb-07 22:19 
AnswerRe: available characters Pin
Naveen2-Feb-07 1:02
Naveen2-Feb-07 1:02 
GeneralRe: available characters Pin
vlad.gs2-Feb-07 1:44
vlad.gs2-Feb-07 1:44 
GeneralRe: available characters Pin
Hamid_RT14-Feb-07 6:15
Hamid_RT14-Feb-07 6:15 
AnswerRe: available characters Pin
Mark Salsbery2-Feb-07 6:41
Mark Salsbery2-Feb-07 6:41 
AnswerRe: available characters Pin
Mark Salsbery2-Feb-07 7:12
Mark Salsbery2-Feb-07 7:12 
Questioncan't get the updated data during Win32 Release Pin
MrKyaw1-Feb-07 22:11
MrKyaw1-Feb-07 22:11 
QuestionConversion Hex string to ASCII value Pin
Ram Murali1-Feb-07 22:00
Ram Murali1-Feb-07 22:00 
AnswerRe: Conversion Hex string to ASCII value Pin
Roger Stoltz1-Feb-07 22:18
Roger Stoltz1-Feb-07 22:18 
GeneralRe: Conversion Hex string to ASCII value Pin
Ram Murali1-Feb-07 22:39
Ram Murali1-Feb-07 22:39 
AnswerRe: Conversion Hex string to ASCII value Pin
Roger Stoltz1-Feb-07 23:29
Roger Stoltz1-Feb-07 23:29 
GeneralRe: Conversion Hex string to ASCII value Pin
Ram Murali1-Feb-07 23:53
Ram Murali1-Feb-07 23:53 
GeneralRe: Conversion Hex string to ASCII value Pin
Naveen2-Feb-07 0:59
Naveen2-Feb-07 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.