Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About Graphics::RotateTransform()???? Pin
SandipG 7-Sep-08 22:51
SandipG 7-Sep-08 22:51 
QuestionInitializing class from it's name - Standard C++ Pin
N a v a n e e t h7-Sep-08 21:05
N a v a n e e t h7-Sep-08 21:05 
QuestionRe: Initializing class from it's name - Standard C++ Pin
CPallini7-Sep-08 21:33
mveCPallini7-Sep-08 21:33 
AnswerRe: Initializing class from it's name - Standard C++ Pin
N a v a n e e t h7-Sep-08 23:25
N a v a n e e t h7-Sep-08 23:25 
GeneralRe: Initializing class from it's name - Standard C++ Pin
CPallini7-Sep-08 23:33
mveCPallini7-Sep-08 23:33 
GeneralRe: Initializing class from it's name - Standard C++ Pin
N a v a n e e t h7-Sep-08 23:40
N a v a n e e t h7-Sep-08 23:40 
GeneralRe: Initializing class from it's name - Standard C++ Pin
CPallini7-Sep-08 23:51
mveCPallini7-Sep-08 23:51 
GeneralRe: Initializing class from it's name - Standard C++ Pin
N a v a n e e t h8-Sep-08 0:14
N a v a n e e t h8-Sep-08 0:14 
CPallini wrote:
Not sure I got you


I might have not explained clearly Frown | :( Let me try my luck once more Smile | :)

I need some thing simlar to Builder[^] pattern. In that link PizzaBuilder is an abstract class providing methods to override. Many builder classes are derived from it and overrides the functionality. If you look at the main function (C#) you will find
PizzaBuilder hawaiianPizzaBuilder = new HawaiianPizzaBuilder();
PizzaBuilder spicyPizzaBuilder = new SpicyPizzaBuilder();
In this case we knows HawaiianPizzaBuilder or SpicyPizzaBuilder is the one to instantiate.

But in my case, I know only the class is derived from PizzaBuilder and it's name, say CustomPizzaBuilder. In that case, how do I instantiate it?

This can be easily done using reflection in managed code. As reflection is not supported in standard C++, is there a workaround for this? Or how does the Builder pattern is implemented in C++ when we have only the subclass name available?

I hope I made it clear.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: Initializing class from it's name - Standard C++ Pin
CPallini8-Sep-08 0:35
mveCPallini8-Sep-08 0:35 
GeneralRe: Initializing class from it's name - Standard C++ Pin
N a v a n e e t h8-Sep-08 0:48
N a v a n e e t h8-Sep-08 0:48 
GeneralRe: Initializing class from it's name - Standard C++ Pin
CPallini8-Sep-08 0:56
mveCPallini8-Sep-08 0:56 
QuestionAvoid includei in header files Pin
reza matinnejad7-Sep-08 20:11
reza matinnejad7-Sep-08 20:11 
AnswerRe: Avoid includei in header files Pin
toxcct7-Sep-08 21:09
toxcct7-Sep-08 21:09 
GeneralRe: Avoid includei in header files Pin
reza matinnejad7-Sep-08 21:15
reza matinnejad7-Sep-08 21:15 
GeneralRe: Avoid includei in header files Pin
toxcct7-Sep-08 21:21
toxcct7-Sep-08 21:21 
GeneralRe: Avoid includei in header files Pin
reza matinnejad7-Sep-08 21:28
reza matinnejad7-Sep-08 21:28 
GeneralRe: Avoid includei in header files Pin
toxcct7-Sep-08 21:34
toxcct7-Sep-08 21:34 
Questioncaptureing right click mouse event........ Pin
ani_ikram7-Sep-08 19:58
ani_ikram7-Sep-08 19:58 
AnswerRe: captureing right click mouse event........ Pin
Rane7-Sep-08 20:11
Rane7-Sep-08 20:11 
AnswerRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 20:12
SandipG 7-Sep-08 20:12 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram7-Sep-08 20:34
ani_ikram7-Sep-08 20:34 
GeneralRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 21:15
SandipG 7-Sep-08 21:15 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram7-Sep-08 21:18
ani_ikram7-Sep-08 21:18 
GeneralRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 21:25
SandipG 7-Sep-08 21:25 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram9-Sep-08 17:23
ani_ikram9-Sep-08 17:23 

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.