On 22-Jan-09, at 7:43 PM, Sean M. Pappalardo wrote:

>
>
> Albert Santoni wrote:
>> It means that MidiMapping is declared but not defined within the  
>> scope
>> of that file. The declaration is the "class MidiMapping;" forward
>> declaration that you have at the top of midiobject.h (I'm assuming).
>> This is a problem, for example, because the compiler doesn't know how
>> much memory to allocate for a MidiMapping object, so a MidiObject  
>> can't
>> be constructed. If you make m_pMidiMapping a pointer, then the  
>> compiler
>> knows that it only needs to allocate 32-bits for the pointer when
>> MidiObject is constructed. The rest of the memory that MidiMapping  
>> needs
>> is allocated when you say "m_pMidiMapping = new MidiMapping(blah);".
>
> So it's perfectly fine to do it that way?

Yes.

> I actually want the
> MidiMapping to be a "child" of MidiObject, as MidiScriptEngine is. (Or
> do objects, once created, exist independently anyway? I.e. does it  
> even
> matter where objects are instantiated, so long as inheritance isn't a
> factor?)
>

If by "child", you mean a member of the class, then you've already  
done it. I'm not quite sure how to answer the other questions because  
I'm not sure what you're trying to ask. :)

Albert

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to