COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 07-21-2016, 04:06 AM   #1
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 234
Default How to call SendMidiMsg() outside base class?

Hi there,

inside my base CTOR plugin class I create a new instance of ITempoEngine:

Code:
MIDITest::MIDITest(IPlugInstanceInfo instanceInfo) : IPLUG_CTOR(kNumParams, PLUG_NUM_PRESETS, instanceInfo) {
	// ..

	// tempo engine
	pTempoEngine = new ITempoEngine(this);

	// ..
}
which is somethings like this right now:

Code:
class ITempoEngine
{
private:
	IPlugBase *pPlug;

public:
	ITempoEngine(IPlugBase *pPlug) : pPlug(pPlug) {
		
	}
	~ITempoEngine() {
		
	};
};
I'd like to invoke later within ITempoEngine the function SendMidiMsg(), but it seems I'm inside another "scope" of members visibility.

Tried with pPlug->SendMidiMsg() but I can't see that function. I'm passing "this" to the CTOR, why I can't wrap the function? Also tried to pass a IPlugVST or just IPlug as type object in the function, but it's the same.

Where am I wrong? Thanks
Nowhk is offline   Reply With Quote
Old 07-21-2016, 01:12 PM   #2
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 234
Default

Well,

I found I can set the class "friend" from MIDITest and send to ITempoEngine "this" MIDITest instance:

Code:
ITempoEngine(MIDITest *pPlug)
I know it's not a nice idea use "friend" if the method is decleared "protected".

Is there a reason why SendMidiMsg() is protected within IPlugVST? Could I make damages?
Nowhk is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.