fldefs_setup.h
Go to the documentation of this file.
/*
flext - C++ layer for Max and Pure Data externals
Copyright (c) 2001-2015 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
#ifndef __FLEXT_DEFS_SETUP_H
#define __FLEXT_DEFS_SETUP_H
// ====================================================================================
// NO ARGUMENTS
// ----------------------------------------
#define FLEXT_NEW(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,0,0,0)
#define FLEXT_NEW_DSP(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,1,0,0)
#define FLEXT_NEW_DSP0(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,1,1,0)
#define FLEXT_LIB(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,0,0,1)
#define FLEXT_LIB_DSP(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,1,0,1)
#define FLEXT_LIB_DSP0(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,1,1,1)
// VARIABLE ARGUMENT LIST
// ----------------------------------------
#define FLEXT_NEW_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS,0,0,0)
#define FLEXT_NEW_DSP_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS,1,0,0)
#define FLEXT_NEW_DSP0_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS,1,1,0)
#define FLEXT_LIB_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS, 0,0,1)
#define FLEXT_LIB_DSP_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS, 1,0,1)
#define FLEXT_LIB_DSP0_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS, 1,1,1)
// ONE ARGUMENT
// ----------------------------------------
#define FLEXT_NEW_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 0,0,0, TYPE)
#define FLEXT_NEW_DSP_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 1,0,0, TYPE)
#define FLEXT_NEW_DSP0_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 1,1,0, TYPE)
#define FLEXT_LIB_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 0,0,1, TYPE)
#define FLEXT_LIB_DSP_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 1,0,1, TYPE)
#define FLEXT_LIB_DSP0_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 1,1,1, TYPE)
// TWO ARGUMENTS
// ----------------------------------------
#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2)
#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2)
#define FLEXT_NEW_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2)
#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2)
#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2)
#define FLEXT_LIB_DSP0_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2)
// THREE ARGUMENTS
// ----------------------------------------
#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 0,0,0, TYPE1, TYPE2, TYPE3)
#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 1,0,0, TYPE1, TYPE2, TYPE3)
#define FLEXT_NEW_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 1,1,0, TYPE1, TYPE2, TYPE3)
#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 0,0,1, TYPE1, TYPE2, TYPE3)
#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 1,0,1, TYPE1, TYPE2, TYPE3)
#define FLEXT_LIB_DSP0_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 1,1,1, TYPE1, TYPE2, TYPE3)
// deprecated stuff
#define FLEXT_NEW_G FLEXT_NEW_V
#define FLEXT_NEW_TILDE FLEXT_NEW_DSP
#define FLEXT_NEW_TILDE_G FLEXT_NEW_DSP_V
#define FLEXT_NEW_TILDE_1 FLEXT_NEW_DSP_1
#define FLEXT_NEW_TILDE_2 FLEXT_NEW_DSP_2
#define FLEXT_NEW_TILDE_3 FLEXT_NEW_DSP_3
#define FLEXT_LIB_G FLEXT_LIB_V
#define FLEXT_LIB_TILDE FLEXT_LIB_DSP
#define FLEXT_LIB_TILDE_G FLEXT_LIB_DSP_V
#define FLEXT_LIB_TILDE_1 FLEXT_LIB_DSP_1
#define FLEXT_LIB_TILDE_2 FLEXT_LIB_DSP_2
#define FLEXT_LIB_TILDE_3 FLEXT_LIB_DSP_3
#define FLEXT_TILDE_SETUP FLEXT_DSP_SETUP
#define FLEXT_LIB_SETUP(NAME,SETUPFUN) REAL_LIB_SETUP(NAME,SETUPFUN)
#define FLEXT_SETUP(cl) REAL_SETUP(cl,0)
#define FLEXT_DSP_SETUP(cl) REAL_SETUP(cl,1)
#endif