Click here to Skip to main content
16,011,743 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: STL set.h Performance Analysis Pin
Andreas Saurwein20-Nov-03 15:58
Andreas Saurwein20-Nov-03 15:58 
GeneralRe: STL set.h Performance Analysis Pin
BrianReeve21-Nov-03 9:38
BrianReeve21-Nov-03 9:38 
GeneralRe: STL set.h Performance Analysis Pin
Andreas Saurwein21-Nov-03 11:20
Andreas Saurwein21-Nov-03 11:20 
GeneralRe: STL set.h Performance Analysis Pin
Joaquín M López Muñoz22-Nov-03 8:18
Joaquín M López Muñoz22-Nov-03 8:18 
GeneralReturn value from ATL method to JavaScript variable Pin
SlavaFromUkraine20-Nov-03 1:50
SlavaFromUkraine20-Nov-03 1:50 
GeneralRe: Return value from ATL method to JavaScript variable Pin
Stefan Pedersen20-Nov-03 15:54
Stefan Pedersen20-Nov-03 15:54 
GeneralRe: Return value from ATL method to JavaScript variable Pin
SlavaFromUkraine20-Nov-03 19:53
SlavaFromUkraine20-Nov-03 19:53 
QuestionDerive or include member var? Pin
GDavy19-Nov-03 20:23
GDavy19-Nov-03 20:23 
Hi guys,

Ok this is the dilemma I^m facing right now:
I`ve got this template class in which I want to have a static member variable which is shared by all objects of that class no matter what the template parameters were. So I figured I need to create a dummy class with that static parameter and use that.
The way in which to use that now is the question there are 2 options (as far as I can see).
1) I derive the template class from that dummy class
2) I put a member var of that dummy class in the template class.
eg:
class CDummy
{
static int m_nAnInteger;
};
//option nr 1
template<class TParam> class CATemplate: public TParam, public CDummy
{
...
};
//option nr 2
template<class TParam> class CATemplate: public TParam
{
CDummy theDummyObj;
...
};

In the one case I can refer to m_nAnInteger dircty in the other I have to refer to it through the object. In the one case I am dealing with multiple inheretance however and in the other not. So if anybody can tell me which would be the best solution feel free.

Greetz,
Davy
AnswerRe: Derive or include member var? Pin
berndg19-Nov-03 22:15
berndg19-Nov-03 22:15 
GeneralToolbar for IE Pin
okinawascubadiver19-Nov-03 13:49
okinawascubadiver19-Nov-03 13:49 
GeneralATL7.0 and Error Handling Pin
arun140519-Nov-03 5:28
arun140519-Nov-03 5:28 
GeneralMessage Reflection In WTL Pin
Sunil122119-Nov-03 3:38
Sunil122119-Nov-03 3:38 
GeneralRe: Message Reflection In WTL Pin
Michael Dunn27-Nov-03 7:22
sitebuilderMichael Dunn27-Nov-03 7:22 
GeneralMessage Reflection in WTL Pin
Anonymous19-Nov-03 3:31
Anonymous19-Nov-03 3:31 
Generalstatic members in templates... Pin
GDavy19-Nov-03 0:04
GDavy19-Nov-03 0:04 
GeneralRe: static members in templates... Pin
Joaquín M López Muñoz19-Nov-03 8:24
Joaquín M López Muñoz19-Nov-03 8:24 
GeneralRe: static members in templates... Pin
GDavy19-Nov-03 21:25
GDavy19-Nov-03 21:25 
GeneralRe: static members in templates... Pin
Joaquín M López Muñoz19-Nov-03 23:36
Joaquín M López Muñoz19-Nov-03 23:36 
GeneralRe: static members in templates... Pin
Nemanja Trifunovic22-Nov-03 10:02
Nemanja Trifunovic22-Nov-03 10:02 
GeneralRe: static members in templates... Pin
Joaquín M López Muñoz23-Nov-03 2:30
Joaquín M López Muñoz23-Nov-03 2:30 
GeneralInformation of running application's objects Pin
naveensg18-Nov-03 23:08
naveensg18-Nov-03 23:08 
GeneralDDX DLL and CComboBoxImpl in WTL Pin
bryces18-Nov-03 17:17
bryces18-Nov-03 17:17 
GeneralRe: DDX DLL and CComboBoxImpl in WTL Pin
Michael Dunn18-Nov-03 17:26
sitebuilderMichael Dunn18-Nov-03 17:26 
GeneralRe: DDX DLL and CComboBoxImpl in WTL Pin
bryces18-Nov-03 17:39
bryces18-Nov-03 17:39 
GeneralRe: DDX DLL and CComboBoxImpl in WTL Pin
Michael Dunn22-Nov-03 16:30
sitebuilderMichael Dunn22-Nov-03 16:30 

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.