Base Module VST 3.7
SDK for developing VST plug-in
|
Convenient macros to create setter and getter methods. More...
Macros | |
#define | DEFINE_VARIABLE(type, varName, methodName) DATA_MEMBER(type,varName,methodName) |
#define | DEFINE_POINTER(type, varName, methodName) POINTER_MEMBER(type,varName,methodName) |
#define | DEFINE_MEMBER(type, varName, methodName) CLASS_MEMBER(type,varName,methodName) |
#define | COMPARE_BY_MEMBER_METHODS(className, memberName) |
#define | COMPARE_BY_MEMORY_METHODS(className) |
#define | COMPARE_BY_COMPARE_METHOD(className, methodName) |
Methods for flags. | |
Macros to create setter and getter methods for flags. Usage example with DEFINE_STATE: class MyClass
{
public:
MyClass () : flags (0) {}
DEFINE_FLAG (flags, isFlagged, 1<<0)
DEFINE_FLAG (flags, isMine, 1<<1)
private:
uint32 flags;
};
void someFunction ()
{
MyClass c;
if (c.isFlagged ()) // check the flag
c.isFlagged (false); // set the flag
}
#define DEFINE_FLAG(flagVar, methodName, value) Create Methods. Definition: fstdmethods.h:82 | |
#define | DEFINE_STATE(flagVar, methodName, value) |
Create Methods with get and set prefix. More... | |
#define | DEFINE_GETSTATE(flagVar, methodName, value) bool get##methodName ()const { return (flagVar & (value)) != 0; } |
Create Methods with get prefix. More... | |
#define | DEFINE_FLAG(flagVar, methodName, value) |
Create Methods. More... | |
#define | DEFINE_GETFLAG(flagVar, methodName, value) bool methodName ()const { return (flagVar & (value)) != 0; } |
Create Methods. More... | |
#define | DEFINE_FLAG_STATIC(flagVar, methodName, value) |
Create static Methods. More... | |
Methods for data members. | |
Macros to create setter and getter methods for class members. Examples: class MyClass
{
public:
DATA_MEMBER (double, distance, Distance)
STRING_MEMBER (Steinberg::String, name, Name)
SHARED_MEMBER (FUnknown, userData, UserData)
CLASS_MEMBER (Steinberg::Buffer, bufferData, BufferData)
POINTER_MEMBER (Steinberg::FObject, refOnly, RefOnly)
};
#define STRING_MEMBER(type, varName, methodName) Build-in member (pass by value). Definition: fstdmethods.h:150 #define DATA_MEMBER(type, varName, methodName) Build-in member (pass by value). Definition: fstdmethods.h:120 #define POINTER_MEMBER(type, varName, methodName) Build-in member (pass by value). Definition: fstdmethods.h:132 #define CLASS_MEMBER(type, varName, methodName) Build-in member (pass by value). Definition: fstdmethods.h:126 #define SHARED_MEMBER(type, varName, methodName) Build-in member (pass by value). Definition: fstdmethods.h:138
| |
#define | DATA_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | CLASS_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | POINTER_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | SHARED_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | OWNED_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | STRING_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | STRING8_MEMBER(type, varName, methodName) |
Build-in member (pass by value). More... | |
#define | STRING_MEMBER_STD(varName, methodName) STRING_MEMBER(Steinberg::String,varName,methodName) |
Build-in member (pass by value). More... | |
#define | STRING8_MEMBER_STD(varName, methodName) STRING8_MEMBER(Steinberg::String,varName,methodName) |
Build-in member (pass by value). More... | |
Convenient macros to create setter and getter methods.
#define DEFINE_STATE | ( | flagVar, | |
methodName, | |||
value | |||
) |
Create Methods with get
and set
prefix.
#define DEFINE_GETSTATE | ( | flagVar, | |
methodName, | |||
value | |||
) | bool get##methodName ()const { return (flagVar & (value)) != 0; } |
Create Methods with get
prefix.
There is only a 'get' method.
#define DEFINE_FLAG | ( | flagVar, | |
methodName, | |||
value | |||
) |
Create Methods.
Same name for the getter and setter.
#define DEFINE_GETFLAG | ( | flagVar, | |
methodName, | |||
value | |||
) | bool methodName ()const { return (flagVar & (value)) != 0; } |
Create Methods.
There is only a 'get' method.
#define DEFINE_FLAG_STATIC | ( | flagVar, | |
methodName, | |||
value | |||
) |
Create static
Methods.
Same name for the getter and setter.
#define DATA_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define CLASS_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define POINTER_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define SHARED_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define OWNED_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define STRING_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define STRING8_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) |
Build-in member (pass by value).
#define STRING_MEMBER_STD | ( | varName, | |
methodName | |||
) | STRING_MEMBER(Steinberg::String,varName,methodName) |
Build-in member (pass by value).
#define STRING8_MEMBER_STD | ( | varName, | |
methodName | |||
) | STRING8_MEMBER(Steinberg::String,varName,methodName) |
Build-in member (pass by value).
#define DEFINE_VARIABLE | ( | type, | |
varName, | |||
methodName | |||
) | DATA_MEMBER(type,varName,methodName) |
#define DEFINE_POINTER | ( | type, | |
varName, | |||
methodName | |||
) | POINTER_MEMBER(type,varName,methodName) |
#define DEFINE_MEMBER | ( | type, | |
varName, | |||
methodName | |||
) | CLASS_MEMBER(type,varName,methodName) |
#define COMPARE_BY_MEMBER_METHODS | ( | className, | |
memberName | |||
) |
#define COMPARE_BY_MEMORY_METHODS | ( | className | ) |
#define COMPARE_BY_COMPARE_METHOD | ( | className, | |
methodName | |||
) |