From b1224f91730af6a729f7e7a428eb660a6d734926 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 20 Sep 2006 14:24:10 +0000 Subject: enabled templates for flext classes, inlined timer functions, some more ToOut/Sys methods fixed help name definition added flfeatures.h for compile-time version-specific feature detection changed eol-style adapted for pd-devel 0.39 minimal fix for timers cosmetic changes to calm the compiler changes for Mac/Intel svn path=/trunk/; revision=5979 --- externals/grill/flext/source/flbase.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'externals/grill/flext/source/flbase.h') diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h index c37036c1..73b1a21a 100644 --- a/externals/grill/flext/source/flbase.h +++ b/externals/grill/flext/source/flbase.h @@ -331,6 +331,34 @@ static void __setup__(t_classid classid) { \ thisType::SETUPFUN(classid); \ } +#define FLEXT_REALHDR_T(NEW_CLASS, PARENT_CLASS) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +typedef typename thisParent::t_classid t_classid; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { \ + FLEXT_CLASSDEF(flext_obj) *mydata = hdr->data; delete mydata; \ + hdr->flext_hdr::~flext_hdr(); \ +} \ +static void __setup__(t_classid classid) { thisParent::__setup__(classid); } + + +#define FLEXT_REALHDR_TS(NEW_CLASS, PARENT_CLASS,SETUPFUN) \ +public: \ +typedef NEW_CLASS thisType; \ +typedef PARENT_CLASS thisParent; \ +typedef typename thisParent::t_classid t_classid; \ +static FLEXT_CLASSDEF(flext_obj) *__init__(int argc,t_atom *argv); \ +static void __free__(flext_hdr *hdr) { \ + FLEXT_CLASSDEF(flext_obj) *mydata = hdr->data; delete mydata; \ + hdr->flext_hdr::~flext_hdr(); \ +} \ +static void __setup__(t_classid classid) { \ + thisParent::__setup__(classid); \ + thisType::SETUPFUN(classid); \ +} + // generate name of dsp/non-dsp setup function #if FLEXT_SYS == FLEXT_SYS_PD || FLEXT_SYS == FLEXT_SYS_MAX -- cgit v1.2.1