LMMS
Loading...
Searching...
No Matches
vstcomponentbase.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// Project : VST SDK
3//
4// Category : Helpers
5// Filename : public.sdk/source/vst/vstcomponentbase.h
6// Created by : Steinberg, 05/2005
7// Description : Base class for Component and Edit Controller
8//
9//-----------------------------------------------------------------------------
10// LICENSE
11// (c) 2021, Steinberg Media Technologies GmbH, All Rights Reserved
12//-----------------------------------------------------------------------------
13// Redistribution and use in source and binary forms, with or without modification,
14// are permitted provided that the following conditions are met:
15//
16// * Redistributions of source code must retain the above copyright notice,
17// this list of conditions and the following disclaimer.
18// * Redistributions in binary form must reproduce the above copyright notice,
19// this list of conditions and the following disclaimer in the documentation
20// and/or other materials provided with the distribution.
21// * Neither the name of the Steinberg Media Technologies nor the names of its
22// contributors may be used to endorse or promote products derived from this
23// software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
33// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34// OF THE POSSIBILITY OF SUCH DAMAGE.
35//-----------------------------------------------------------------------------
36
37#pragma once
38
42#include "base/source/fobject.h"
43
44//------------------------------------------------------------------------
45namespace Steinberg {
46namespace Vst {
47
48//------------------------------------------------------------------------
52class ComponentBase: public FObject,
53 public IPluginBase,
54 public IConnectionPoint
55{
56public:
57//------------------------------------------------------------------------
59 ~ComponentBase () override;
60
61 //--- Internal Methods------
63 FUnknown* getHostContext () const { return hostContext; }
64
68
70 IMessage* allocateMessage () const;
71
74
77 tresult sendTextMessage (const char8* text) const;
78
80 tresult sendMessageID (const char8* messageID) const;
81
83 virtual tresult receiveText (const char8* text);
84
85 //---from IPluginBase------
86 tresult PLUGIN_API initialize (FUnknown* context) SMTG_OVERRIDE;
87 tresult PLUGIN_API terminate () SMTG_OVERRIDE;
88
89 //---from IConnectionPoint-----------
93
94 //---Interface------
101
102//------------------------------------------------------------------------
103protected:
106};
107
108//------------------------------------------------------------------------
109} // namespace Vst
110} // namespace Steinberg
static void message(int level, const char *fmt,...)
Definition adplugdb.cpp:120
Definition fobject.h:82
FObject()
default constructor...
Definition fobject.h:85
Definition funknown.h:361
Definition ipluginbase.h:37
Definition smartpointer.h:44
Definition vstcomponentbase.h:55
tresult PLUGIN_API notify(IMessage *message) SMTG_OVERRIDE
Definition vstcomponentbase.cpp:110
IConnectionPoint * getPeer() const
Definition vstcomponentbase.h:67
IMessage * allocateMessage() const
Definition vstcomponentbase.cpp:130
tresult PLUGIN_API initialize(FUnknown *context) SMTG_OVERRIDE
Definition vstcomponentbase.cpp:56
~ComponentBase() override
Definition vstcomponentbase.cpp:51
IPtr< IConnectionPoint > peerConnection
Definition vstcomponentbase.h:105
FUnknown * getHostContext() const
Definition vstcomponentbase.h:63
tresult PLUGIN_API terminate() SMTG_OVERRIDE
Definition vstcomponentbase.cpp:68
IPtr< FUnknown > hostContext
Definition vstcomponentbase.h:104
tresult sendTextMessage(const char8 *text) const
Definition vstcomponentbase.cpp:147
virtual tresult receiveText(const char8 *text)
Definition vstcomponentbase.cpp:173
tresult PLUGIN_API connect(IConnectionPoint *other) SMTG_OVERRIDE
Definition vstcomponentbase.cpp:85
tresult sendMessage(IMessage *message) const
Definition vstcomponentbase.cpp:139
tresult sendMessageID(const char8 *messageID) const
Definition vstcomponentbase.cpp:162
ComponentBase()
Definition vstcomponentbase.cpp:46
tresult PLUGIN_API disconnect(IConnectionPoint *other) SMTG_OVERRIDE
Definition vstcomponentbase.cpp:99
Definition ivstmessage.h:73
Definition ivstmessage.h:41
#define DEFINE_INTERFACES
Definition fobject.h:378
#define DEF_INTERFACE(InterfaceName)
Definition fobject.h:385
#define OBJ_METHODS(className, baseClass)
Definition fobject.h:339
#define END_DEFINE_INTERFACES(BaseClass)
Definition fobject.h:391
#define REFCOUNT_METHODS(BaseClass)
Definition fobject.h:351
#define SMTG_OVERRIDE
Definition fplatform.h:241
Definition ivstattributes.h:28
Definition baseiids.cpp:43
char char8
Definition ftypes.h:93
int32 tresult
Definition ftypes.h:76
const char * text
Definition swell-functions.h:167