Here's a class declaration. I spent too much time learning UnrealScript that I'm having a brain fart. This is declaring WavPlayerEditor which is derived from AEffGUIEditor and CControlListener.... correct?
1 2 3 4 5 6 7
class WavPlayerEditor : public AEffGUIEditor, public CControlListener
// I'm assuming this is the constructor declaration
WavPlayerEditor (AudioEffect *effect);
Here's the WavPlayerEditor constructor definition. I omitted the junk within the constructor, not important for my question.
1 2 3 4
WavPlayerEditor::WavPlayerEditor (AudioEffect* effect):AEffGUIEditor(effect)
// Do something
Can someone explain to me what this line is saying?
Wait whats public AEffGUIEditor, public CControlListener
It looks like its stating that that function is part of a class, and that its code applies to two functions.
I wish I could tell you. They're part of the VST 2.4 SDK. The documentation isn't the most user friendly.
AEffGUIEditor is the class used for creating a custom GUI and CControlListener is a class that makes sure the VST plugin is listening to the GUI.
Those are crude descriptions and possibly incorrect. I should have pointed out that I'm more interested in a syntax explaination.
Well: WavPlayerEditor::WavePlayerEditor (AudioEffect* effect)WavPlayerEditor Class ::WavePlayerEditor Function which is a member of the class WavePlayerEditor - (that constructor function and class have the same name) (AudioEffect* effect) Arguments
The :: States that the function is a member of that class as far as I know.
I saw the : style thing once but I forgot what it meant.
It's possible to call a specific base class constructor when implementing the derived class constructor, because the derived constructor might need to initialise something in the base class before proceeding.
The base class might have several constructors, so you need to be able to call the appropriate one to do the initialisation for the particular derived class constructor. A derived class will always cause a base class constructor to be called, This feature of C++ allows you to call a particular base class constructor.