Click here to Skip to main content
16,016,394 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: subclassing concept Pin
HumanOsc22-Aug-05 11:20
HumanOsc22-Aug-05 11:20 
GeneralRe: subclassing concept Pin
Jose Lamas Rios22-Aug-05 17:40
Jose Lamas Rios22-Aug-05 17:40 
GeneralRe: subclassing concept Pin
23_44423-Aug-05 6:20
23_44423-Aug-05 6:20 
GeneralQuestion about CFormView Pin
Joel Holdsworth22-Aug-05 7:26
Joel Holdsworth22-Aug-05 7:26 
GeneralRe: Question about CFormView Pin
Ravi Bhavnani22-Aug-05 8:32
professionalRavi Bhavnani22-Aug-05 8:32 
GeneralRe: Question about CFormView Pin
Joel Holdsworth22-Aug-05 22:04
Joel Holdsworth22-Aug-05 22:04 
GeneralC++ Design Pin
csylesh22-Aug-05 7:22
csylesh22-Aug-05 7:22 
GeneralRe: C++ Design Pin
Bob Stanneveld22-Aug-05 10:45
Bob Stanneveld22-Aug-05 10:45 
Hello,

You can do different things depending on your needs. If your base class is likely too change a lot and your system is very large (it takes a lot of time to compile and link), I definitly would go for the private data member.

From a logical design point of view, the most obvious thing to do is to derive your specialized classes from the base class. This way, your small accessor functions can be inlined better and you don't have to do much additional allocations, since that adds a lot of overhead.

Remember this: containment comes at a price. Overhead is the price to pay. How much you contain depends on each scenario... for example, a widely used class should contain all the implementation details at the cost of more runtime overhead. A not so widely used class doesn't need to contain all the details.. etc..

Hope this helps Big Grin | :-D

Behind every great black man...
            ... is the police. - Conspiracy brother


Blog[^]
GeneralActiveX versioning Pin
KaЯl22-Aug-05 5:59
KaЯl22-Aug-05 5:59 
GeneralRe: ActiveX versioning Pin
David Crow22-Aug-05 7:22
David Crow22-Aug-05 7:22 
GeneralRe: ActiveX versioning Pin
KaЯl22-Aug-05 21:16
KaЯl22-Aug-05 21:16 
GeneralTransparent Dialog, but... Pin
Hamed Musavi22-Aug-05 5:16
Hamed Musavi22-Aug-05 5:16 
Questiontooltips for bitmaps? Pin
sayup22-Aug-05 5:13
sayup22-Aug-05 5:13 
AnswerRe: tooltips for bitmaps? Pin
Hamed Musavi22-Aug-05 5:33
Hamed Musavi22-Aug-05 5:33 
GeneralRe: tooltips for bitmaps? Pin
sayup22-Aug-05 18:21
sayup22-Aug-05 18:21 
GeneralRe: tooltips for bitmaps? Pin
Hamed Musavi22-Aug-05 22:32
Hamed Musavi22-Aug-05 22:32 
AnswerRe: tooltips for bitmaps? Pin
Bob Ciora22-Aug-05 6:36
Bob Ciora22-Aug-05 6:36 
GeneralRe: tooltips for bitmaps? Pin
Bob Ciora22-Aug-05 6:37
Bob Ciora22-Aug-05 6:37 
GeneralRe: tooltips for bitmaps? Pin
Hamed Musavi22-Aug-05 10:20
Hamed Musavi22-Aug-05 10:20 
Generalsteps needed to call DeviceIoControl Pin
gamitech22-Aug-05 5:05
gamitech22-Aug-05 5:05 
GeneralRe: steps needed to call DeviceIoControl Pin
David Crow22-Aug-05 5:12
David Crow22-Aug-05 5:12 
GeneralRe: steps needed to call DeviceIoControl Pin
gamitech22-Aug-05 10:01
gamitech22-Aug-05 10:01 
GeneralRe: steps needed to call DeviceIoControl Pin
David Crow22-Aug-05 10:32
David Crow22-Aug-05 10:32 
GeneralRe: steps needed to call DeviceIoControl Pin
gamitech22-Aug-05 10:46
gamitech22-Aug-05 10:46 
Generalhttp attachment Pin
ppp00122-Aug-05 5:02
ppp00122-Aug-05 5:02 

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.