flclass.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 __FLCLASS_H
#define __FLCLASS_H
// include the header file declaring the base classes
#include "flbase.h"
#include "flsupport.h"
#include "flmap.h"
#include "flinternal.h"
#ifdef _MSC_VER
#pragma warning(disable: 4786)
#endif
#ifdef __BORLANDC__
#pragma warn -8008 // Condition is always false
#pragma warn -8057 // Parameter is never used
#pragma warn -8066 // Unreachable code
#endif
#include "flpushns.h"
// === flext_base ==================================================
FLEXT_TEMPLATE class FLEXT_SHARE FLEXT_CLASSDEF(flext_base);
typedef class FLEXT_SHARE FLEXT_TEMPINST(FLEXT_CLASSDEF(flext_base)) flext_base;
FLEXT_TEMPLATE
class FLEXT_SHARE FLEXT_CLASSDEF(flext_base):
public flext_obj
{
FLEXT_HEADER_S(FLEXT_CLASSDEF(flext_base),flext_obj,Setup)
friend class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj);
public:
// --- inheritable virtual methods --------------------------------
virtual void CbLoadbang();
virtual void m_loadbang();
virtual void CbClick();
virtual bool CbMethodHandler(int inlet,const t_symbol *s,int argc,const t_atom *argv);
virtual bool CbMethodResort(int inlet,const t_symbol *s,int argc,const t_atom *argv);
virtual bool m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv);
virtual bool CbIdle();
// --- inlet/outlet stuff -----------------------------------------
// argument m specifies multiple inlet/outlet count
// void AddInDef() { AddInlet(xlet_def,1); }
void AddInAnything(int m = 1) { AddInlet(xlet_any,m); }
void AddInAnything(const char *desc,int m = 1) { AddInlet(xlet_any,m,desc); }
void AddInFloat(int m = 1) { AddInlet(xlet_float,m); }
void AddInFloat(const char *desc,int m = 1) { AddInlet(xlet_float,m,desc); }
void AddInInt(int m = 1) { AddInlet(xlet_int,m); }
void AddInInt(const char *desc,int m = 1) { AddInlet(xlet_int,m,desc); }
void AddInSymbol(int m = 1) { AddInlet(xlet_sym,m); }
void AddInSymbol(const char *desc,int m = 1) { AddInlet(xlet_sym,m,desc); }
void AddInBang(int m = 1) { AddInlet(xlet_sym,m); }
void AddInBang(const char *desc,int m = 1) { AddInlet(xlet_sym,m,desc); }
void AddInList(int m = 1) { AddInlet(xlet_list,m); }
void AddInList(const char *desc,int m = 1) { AddInlet(xlet_list,m,desc); }
void AddOutAnything(int m = 1) { AddOutlet(xlet_any,m); }
void AddOutAnything(const char *desc,int m = 1) { AddOutlet(xlet_any,m,desc); }
void AddOutFloat(int m = 1) { AddOutlet(xlet_float,m); }
void AddOutFloat(const char *desc,int m = 1) { AddOutlet(xlet_float,m,desc); }
void AddOutInt(int m = 1) { AddOutlet(xlet_int,m); }
void AddOutInt(const char *desc,int m = 1) { AddOutlet(xlet_int,m,desc); }
void AddOutSymbol(int m = 1) { AddOutlet(xlet_sym,m); }
void AddOutSymbol(const char *desc,int m = 1) { AddOutlet(xlet_sym,m,desc); }
void AddOutBang(int m = 1) { AddOutlet(xlet_sym,m); }
void AddOutBang(const char *desc,int m = 1) { AddOutlet(xlet_sym,m,desc); }
void AddOutList(int m = 1) { AddOutlet(xlet_list,m); }
void AddOutList(const char *desc,int m = 1) { AddOutlet(xlet_list,m,desc); }
bool SetupInOut() { return true; }
int CntIn() const { return incnt; }
int CntOut() const { return outcnt; }
int CntInSig() const { return insigs; }
int CntOutSig() const { return outsigs; }
static const t_symbol *thisTag() { return curtag; }
class outlet;
outlet *GetOut(int ix) const { return outlets[ix]; }
int GetOutAttr() const { return HasAttributes()?CntOut():0; }
// output messages
void ToOutBang(int n) const;
void ToOutFloat(int n,float f) const;
void ToOutInt(int n,int f) const;
void ToOutBool(int n,bool f) const { ToOutInt(n,f?1:0); }
void ToOutDouble(int n,double d) const { t_atom dbl[2]; ToOutList(n,2,SetDouble(dbl,d)); }
void ToOutSymbol(int n,const t_symbol *s) const;
void ToOutString(int n,const char *s) const { ToOutSymbol(n,MakeSymbol(s)); }
void ToOutAtom(int n,const t_atom &at) const;
void ToOutList(int n,int argc,const t_atom *argv) const;
void ToOutList(int n,const AtomList &list) const { ToOutList(n,list.Count(),list.Atoms()); }
void ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const;
void ToOutAnything(int n,const AtomAnything &any) const { ToOutAnything(n,any.Header(),any.Count(),any.Atoms()); }
void ToOutAnything(int n,const t_symbol *s,const AtomList &list) const { ToOutAnything(n,s,list.Count(),list.Atoms()); }
void ToQueueBang(int n) const;
void ToQueueFloat(int n,float f) const;
void ToQueueInt(int n,int f) const;
void ToQueueBool(int n,bool f) const { ToQueueInt(n,f?1:0); }
void ToQueueDouble(int n,double d) const { t_atom dbl[2]; ToQueueList(n,2,SetDouble(dbl,d)); }
void ToQueueSymbol(int n,const t_symbol *s) const;
void ToQueueString(int n,const char *s) const { ToQueueSymbol(n,MakeSymbol(s)); }
void ToQueueAtom(int n,const t_atom &at) const;
void ToQueueList(int n,int argc,const t_atom *argv) const;
void ToQueueList(int n,const AtomList &list) const { ToQueueList(n,list.Count(),list.Atoms()); }
void ToQueueAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const;
void ToQueueAnything(int n,const AtomAnything &any) const { ToQueueAnything(n,any.Header(),any.Count(),any.Atoms()); }
void ToSelfBang(int n) const { ToQueueBang(-1-n); }
void ToSelfFloat(int n,float f) const { ToQueueFloat(-1-n,f); }
void ToSelfInt(int n,int f) const { ToQueueInt(-1-n,f); }
void ToSelfBool(int n,bool f) const { ToSelfInt(n,f?1:0); }
void ToSelfDouble(int n,double d) const { t_atom dbl[2]; ToSelfList(n,2,SetDouble(dbl,d)); }
void ToSelfSymbol(int n,const t_symbol *s) const { ToQueueSymbol(-1-n,s); }
void ToSelfString(int n,const char *s) const { ToSelfSymbol(n,MakeSymbol(s)); }
void ToSelfAtom(int n,const t_atom &at) const { ToQueueAtom(-1-n,at); }
void ToSelfList(int n,int argc,const t_atom *argv) const { ToQueueList(-1-n,argc,argv); }
void ToSelfList(int n,const AtomList &list) const { ToSelfList(n,list.Count(),list.Atoms()); }
void ToSelfAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { ToQueueAnything(-1-n,s,argc,argv); }
void ToSelfAnything(int n,const AtomAnything &any) const { ToSelfAnything(n,any.Header(),any.Count(),any.Atoms()); }
void MsgAddBang(MsgBundle *mb,int n) const;
void MsgAddFloat(MsgBundle *mb,int n,float f) const;
void MsgAddInt(MsgBundle *mb,int n,int f) const;
void MsgAddBool(MsgBundle *mb,int n,bool f) const { MsgAddInt(mb,n,f?1:0); }
void MsgAddDouble(MsgBundle *mb,int n,double d) const { t_atom dbl[2]; MsgAddList(mb,n,2,SetDouble(dbl,d)); }
void MsgAddSymbol(MsgBundle *mb,int n,const t_symbol *s) const;
void MsgAddString(MsgBundle *mb,int n,const char *s) const { MsgAddSymbol(mb,n,MakeSymbol(s)); }
void MsgAddAtom(MsgBundle *mb,int n,const t_atom &at) const;
void MsgAddList(MsgBundle *mb,int n,int argc,const t_atom *argv) const;
void MsgAddList(MsgBundle *mb,int n,const AtomList &list) const { MsgAddList(mb,n,list.Count(),list.Atoms()); }
void MsgAddAnything(MsgBundle *mb,int n,const t_symbol *s,int argc,const t_atom *argv) const;
void MsgAddAnything(MsgBundle *mb,int n,const AtomAnything &any) const { MsgAddAnything(mb,n,any.Header(),any.Count(),any.Atoms()); }
void MsgSelfBang(MsgBundle *mb,int n) const { MsgAddBang(mb,-1-n); }
void MsgSelfFloat(MsgBundle *mb,int n,float f) const { MsgAddFloat(mb,-1-n,f); }
void MsgSelfInt(MsgBundle *mb,int n,int f) const { MsgAddInt(mb,-1-n,f); }
void MsgSelfBool(MsgBundle *mb,int n,bool f) const { MsgSelfInt(mb,n,f?1:0); }
void MsgSelfDouble(MsgBundle *mb,int n,double d) const { t_atom dbl[2]; MsgSelfList(mb,n,2,SetDouble(dbl,d)); }
void MsgSelfSymbol(MsgBundle *mb,int n,const t_symbol *s) const { MsgAddSymbol(mb,-1-n,s); }
void MsgSelfString(MsgBundle *mb,int n,const char *s) const { MsgSelfSymbol(mb,n,MakeSymbol(s)); }
void MsgSelfAtom(MsgBundle *mb,int n,const t_atom &at) const { MsgAddAtom(mb,-1-n,at); }
void MsgSelfList(MsgBundle *mb,int n,int argc,const t_atom *argv) const { MsgAddList(mb,-1-n,argc,argv); }
void MsgSelfList(MsgBundle *mb,int n,const AtomList &list) const { MsgSelfList(mb,n,list.Count(),list.Atoms()); }
void MsgSelfAnything(MsgBundle *mb,int n,const t_symbol *s,int argc,const t_atom *argv) const { MsgAddAnything(mb,-1-n,s,argc,argv); }
void MsgSelfAnything(MsgBundle *mb,int n,const AtomAnything &any) const { MsgSelfAnything(mb,n,any.Header(),any.Count(),any.Atoms()); }
// --- message handling -------------------------------------------
enum metharg {
a_null = 0,
a_float,a_int,a_bool,
a_symbol,a_pointer,
a_list,a_any, // (t_symbol *) / int / t_atom *
a_LIST,a_ANY // AtomList, AtomAnything
};
typedef bool (*methfun)(flext_base *c);
void AddMethodDef(int inlet,const t_symbol *tag = NULL) { ThMeths()->Add(new MethItem,tag,inlet); }
void AddMethodDef(int inlet,const char *tag = NULL) { AddMethodDef(inlet,MakeSymbol(tag)); }
void AddMethod(int inlet,bool (*m)(flext_base *)) { AddMethod(ThMeths(),inlet,sym_bang,(methfun)m,a_null); }
void AddMethod(int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_list,a_null); }
void AddMethod(int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_list,a_null); }
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_null); } // pure method
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ThMeths(),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything
void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything
void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ThMeths(),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol
void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ThMeths(),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol
void AddMethod(int inlet,bool (*m)(flext_base *,float &)) { AddMethod(ThMeths(),inlet,sym_float,(methfun)m,a_float,a_null); } // single float
void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_float,a_float,a_null); } // list of 2 floats
void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats
#if FLEXT_SYS == FLEXT_SYS_PD
void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,sym_float,(methfun)m,a_int,a_null); } // single float
#else
void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,sym_int,(methfun)m,a_int,a_null); } // single float
#endif
void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_int,a_int,a_null); } // list of 2 floats
void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(ThMeths(),inlet,sym_list,(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,float &)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_float,a_null); } // method+float
void AddMethod(int inlet,const t_symbol *tag,bool (*m)(flext_base *,int &)) { AddMethod(ThMeths(),inlet,tag,(methfun)m,a_int,a_null); } // method+int
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(inlet,MakeSymbol(tag),m); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(inlet,MakeSymbol(tag),m); }
// ¥schedule call of the CbIdle method during the next idle cycle
void AddIdle();
static void SetDist(t_classid c,bool d = true);
bool DoDist() const;
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *)) { AddMethod(ClMeths(c),inlet,sym_bang,(methfun)m,a_null); }
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_list,a_null); }
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_list,a_null); }
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_null); } // pure method
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,sym_anything,(methfun)m,a_any,a_null); } // anything
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ClMeths(c),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ClMeths(c),inlet,sym_symbol,(methfun)m,a_symbol,a_null); } // single symbol
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &)) { AddMethod(ClMeths(c),inlet,sym_float,(methfun)m,a_float,a_null); } // single float
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_float,a_float,a_null); } // list of 2 floats
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats
#if FLEXT_SYS == FLEXT_SYS_PD
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,sym_float,(methfun)m,a_int,a_null); } // single integer
#else
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,sym_int,(methfun)m,a_int,a_null); } // single integer
#endif
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_int,a_int,a_null); } // list of 2 floats
static void AddMethod(t_classid c,int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(ClMeths(c),inlet,sym_list,(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_list,a_null); } // method+gimme
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,float &)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_float,a_null); } // method+float
static void AddMethod(t_classid c,int inlet,const t_symbol *tag,bool (*m)(flext_base *,int &)) { AddMethod(ClMeths(c),inlet,tag,(methfun)m,a_int,a_null); } // method+int
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
static void AddMethod(t_classid c,int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(c,inlet,MakeSymbol(tag),m); }
// ¥schedule call of the given idlefun during the next idle cycle
static void AddIdle(bool (*idlefun)(int argc,const t_atom *argv),int argc,const t_atom *argv);
// --- bind/unbind ---------------------------------------
bool Bind(const t_symbol *sym);
bool Unbind(const t_symbol *sym);
bool Bind(const char *sym) { return Bind(MakeSymbol(sym)); }
bool Unbind(const char *sym) { return Unbind(MakeSymbol(sym)); }
bool BindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL);
bool UnbindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL);
bool GetBoundMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data);
bool BindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL) { return BindMethod(MakeSymbol(sym),meth,data); }
bool UnbindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL) { return UnbindMethod(MakeSymbol(sym),meth,data); }
bool GetBoundMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data) { return GetBoundMethod(MakeSymbol(sym),meth,data); }
bool UnbindAll();
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
bool StartThread(void (*meth)(thr_params *p),thr_params *p,const char * = NULL) { p->cl = this; return flext::LaunchThread(meth,p); }
bool StopThreads();
#endif // FLEXT_THREADS
// xxx internal stuff xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
public: // needed by VC++ 6
enum xlettype {
xlet_none = 0,
xlet_float,xlet_int,xlet_sym,xlet_list,xlet_any,
xlet_LIST,xlet_ANY, // use AtomList and AtomAnything
xlet_sig
};
protected:
FLEXT_CLASSDEF(flext_base)();
virtual bool Init();
virtual void Exit();
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(attr,a_float,(methfun)get,(methfun)set); }
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(attr,a_int,(methfun)get,(methfun)set); }
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(attr,a_bool,(methfun)get,(methfun)set); }
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); }
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); }
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(attr,a_LIST,(methfun)get,(methfun)set); }
void AddAttrib(const t_symbol *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(attr,a_ANY,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(MakeSymbol(attr),get,set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(MakeSymbol(attr),get,set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(MakeSymbol(attr),get,set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(MakeSymbol(attr),get,set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(MakeSymbol(attr),get,set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(MakeSymbol(attr),get,set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(c,attr,a_float,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(c,attr,a_int,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(c,attr,a_bool,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(c,attr,a_symbol,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(c,attr,a_symbol,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(c,attr,a_LIST,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const t_symbol *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(c,attr,a_ANY,(methfun)get,(methfun)set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(c,MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(c,MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(c,MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(c,MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,t_symptr &),bool (*set)(flext_base *,t_symptr &)) { AddAttrib(c,MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(c,MakeSymbol(attr),get,set); }
static void AddAttrib(t_classid c,const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(c,MakeSymbol(attr),get,set); }
bool DumpAttrib(const t_symbol *attr) const;
bool DumpAttrib(const char *attr) const { return DumpAttrib(MakeSymbol(attr)); }
// check for attribute symbol @
static int CheckAttrib(int argc,const t_atom *argv);
// check for attribute symbol @
static int CheckAttrib(const AtomList &args,int offset = 0) { return CheckAttrib(args.Count()-offset,args.Atoms()+offset)+offset; }
bool ListAttrib() const;
void ListAttrib(AtomList &a) const;
bool GetAttrib(const t_symbol *s,AtomList &a) const;
bool SetAttrib(const t_symbol *s,int argc,const t_atom *argv);
bool SetAttrib(const t_symbol *s,const AtomList &a) { return SetAttrib(s,a.Count(),a.Atoms()); }
// get and set the attribute
bool BangAttrib(const t_symbol *a);
// get and set the attribute
bool BangAttrib(const char *a) { return BangAttrib(MakeSymbol(a)); }
// get and set all (both get- and settables)
bool BangAttribAll();
// show/hide the attribute
bool ShowAttrib(const t_symbol *a,bool show) const;
// show/hide the attribute
bool ShowAttrib(const char *a,bool show) { return ShowAttrib(MakeSymbol(a),show); }
void ListMethods(AtomList &a,int inlet = 0) const;
unsigned long XletCode(xlettype tp = xlet_none,...); // end list with 0 (= tp_none) !!
void AddInlets(unsigned long code);
void AddInlet(xlettype tp,int mult = 1,const char *desc = NULL);
void AddOutlets(unsigned long code);
void AddOutlet(xlettype tp,int mult = 1,const char *desc = NULL);
void DescInlet(int ix,const char *desc);
void DescOutlet(int ix,const char *desc);
// method handling
public:
class AttrItem;
class Item
{
public:
Item(AttrItem *a): attr(a),nxt(NULL) {}
virtual ~Item();
bool IsAttr() const { return attr != NULL; }
AttrItem *attr;
Item *nxt;
};
typedef TablePtrMap<const t_symbol *,Item *,8> TablePtrMapDef;
class ItemSet
:public TablePtrMapDef
{
public:
virtual ~ItemSet();
virtual void clear();
};
class FLEXT_SHARE ItemCont
{
public:
ItemCont();
~ItemCont();
int Min() const { return -1; }
int Max() const { return size-2; }
bool Contained(int i) const { return i+1 < size; }
void Add(Item *it,const t_symbol *tag,int inlet = 0);
bool Remove(Item *it,const t_symbol *tag,int inlet,bool free);
Item *FindList(const t_symbol *tag,int inlet = 0);
ItemSet &GetInlet(int inlet = 0)
{
FLEXT_ASSERT(inlet >= Min() && inlet <= Max());
return *cont[inlet+1];
}
int Members() const { return members; }
protected:
void Resize(int nsz);
int members;
int memsize,size;
ItemSet **cont;
};
class MethItem:
public Item
{
public:
MethItem(AttrItem *conn = NULL);
virtual ~MethItem();
void SetArgs(methfun fun,int argc,metharg *args);
int index;
int argc;
metharg *args;
methfun fun;
};
class AttrItem:
public Item
{
public:
AttrItem(const t_symbol *tag,metharg tp,methfun fun,int flags);
enum {
afl_get = 0x01, afl_set = 0x02,
afl_getset = afl_get|afl_set,
afl_shown = 0x08
};
bool IsGet() const { return (flags&afl_getset) == afl_get; }
bool IsSet() const { return (flags&afl_getset) == afl_set; }
bool IsShown() const { return (flags&afl_shown) != 0; }
bool BothExist() const { return counter != NULL; }
AttrItem *Counterpart() { return counter; }
int index;
int flags;
metharg argtp;
methfun fun;
AttrItem *counter;
const t_symbol *tag;
};
class AttrData:
public flext_root
{
public:
AttrData(): flags(0) {}
enum { afl_save = 0x01,afl_init = 0x02,afl_inited = 0x04 };
void SetSave(bool s) { if(s) flags |= afl_save; else flags &= ~afl_save; }
bool IsSaved() const { return (flags&afl_save) != 0; }
void SetInit(bool s) { if(s) flags |= afl_init; else flags &= ~afl_init; }
bool IsInit() const { return (flags&afl_init) != 0; }
void SetInitValue(int argc,const t_atom *argv) { init(argc,argv); flags |= afl_inited; }
void SetInitValue(const AtomList &l) { SetInitValue(l.Count(),l.Atoms()); }
bool IsInitValue() const { return (flags&afl_inited) != 0; }
const AtomList &GetInitValue() const { return init; }
AtomList init;
int flags;
};
class AttrDataCont
:public TablePtrMap<const t_symbol *,AttrData *,8>
{
public:
virtual ~AttrDataCont();
virtual void clear();
};
// these outlet functions don't check for thread but send directly to the real-time system
void ToSysBang(int n) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); } }
void ToSysFloat(int n,float f) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); } }
void ToSysInt(int n,int f) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); } }
void ToSysSymbol(int n,const t_symbol *s) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); } }
void ToSysString(int n,const char *s) const { ToSysSymbol(n,MakeSymbol(s)); }
void ToSysList(int n,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_list((t_outlet *)o,const_cast<t_symbol *>(sym_list),argc,(t_atom *)argv); CRITOFF(); } }
void ToSysList(int n,const AtomList &list) const { ToSysList(n,list.Count(),list.Atoms()); }
void ToSysAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); } }
void ToSysAnything(int n,const AtomAnything &any) const { ToSysAnything(n,any.Header(),any.Count(),any.Atoms()); }
void ToSysAnything(int n,const t_symbol *s,const AtomList &list) const { ToSysAnything(n,s,list.Count(),list.Atoms()); }
void ToSysBool(int n,bool f) const { ToSysInt(n,f?1:0); }
void ToSysAtom(int n,const t_atom &at) const;
void ToSysDouble(int n,double d) const { t_atom dbl[2]; ToSysList(n,2,SetDouble(dbl,d)); }
static void ToSysMsg(MsgBundle *mb);
// add class method handlers
static void AddMessageMethods(t_class *c,bool dsp,bool dspin);
private:
class pxbnd_object;
public:
class BindItem:
public Item
{
public:
BindItem(bool (*f)(flext_base *,t_symbol *s,int,t_atom *,void *),pxbnd_object *px);
virtual ~BindItem();
void Unbind(const t_symbol *s);
bool (*fun)(flext_base *,t_symbol *s,int,t_atom *,void *);
pxbnd_object *px;
};
ItemCont *ThMeths() { if(!methhead) methhead = new ItemCont; return methhead; }
static ItemCont *ClMeths(t_classid c);
static void AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...);
ItemCont *ThAttrs() { return attrhead; }
static ItemCont *ClAttrs(t_classid c);
static void AddAttrib(ItemCont *aa,ItemCont *ma,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun);
void AddAttrib(const t_symbol *attr,metharg tp,methfun gfun,methfun sfun);
static void AddAttrib(t_classid c,const t_symbol *attr,metharg tp,methfun gfun,methfun sfun);
private:
static inline flext_base *thisObject(flext_hdr *c) { return FLEXT_CAST<flext_base *>(c->data); }
static void Setup(t_classid c);
class FLEXT_SHARE xlet {
public:
xlet();
~xlet();
xlettype tp;
char *desc;
void Desc(const char *c);
};
static xlet inlist[];
static xlet outlist[];
static const t_symbol *curtag;
unsigned char incnt,outcnt,insigs,outsigs;
outlet **outlets;
union t_any {
float ft;
int it;
bool bt;
const t_symbol *st;
#if FLEXT_SYS == FLEXT_SYS_PD
t_gpointer *pt;
#endif
void *vt;
};
typedef bool (*methfun_V)(flext_base *c,int argc,t_atom *argv);
typedef bool (*methfun_A)(flext_base *c,const t_symbol *s,int argc,t_atom *argv);
typedef bool (*methfun_0)(flext_base *c);
typedef bool (*methfun_1)(flext_base *c,t_any &);
typedef bool (*methfun_2)(flext_base *c,t_any &,t_any &);
typedef bool (*methfun_3)(flext_base *c,t_any &,t_any &,t_any &);
typedef bool (*methfun_4)(flext_base *c,t_any &,t_any &,t_any &,t_any &);
typedef bool (*methfun_5)(flext_base *c,t_any &,t_any &,t_any &,t_any &,t_any &);
mutable ItemCont *methhead;
mutable ItemCont *bindhead;
bool FindMeth(int inlet,const t_symbol *s,int argc,const t_atom *argv);
bool FindMethAny(int inlet,const t_symbol *s,int argc,const t_atom *argv);
bool TryMethTag(Item *lst,const t_symbol *tag,int argc,const t_atom *argv);
bool TryMethSym(Item *lst,const t_symbol *s);
bool TryMethAny(Item *lst,const t_symbol *s,int argc,const t_atom *argv);
mutable ItemCont *attrhead;
mutable AttrDataCont *attrdata;
AttrItem *FindAttrib(const t_symbol *tag,bool get,bool msg = false) const;
bool InitAttrib(int argc,const t_atom *argv);
bool DumpAttrib(const t_symbol *tag,AttrItem *a) const;
bool GetAttrib(const t_symbol *tag,AttrItem *a,AtomList &l) const;
bool SetAttrib(const t_symbol *tag,AttrItem *a,int argc,const t_atom *argv);
bool SetAttrib(const t_symbol *tag,AttrItem *a,const AtomList &l) { return SetAttrib(tag,a,l.Count(),l.Atoms()); }
// get and set the attribute
bool BangAttrib(const t_symbol *tag,AttrItem *a);
// show/hide the attribute
bool ShowAttrib(AttrItem *a,bool show) const;
static bool cb_ListMethods(flext_base *c,int argc,const t_atom *argv);
static bool cb_ListAttrib(flext_base *c) { Locker lock(c); return c->ListAttrib(); }
// queue stuff
static void StartQueue();
#if FLEXT_QMODE == 2
static void QWorker(thr_params *);
#endif
static void QFlush(flext_base *th = NULL);
static bool qustarted;
#if FLEXT_SYS == FLEXT_SYS_PD
static void SetGfx(t_classid c);
#ifndef FLEXT_NOATTREDIT
// attribute editor
static bool cb_AttrDialog(flext_base *c,int argc,const t_atom *argv);
static void cb_GfxProperties(flext_hdr *c, t_glist *);
#endif
#ifdef FLEXT_ATTRHIDE
static void cb_GfxVis(flext_hdr *c, t_glist *gl, int vis);
static void cb_GfxSave(flext_hdr *c, t_binbuf *b);
static void cb_GfxSelect(flext_hdr *x, struct _glist *glist, int state);
void BinbufArgs(t_binbuf *b,t_binbuf *args,bool withname,bool transdoll);
void BinbufAttr(t_binbuf *b,bool transdoll);
#endif
static void cb_bang(flext_hdr *c);
static void cb_float(flext_hdr *c,t_float f);
static void cb_symbol(flext_hdr *c,const t_symbol *s);
// static void cb_pointer(fltext_hdr *c,const t_gpointer *p);
static void cb_anything(flext_hdr *c,const t_symbol *s,int argc,t_atom *argv);
// proxy object (for additional inlets)
static t_class *px_class;
struct px_object // no virtual table!
{
t_object obj; // MUST reside at memory offset 0
flext_base *base;
int index;
void init(flext_base *b,int ix) { base = b; index = ix; }
static void px_bang(px_object *c);
static void px_float(px_object *c,t_float f);
static void px_symbol(px_object *c,const t_symbol *s);
// static void px_pointer(px_object *c,const t_gpointer *p);
static void px_anything(px_object *c,const t_symbol *s,int argc,t_atom *argv);
};
static void cb_px_ft1(flext_hdr *c,t_float f);
static void cb_px_ft2(flext_hdr *c,t_float f);
static void cb_px_ft3(flext_hdr *c,t_float f);
static void cb_px_ft4(flext_hdr *c,t_float f);
static void cb_px_ft5(flext_hdr *c,t_float f);
static void cb_px_ft6(flext_hdr *c,t_float f);
static void cb_px_ft7(flext_hdr *c,t_float f);
static void cb_px_ft8(flext_hdr *c,t_float f);
static void cb_px_ft9(flext_hdr *c,t_float f);
#elif FLEXT_SYS == FLEXT_SYS_MAX
typedef object px_object;
static void cb_bang(flext_hdr *c);
static void cb_float(flext_hdr *c,double f);
static void cb_int(flext_hdr *c,long v);
static void cb_anything(flext_hdr *c,const t_symbol *s,short argc,t_atom *argv);
static void cb_px_in1(flext_hdr *c,long v);
static void cb_px_in2(flext_hdr *c,long v);
static void cb_px_in3(flext_hdr *c,long v);
static void cb_px_in4(flext_hdr *c,long v);
static void cb_px_in5(flext_hdr *c,long v);
static void cb_px_in6(flext_hdr *c,long v);
static void cb_px_in7(flext_hdr *c,long v);
static void cb_px_in8(flext_hdr *c,long v);
static void cb_px_in9(flext_hdr *c,long v);
static void cb_px_ft1(flext_hdr *c,double f);
static void cb_px_ft2(flext_hdr *c,double f);
static void cb_px_ft3(flext_hdr *c,double f);
static void cb_px_ft4(flext_hdr *c,double f);
static void cb_px_ft5(flext_hdr *c,double f);
static void cb_px_ft6(flext_hdr *c,double f);
static void cb_px_ft7(flext_hdr *c,double f);
static void cb_px_ft8(flext_hdr *c,double f);
static void cb_px_ft9(flext_hdr *c,double f);
#endif
px_object **inlets;
// --------- symbol-bound proxy
static t_class *pxbnd_class;
class pxbnd_object:
public flext_root
// no virtual table!
{
public:
t_object obj; // MUST reside at memory offset 0
flext_base *base;
BindItem *item;
void *data;
void init(flext_base *b,BindItem *it,void *d) { base = b; item = it; data = d; }
static void px_method(pxbnd_object *c,const t_symbol *s,int argc,t_atom *argv);
};
static void SetupBindProxy();
// ---------
static void SetProxies(t_class *c,bool dsp);
bool InitInlets();
bool InitOutlets();
// callback functions
static void cb_loadbang(flext_hdr *c);
#if FLEXT_SYS == FLEXT_SYS_MAX
char **indesc,**outdesc;
static void cb_assist(flext_hdr *c,void *b,long msg,long arg,char *s);
static void cb_click (flext_hdr *c, Point pt, short mods);
static void cb_dsp(flext_hdr *c,t_signal **s,short *count);
#elif FLEXT_SYS == FLEXT_SYS_PD
static void cb_click(flext_hdr *z,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt);
static void cb_dsp(flext_hdr *c,t_signal **s);
#endif
};
#include "flpopns.h"
#endif
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, t_symbol *, int, t_atom *))
Definition: flclass.h:448
flext_base::inlets
px_object ** inlets
Definition: flclass.h:1077
flext_base::AddInInt
void AddInInt(int m=1)
Add inlet(s) for integers.
Definition: flclass.h:126
flext_base::Item
Definition: flclass.h:721
flext_base::ToQueueAnything
void ToQueueAnything(int n, const AtomAnything &any) const
Output low priority anything (index n starts with 0)
Definition: flclass.h:276
flext_base::ToOutAnything
void ToOutAnything(int n, const AtomAnything &any) const
Output anything (index n starts with 0)
Definition: flclass.h:235
flext_base::MsgSelfDouble
void MsgSelfDouble(MsgBundle *mb, int n, double d) const
Output double (index n starts with 0)
Definition: flclass.h:374
flext_base::ThAttrs
ItemCont * ThAttrs()
Definition: flclass.h:901
flext_base::ToSelfDouble
void ToSelfDouble(int n, double d) const
Send double to self (index n starts with 0)
Definition: flclass.h:298
flext_base::MsgSelfList
void MsgSelfList(MsgBundle *mb, int n, int argc, const t_atom *argv) const
Send list to self (inlet n)
Definition: flclass.h:385
flext_base::AddOutList
void AddOutList(int m=1)
Add outlet(s) for lists.
Definition: flclass.h:163
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, t_symbol *, int, t_atom *))
Definition: flclass.h:440
flext_base::ToSelfAtom
void ToSelfAtom(int n, const t_atom &at) const
Output atom (index n starts with 0)
Definition: flclass.h:306
flext_base::ItemCont::GetInlet
ItemSet & GetInlet(int inlet=0)
Get list for an inlet.
Definition: flclass.h:765
flext_base::ItemCont::Min
int Min() const
Definition: flclass.h:752
flext_base::MsgSelfInt
void MsgSelfInt(MsgBundle *mb, int n, int f) const
Send integer to self (inlet n)
Definition: flclass.h:368
flext_base::outsigs
unsigned char outsigs
Definition: flclass.h:932
flext_base::MethItem
This represents an item of the method list.
Definition: flclass.h:784
flbase.h
Internal flext base classes.
flext_base::t_any::ft
float ft
Definition: flclass.h:937
flext_base::ToSelfList
void ToSelfList(int n, const AtomList &list) const
Send list to self (inlet n)
Definition: flclass.h:311
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, const t_symbol *, int, const t_atom *))
Definition: flclass.h:501
flext_base::curtag
static const t_symbol * curtag
current message tag
Definition: flclass.h:930
flext_base::ToSysInt
void ToSysInt(int n, int f) const
Definition: flclass.h:859
flext_base::MsgAddList
void MsgAddList(MsgBundle *mb, int n, const AtomList &list) const
Output list (index n starts with 0)
Definition: flclass.h:355
flext_base::BindItem::px
pxbnd_object * px
Definition: flclass.h:892
flext_base::AddInSymbol
void AddInSymbol(const char *desc, int m=1)
Add inlet(s) for symbol (with description)
Definition: flclass.h:132
flext_base::t_any::st
const t_symbol * st
Definition: flclass.h:940
flext_base::ToOutList
void ToOutList(int n, const AtomList &list) const
Output list (index n starts with 0)
Definition: flclass.h:230
flext_base::GetOutAttr
int GetOutAttr() const
Definition: flclass.h:194
FLEXT_HEADER_S
#define FLEXT_HEADER_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)
Flext class header with setup function.
Definition: fldefs_hdr.h:47
flext_base::AddInInt
void AddInInt(const char *desc, int m=1)
Add inlet(s) for integers (with description)
Definition: flclass.h:128
flext_base::AttrItem::flags
int flags
Definition: flclass.h:819
flext_base::t_any::pt
t_gpointer * pt
Definition: flclass.h:942
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, AtomList *&), bool(*set)(flext_base *, AtomList *&))
Definition: flclass.h:622
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, int, const t_atom *))
Definition: flclass.h:421
flext_base::px_object::base
flext_base * base
Definition: flclass.h:1028
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, int, const t_atom *))
Definition: flclass.h:491
flext_base::ToSysAnything
void ToSysAnything(int n, const t_symbol *s, int argc, const t_atom *argv) const
Definition: flclass.h:864
flext_base
Definition: flclass.h:58
flext_base::pxbnd_object::data
void * data
Definition: flclass.h:1091
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, bool &), bool(*set)(flext_base *, bool &))
Definition: flclass.h:619
flext_base::AttrItem::fun
methfun fun
Definition: flclass.h:821
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, bool &), bool(*set)(flext_base *, bool &))
Definition: flclass.h:633
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *))
Definition: flclass.h:422
flext_base::ToOutString
void ToOutString(int n, const char *s) const
Output string aka symbol (index n starts with 0)
Definition: flclass.h:222
flext_base::pxbnd_object::item
BindItem * item
Definition: flclass.h:1090
flext_base::AddInList
void AddInList(int m=1)
Add inlet(s) for lists.
Definition: flclass.h:138
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, int &))
Definition: flclass.h:432
flext_base::AddOutInt
void AddOutInt(int m=1)
Add outlet(s) for integers.
Definition: flclass.h:151
flext_base::ToSysFloat
void ToSysFloat(int n, float f) const
Definition: flclass.h:858
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, const t_symbol *, int, const t_atom *))
Definition: flclass.h:493
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, t_symbol *&))
Definition: flclass.h:502
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, int &))
Definition: flclass.h:484
flext_base::AttrData::SetInitValue
void SetInitValue(int argc, const t_atom *argv)
Definition: flclass.h:839
flext_base::outlets
outlet ** outlets
Definition: flclass.h:934
flext_base::xlettype
xlettype
Definition: flclass.h:586
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, int &))
Definition: flclass.h:505
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, int, t_atom *))
Definition: flclass.h:498
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, float &))
Definition: flclass.h:428
flext_base::AttrData::IsInitValue
bool IsInitValue() const
Definition: flclass.h:841
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, int &, int &))
Definition: flclass.h:436
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, t_symptr &), bool(*set)(flext_base *, t_symptr &))
Definition: flclass.h:614
flext_base::AttrData::IsInit
bool IsInit() const
Definition: flclass.h:838
flext_base::AttrItem::BothExist
bool BothExist() const
Definition: flclass.h:815
flext_base::AddInSymbol
void AddInSymbol(int m=1)
Add inlet(s) for symbols.
Definition: flclass.h:130
flext_base::Item::Item
Item(AttrItem *a)
Definition: flclass.h:724
flext_base::AttrItem::counter
AttrItem * counter
Definition: flclass.h:822
flext_base::Unbind
bool Unbind(const char *sym)
Unbind object from a symbol (as string)
Definition: flclass.h:527
flsupport.h
flext support functions and classes
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, float &))
Definition: flclass.h:444
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, t_symbol *, int, t_atom *))
Definition: flclass.h:476
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, int, const t_atom *))
Definition: flclass.h:473
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *))
Definition: flclass.h:419
flext_base::ToSelfAnything
void ToSelfAnything(int n, const AtomAnything &any) const
Send anything to self (inlet n)
Definition: flclass.h:316
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, int &, int &))
Definition: flclass.h:488
flext_base::pxbnd_class
static t_class * pxbnd_class
Definition: flclass.h:1081
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, int &, int &, int &))
Definition: flclass.h:437
flext_base::CntOut
int CntOut() const
Get number of outlets.
Definition: flclass.h:179
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, AtomAnything *&), bool(*set)(flext_base *, AtomAnything *&))
Definition: flclass.h:616
flext_base::ItemCont
Definition: flclass.h:746
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *))
Definition: flclass.h:471
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, const t_symbol *, int, const t_atom *))
Definition: flclass.h:425
flext_base::AddInList
void AddInList(const char *desc, int m=1)
Add inlet(s) for lists (with description)
Definition: flclass.h:140
flext_base::MsgSelfList
void MsgSelfList(MsgBundle *mb, int n, const AtomList &list) const
Send list to self (inlet n)
Definition: flclass.h:387
flext_base::AttrData::SetInitValue
void SetInitValue(const AtomList &l)
Definition: flclass.h:840
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, t_symbol *&))
Definition: flclass.h:450
flext_base::ToQueueList
void ToQueueList(int n, const AtomList &list) const
Output low priority list (index n starts with 0)
Definition: flclass.h:271
flext_base::t_any::vt
void * vt
Definition: flclass.h:944
flext_base::MethItem::argc
int argc
Definition: flclass.h:794
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, const t_symbol *&), bool(*set)(flext_base *, const t_symbol *&))
Definition: flclass.h:641
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, int, t_atom *))
Definition: flclass.h:446
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, int &), bool(*set)(flext_base *, int &))
Definition: flclass.h:611
flext_base::ToSysBang
void ToSysBang(int n) const
Definition: flclass.h:857
flext_base::pxbnd_object::base
flext_base * base
Definition: flclass.h:1089
flext_base::ToSelfBool
void ToSelfBool(int n, bool f) const
Send boolean to self (inlet n)
Definition: flclass.h:295
flext_base::ToSysAnything
void ToSysAnything(int n, const t_symbol *s, const AtomList &list) const
Definition: flclass.h:866
flext_base::AttrItem::IsSet
bool IsSet() const
Definition: flclass.h:813
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, AtomList *&), bool(*set)(flext_base *, AtomList *&))
Definition: flclass.h:643
flext_base::MsgSelfAnything
void MsgSelfAnything(MsgBundle *mb, int n, const AtomAnything &any) const
Send anything to self (inlet n)
Definition: flclass.h:392
flext_base::MethItem::fun
methfun fun
Definition: flclass.h:796
flext_base::xlet
This represents either an inlet or outlet during construction.
Definition: flclass.h:915
flext_base::MethItem::args
metharg * args
Definition: flclass.h:795
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, float &), bool(*set)(flext_base *, float &))
Definition: flclass.h:610
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, int &, int &, int &))
Definition: flclass.h:489
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, t_symbol *, int, t_atom *))
Definition: flclass.h:424
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, int &), bool(*set)(flext_base *, int &))
Definition: flclass.h:632
t_symptr
t_symbol * t_symptr
Definition: flstdc.h:225
flext_base::SetAttrib
bool SetAttrib(const t_symbol *s, const AtomList &a)
Set an attribute value.
Definition: flclass.h:667
flext_base::AttrData::init
AtomList init
Definition: flclass.h:844
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, bool &), bool(*set)(flext_base *, bool &))
Definition: flclass.h:612
flext_base::SetupInOut
bool SetupInOut()
Definition: flclass.h:168
flext_base::a_LIST
Definition: flclass.h:406
flext_base::ShowAttrib
bool ShowAttrib(const char *a, bool show)
Definition: flclass.h:678
FLEXT_ASSERT
#define FLEXT_ASSERT(b)
Definition: flstdc.h:284
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, AtomList *&), bool(*set)(flext_base *, AtomList *&))
Definition: flclass.h:636
flext_base::ToSysList
void ToSysList(int n, int argc, const t_atom *argv) const
Definition: flclass.h:862
flext_base::AddInFloat
void AddInFloat(int m=1)
Add inlet(s) for floats.
Definition: flclass.h:122
flext_base::TablePtrMapDef
TablePtrMap< const t_symbol *, Item *, 8 > TablePtrMapDef
Definition: flclass.h:733
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, const t_symbol *, int, const t_atom *))
Definition: flclass.h:477
flext_base::ToSysAnything
void ToSysAnything(int n, const AtomAnything &any) const
Definition: flclass.h:865
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, int, t_atom *))
Definition: flclass.h:490
flext_base::MsgAddAnything
void MsgAddAnything(MsgBundle *mb, int n, const AtomAnything &any) const
Output anything (index n starts with 0)
Definition: flclass.h:360
flext_base::bindhead
ItemCont * bindhead
Definition: flclass.h:957
flext_base::AttrDataCont
Definition: flclass.h:848
flext_base::MsgAddString
void MsgAddString(MsgBundle *mb, int n, const char *s) const
Output string aka symbol (to appointed outlet)
Definition: flclass.h:346
flext_base::AddMethodDef
void AddMethodDef(int inlet, const t_symbol *tag=NULL)
Definition: flclass.h:416
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, t_symptr &), bool(*set)(flext_base *, t_symptr &))
Definition: flclass.h:635
flext_base::metharg
metharg
Definition: flclass.h:401
flext_base::MsgAddDouble
void MsgAddDouble(MsgBundle *mb, int n, double d) const
Output double (index n starts with 0)
Definition: flclass.h:341
TablePtrMap
Definition: flmap.h:190
flext_base::AddInFloat
void AddInFloat(const char *desc, int m=1)
Add inlet(s) for floats (with description)
Definition: flclass.h:124
flext_base::AddInBang
void AddInBang(int m=1)
Add inlet(s) for bang.
Definition: flclass.h:134
flext_base::MsgSelfString
void MsgSelfString(MsgBundle *mb, int n, const char *s) const
Send string aka symbol to self (inlet 0)
Definition: flclass.h:379
flext_base::thisTag
static const t_symbol * thisTag()
Retrieve currently processed message tag (NULL if no message processing)
Definition: flclass.h:187
flext_base::xlet_sym
Definition: flclass.h:588
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, float &), bool(*set)(flext_base *, float &))
Definition: flclass.h:631
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, t_symptr &), bool(*set)(flext_base *, t_symptr &))
Definition: flclass.h:642
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, bool &), bool(*set)(flext_base *, bool &))
Definition: flclass.h:640
flext_base::AddInBang
void AddInBang(const char *desc, int m=1)
Add inlet(s) for bangs (with description)
Definition: flclass.h:136
flext_base::AttrData
Represent a data value of an attribute.
Definition: flclass.h:827
flext_base::Bind
bool Bind(const char *sym)
Bind object to a symbol (as string)
Definition: flclass.h:525
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, float &, float &))
Definition: flclass.h:481
flext_base::ItemCont::Max
int Max() const
Definition: flclass.h:753
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, AtomList *&), bool(*set)(flext_base *, AtomList *&))
Definition: flclass.h:615
flext_base::MsgSelfAnything
void MsgSelfAnything(MsgBundle *mb, int n, const t_symbol *s, int argc, const t_atom *argv) const
Send anything to self (inlet n)
Definition: flclass.h:390
flext_base::xlet::desc
char * desc
Definition: flclass.h:921
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, AtomAnything *&), bool(*set)(flext_base *, AtomAnything *&))
Definition: flclass.h:623
flext_base::ItemCont::Contained
bool Contained(int i) const
Definition: flclass.h:755
flext_base::Item::IsAttr
bool IsAttr() const
Definition: flclass.h:727
flext_base::ToOutAnything
void ToOutAnything(int n, const t_symbol *s, const AtomList &list) const
Output anything (index n starts with 0)
Definition: flclass.h:237
flext_base::AttrItem::Counterpart
AttrItem * Counterpart()
Definition: flclass.h:816
flext_base::AttrData::GetInitValue
const AtomList & GetInitValue() const
Definition: flclass.h:842
flext_base::a_symbol
Definition: flclass.h:404
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, const t_symbol *&), bool(*set)(flext_base *, const t_symbol *&))
Definition: flclass.h:620
flext_base::AttrItem::tag
const t_symbol * tag
Definition: flclass.h:823
flext_base::ListAttrib
bool ListAttrib() const
List attributes.
Definition: flattr.cpp:195
flext_base::ThMeths
ItemCont * ThMeths()
Definition: flclass.h:895
FLEXT_TEMPINST
#define FLEXT_TEMPINST(fun)
Definition: flprefix.h:457
flext_base::AttrItem::IsGet
bool IsGet() const
Definition: flclass.h:812
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, const t_symbol *&))
Definition: flclass.h:479
flext_base::AddAttrib
void AddAttrib(const t_symbol *attr, bool(*get)(flext_base *, const t_symbol *&), bool(*set)(flext_base *, const t_symbol *&))
Definition: flclass.h:613
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, float &), bool(*set)(flext_base *, float &))
Definition: flclass.h:638
flext_base::methhead
ItemCont * methhead
Definition: flclass.h:956
flext_base::ItemSet
Definition: flclass.h:735
FLEXT_TEMPLATE
#define FLEXT_TEMPLATE
Definition: flprefix.h:455
flext_base::ToOutDouble
void ToOutDouble(int n, double d) const
Output double (index n starts with 0)
Definition: flclass.h:217
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, t_symbol *&))
Definition: flclass.h:426
flext_base::MsgAddBool
void MsgAddBool(MsgBundle *mb, int n, bool f) const
Output boolean (index n starts with 0)
Definition: flclass.h:338
flext_base::xlet::tp
xlettype tp
Definition: flclass.h:920
flext_base::attrdata
AttrDataCont * attrdata
Definition: flclass.h:966
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *))
Definition: flclass.h:475
flext_base::UnbindMethod
bool UnbindMethod(const char *sym, bool(*meth)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)=NULL, void **data=NULL)
Unbind a method from a symbol (as string)
Definition: flclass.h:554
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, const t_symbol *, int, const t_atom *))
Definition: flclass.h:449
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, t_symbol *&))
Definition: flclass.h:494
flext_base::AddOutBang
void AddOutBang(const char *desc, int m=1)
Add outlet(s) for bangs (with description)
Definition: flclass.h:161
flext_base::pxbnd_object
Definition: flclass.h:1083
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *))
Definition: flclass.h:474
flext_hdr
The obligatory PD or Max/MSP object header.
Definition: flbase.h:38
flext_base::ToSelfInt
void ToSelfInt(int n, int f) const
Send integer to self (inlet n)
Definition: flclass.h:292
flext_base::qustarted
static bool qustarted
Definition: flclass.h:995
flext_base::px_object::obj
t_object obj
Definition: flclass.h:1027
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, const t_symbol *&))
Definition: flclass.h:443
flext_base::CntOutSig
int CntOutSig() const
Get number of signal outlets.
Definition: flclass.h:183
flext_base::AttrData::SetSave
void SetSave(bool s)
Definition: flclass.h:835
flext_base::BindItem
This represents an item of the symbol-bound method list.
Definition: flclass.h:882
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, int, t_atom *))
Definition: flclass.h:438
flpushns.h
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, float &, float &, float &))
Definition: flclass.h:482
flext_base::px_object::index
int index
Definition: flclass.h:1029
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, float &))
Definition: flclass.h:452
flext_base::AddOutInt
void AddOutInt(const char *desc, int m=1)
Add outlet(s) for integers (with description)
Definition: flclass.h:153
flpopns.h
flext_base::AttrData::AttrData
AttrData()
Definition: flclass.h:831
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, t_symptr &), bool(*set)(flext_base *, t_symptr &))
Definition: flclass.h:621
flext_base::GetBoundMethod
bool GetBoundMethod(const char *sym, bool(*meth)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data), void *&data)
Get data of bound method of a symbol (as string)
Definition: flclass.h:556
flext_base::ToSelfList
void ToSelfList(int n, int argc, const t_atom *argv) const
Send list to self (inlet n)
Definition: flclass.h:309
flext_base::ToSelfFloat
void ToSelfFloat(int n, float f) const
Send float to self (inlet n)
Definition: flclass.h:289
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, float &, float &, float &))
Definition: flclass.h:430
FLEXT_SHARE
#define FLEXT_SHARE
Definition: flprefix.h:418
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, const t_symbol *&))
Definition: flclass.h:451
flext_base::AddOutFloat
void AddOutFloat(const char *desc, int m=1)
Add outlet(s) for floats (with description)
Definition: flclass.h:149
flext_base::px_object::init
void init(flext_base *b, int ix)
Definition: flclass.h:1031
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, float &))
Definition: flclass.h:504
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, const t_symbol *&))
Definition: flclass.h:495
flext_base::AttrItem
This represents an item of the attribute list.
Definition: flclass.h:800
flext_base::AddOutSymbol
void AddOutSymbol(int m=1)
Add outlet(s) for symbols.
Definition: flclass.h:155
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, int &))
Definition: flclass.h:497
flext_base::xlet_LIST
Definition: flclass.h:589
flext_base::px_class
static t_class * px_class
Definition: flclass.h:1023
flext_base::ToQueueBool
void ToQueueBool(int n, bool f) const
Output low priority boolean (index n starts with 0)
Definition: flclass.h:255
flext_base::MsgSelfBool
void MsgSelfBool(MsgBundle *mb, int n, bool f) const
Send boolean to self (inlet n)
Definition: flclass.h:371
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, const t_symbol *&), bool(*set)(flext_base *, const t_symbol *&))
Definition: flclass.h:634
flext_base::DumpAttrib
bool DumpAttrib(const char *attr) const
Dump an attribute to the attribute outlet.
Definition: flclass.h:651
flext_base::AddOutList
void AddOutList(const char *desc, int m=1)
Add outlet(s) for lists (with description)
Definition: flclass.h:165
flext_base::ItemCont::cont
ItemSet ** cont
Definition: flclass.h:780
flext_base::AttrData::flags
int flags
Definition: flclass.h:845
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, float &), bool(*set)(flext_base *, float &))
Definition: flclass.h:617
flext_base::AddInAnything
void AddInAnything(const char *desc, int m=1)
Add inlet(s) for anythings (with description)
Definition: flclass.h:120
flext_base::ItemCont::size
int size
Definition: flclass.h:779
flext_base::MsgSelfAtom
void MsgSelfAtom(MsgBundle *mb, int n, const t_atom &at) const
Output atom (index n starts with 0)
Definition: flclass.h:382
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, int, const t_atom *))
Definition: flclass.h:439
flext_base::thisObject
static flext_base * thisObject(flext_hdr *c)
Definition: flclass.h:910
flext_base::MethItem::index
int index
Definition: flclass.h:793
flext_base::CntInSig
int CntInSig() const
Get number of signal inlets.
Definition: flclass.h:181
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, int, const t_atom *))
Definition: flclass.h:447
flext_base::AttrItem::IsShown
bool IsShown() const
Definition: flclass.h:814
flext_base::ToSysString
void ToSysString(int n, const char *s) const
Definition: flclass.h:861
flext_base::CheckAttrib
static int CheckAttrib(const AtomList &args, int offset=0)
Definition: flclass.h:656
flext_base::AddAttrib
void AddAttrib(const char *attr, bool(*get)(flext_base *, int &), bool(*set)(flext_base *, int &))
Definition: flclass.h:618
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, t_symbol *, int, t_atom *))
Definition: flclass.h:492
flext_base::t_any
Definition: flclass.h:936
FLEXT_CLASSDEF
#define FLEXT_CLASSDEF(CL)
Definition: flprefix.h:383
flext_base::GetOut
outlet * GetOut(int ix) const
Get pointer to outlet (not in the constructor!)
Definition: flclass.h:192
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *))
Definition: flclass.h:423
flext_base::ToQueueDouble
void ToQueueDouble(int n, double d) const
Output double (index n starts with 0)
Definition: flclass.h:258
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const t_symbol *tag, bool(*m)(flext_base *, float &))
Definition: flclass.h:496
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, AtomAnything *&), bool(*set)(flext_base *, AtomAnything *&))
Definition: flclass.h:644
flext_base::attrhead
ItemCont * attrhead
Definition: flclass.h:965
flext_base::pxbnd_object::obj
t_object obj
Definition: flclass.h:1088
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, t_symbol *, int, t_atom *))
Definition: flclass.h:500
flext_base::ToSysList
void ToSysList(int n, const AtomList &list) const
Definition: flclass.h:863
flext_base::AttrItem::argtp
metharg argtp
Definition: flclass.h:820
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, t_symbol *&))
Definition: flclass.h:478
flext_base::ItemCont::Members
int Members() const
Get counter for total members (for index of new item)
Definition: flclass.h:772
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, const t_symbol *&))
Definition: flclass.h:503
flext_base::AttrData::SetInit
void SetInit(bool s)
Definition: flclass.h:837
flext_base::ToSelfSymbol
void ToSelfSymbol(int n, const t_symbol *s) const
Send symbol to self (inlet n)
Definition: flclass.h:301
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, int, t_atom *))
Definition: flclass.h:420
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, const char *tag, bool(*m)(flext_base *, int, const t_atom *))
Definition: flclass.h:499
flext_base::AttrData::IsSaved
bool IsSaved() const
Definition: flclass.h:836
flext_base::Item::nxt
Item * nxt
Definition: flclass.h:730
flext_base::t_any::bt
bool bt
Definition: flclass.h:939
flext_base::AddOutSymbol
void AddOutSymbol(const char *desc, int m=1)
Add outlet(s) for symbols (with description)
Definition: flclass.h:157
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, float &))
Definition: flclass.h:480
flext_base::AddMethod
void AddMethod(int inlet, const char *tag, bool(*m)(flext_base *, int &))
Definition: flclass.h:453
flext_base::MsgSelfBang
void MsgSelfBang(MsgBundle *mb, int n) const
Definition: flclass.h:362
flext_base::AddMethodDef
void AddMethodDef(int inlet, const char *tag=NULL)
Definition: flclass.h:417
flext_base::AddMethod
static void AddMethod(t_classid c, int inlet, bool(*m)(flext_base *, int, t_atom *))
Definition: flclass.h:472
flext_base::a_list
Definition: flclass.h:405
flext_base::a_int
Definition: flclass.h:403
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, const t_symbol *, int, const t_atom *))
Definition: flclass.h:441
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, int &))
Definition: flclass.h:445
flext_base::AddAttrib
static void AddAttrib(t_classid c, const t_symbol *attr, bool(*get)(flext_base *, AtomAnything *&), bool(*set)(flext_base *, AtomAnything *&))
Definition: flclass.h:637
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, float &, float &))
Definition: flclass.h:429
flext_base::Item::attr
AttrItem * attr
Definition: flclass.h:729
flext_base::ToSysDouble
void ToSysDouble(int n, double d) const
Definition: flclass.h:870
flext_base::ToSelfString
void ToSelfString(int n, const char *s) const
Send string aka symbol to self (inlet 0)
Definition: flclass.h:303
flext_base::t_any::it
int it
Definition: flclass.h:938
flext_base::MsgSelfSymbol
void MsgSelfSymbol(MsgBundle *mb, int n, const t_symbol *s) const
Send symbol to self (inlet n)
Definition: flclass.h:377
flmap.h
special map class (faster and less memory-consuming than std::map)
flext_base::AddOutFloat
void AddOutFloat(int m=1)
Add outlet(s) for floats.
Definition: flclass.h:147
flext_base::pxbnd_object::init
void init(flext_base *b, BindItem *it, void *d)
Definition: flclass.h:1093
flext_base::AddMethod
void AddMethod(int inlet, const t_symbol *tag, bool(*m)(flext_base *, t_symbol *&))
Definition: flclass.h:442
flext_base::ToOutBool
void ToOutBool(int n, bool f) const
Output boolean (index n starts with 0)
Definition: flclass.h:214
flext_base::BangAttrib
bool BangAttrib(const char *a)
Definition: flclass.h:672
flext_base::AddOutAnything
void AddOutAnything(int m=1)
Add outlet(s) for anythings.
Definition: flclass.h:143
flext_base::ToSysBool
void ToSysBool(int n, bool f) const
Definition: flclass.h:868
flext_base::BindMethod
bool BindMethod(const char *sym, bool(*meth)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data), void *data=NULL)
Bind a method to a symbol (as string)
Definition: flclass.h:552
flext_base::cb_ListAttrib
static bool cb_ListAttrib(flext_base *c)
Definition: flclass.h:982
flext_base::ToSelfAnything
void ToSelfAnything(int n, const t_symbol *s, int argc, const t_atom *argv) const
Send anything to self (inlet n)
Definition: flclass.h:314
flext_base::MsgSelfFloat
void MsgSelfFloat(MsgBundle *mb, int n, float f) const
Send float to self (inlet n)
Definition: flclass.h:365
flext_base::ToQueueString
void ToQueueString(int n, const char *s) const
Output low priority string aka symbol (to appointed outlet)
Definition: flclass.h:263
flext_base::AddOutBang
void AddOutBang(int m=1)
Add outlet(s) for bangs.
Definition: flclass.h:159
flext_base::AddAttrib
static void AddAttrib(t_classid c, const char *attr, bool(*get)(flext_base *, int &), bool(*set)(flext_base *, int &))
Definition: flclass.h:639
flext_base::AddOutAnything
void AddOutAnything(const char *desc, int m=1)
Add outlet(s) for anythings (with description)
Definition: flclass.h:145
flext_base::AddMethod
void AddMethod(int inlet, bool(*m)(flext_base *, const t_symbol *&))
Definition: flclass.h:427
flext_base::ToSysSymbol
void ToSysSymbol(int n, const t_symbol *s) const
Definition: flclass.h:860
flinternal.h
Definitions for internal flext usage.
flext_base::px_object
Definition: flclass.h:1025
flext_base::AttrItem::index
int index
Definition: flclass.h:818
flext_base::ItemCont::members
int members
Definition: flclass.h:778
flext_base::SetAttrib
bool SetAttrib(const t_symbol *tag, AttrItem *a, const AtomList &l)
Definition: flclass.h:975