Click here to Skip to main content
15,910,121 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Questionproject Pin
Anonymous1-Oct-05 22:33
Anonymous1-Oct-05 22:33 
AnswerRe: project Pin
Prakash Nadar3-Oct-05 15:23
Prakash Nadar3-Oct-05 15:23 
Questionproject in c++ Pin
gagit1-Oct-05 5:39
sussgagit1-Oct-05 5:39 
AnswerRe: project in c++ Pin
Prakash Nadar3-Oct-05 15:24
Prakash Nadar3-Oct-05 15:24 
QuestionWhy does integer work and not boolean Pin
LiquidE_SA1-Oct-05 4:40
LiquidE_SA1-Oct-05 4:40 
AnswerRe: Why does integer work and not boolean Pin
Matt Godbolt2-Oct-05 4:14
Matt Godbolt2-Oct-05 4:14 
AnswerRe: Why does integer work and not boolean Pin
AndrewVos5-Oct-05 19:35
AndrewVos5-Oct-05 19:35 
QuestionIs there bettor solution or any simple template implementation? Pin
G Haranadh30-Sep-05 19:33
G Haranadh30-Sep-05 19:33 
I have one function with 3 parameters.
In that function I have one switch case statement which depends on first parameter of my function. Nearly the cases are 28 to 30. For each case there is another sub switch case which depends on the second parameter of my function with more cases. For different cases I am allocating different classes memory in one class object. At last the function returning that object. For this concept implementation is there any simple implementation or any other logic, any template. The cases are increasing because of new implementations. Expecting some better solution.

The sample code is:
CMyCls* CEmr:GetCls(DWORD dwDId, DWORD dwClsId,BOOL bFe)
{
      CMyCls* pCls = NULL;
      switch (m_byClsFamily)//data type is BYTE
      {
            case _FAMILY_1_:
                  switch (dwClsId) 
                  {
                        case 0x8242:
                        if (bFe || (dwDId == DB_18C453))
                              pCls = new CMyCls1;
                              break;
                        case 0x8252:
                        if (bFe || (dwDId == DB_18C452))
                              pCls = new CMyCls2;
                              break;
                  ...
                  ... 
                  }
            break; 
            case _FAMILY_2_:
            ...
            case _FAMILY_3_:
            ...  
            case _FAMILY_4_:
            ...
            ...
            break; 
      }
return pCls;
}

Here All CMyCls1, CMyCls2, CMyCls3, CMyCls4,... all are derived from a class named "CMyCls".
My actual problem is, I need to simplify my switch case. I am searching for the easyest way even the cases may be increased in near future. In different case I need to create different Calss's object. Creating object is not a problem. But the switch case becomeing very big. I am looking for any good template or any other solution.
Any help very thankful to them. It is urgent.

Nice talking to you. Blush | :O
Questionmat-file on linux Pin
Ta Xuan Hung30-Sep-05 5:05
Ta Xuan Hung30-Sep-05 5:05 
QuestionQuestion about DVD seeking. Pin
Member 231624829-Sep-05 21:24
Member 231624829-Sep-05 21:24 
QuestionHow to run musi files in c++ Pin
Member 219796629-Sep-05 19:07
Member 219796629-Sep-05 19:07 
AnswerRe: How to run musi files in c++ Pin
Prakash Nadar3-Oct-05 15:25
Prakash Nadar3-Oct-05 15:25 
GeneralRe: How to run musi files in c++ Pin
Inder gujral12-Oct-05 21:47
Inder gujral12-Oct-05 21:47 
QuestionHow to kill a proceess running in Task Manager Pin
harijulie29-Sep-05 15:19
harijulie29-Sep-05 15:19 
AnswerRe: How to kill a proceess running in Task Manager Pin
Saksida Bojan30-Sep-05 9:09
Saksida Bojan30-Sep-05 9:09 
AnswerRe: How to kill a proceess running in Task Manager Pin
Prakash Nadar3-Oct-05 15:27
Prakash Nadar3-Oct-05 15:27 
QuestionIssues with ReadFile function Pin
Aditi48429-Sep-05 3:54
Aditi48429-Sep-05 3:54 
Questiondaemon program on Windows Pin
misha_grewal29-Sep-05 0:08
misha_grewal29-Sep-05 0:08 
AnswerRe: daemon program on Windows Pin
prasad_som29-Sep-05 2:31
prasad_som29-Sep-05 2:31 
Questioniterators in unmanaged C++ Pin
allenmpcx28-Sep-05 15:09
allenmpcx28-Sep-05 15:09 
AnswerRe: iterators in unmanaged C++ Pin
Nemanja Trifunovic28-Sep-05 15:47
Nemanja Trifunovic28-Sep-05 15:47 
GeneralRe: iterators in unmanaged C++ Pin
allenmpcx28-Sep-05 16:50
allenmpcx28-Sep-05 16:50 
GeneralRe: iterators in unmanaged C++ Pin
toxcct28-Sep-05 21:31
toxcct28-Sep-05 21:31 
GeneralRe: iterators in unmanaged C++ Pin
allenmpcx29-Sep-05 5:54
allenmpcx29-Sep-05 5:54 
GeneralRe: iterators in unmanaged C++ Pin
toxcct29-Sep-05 20:57
toxcct29-Sep-05 20:57 

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.