aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flclass.h
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-05-13 02:34:30 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-05-13 02:34:30 +0000
commitc275b9ecc894ad21159f10873c39bb0195f01eb8 (patch)
tree286970cca5fd58ef067fb8b4d1239d52c2778b58 /externals/grill/flext/source/flclass.h
parent9c0e19a3be2288db79e2502e5fa450c3e20a668d (diff)
""
svn path=/trunk/; revision=615
Diffstat (limited to 'externals/grill/flext/source/flclass.h')
-rw-r--r--externals/grill/flext/source/flclass.h51
1 files changed, 31 insertions, 20 deletions
diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h
index 676cb4a9..4fa4f614 100644
--- a/externals/grill/flext/source/flclass.h
+++ b/externals/grill/flext/source/flclass.h
@@ -391,37 +391,48 @@ public:
#if FLEXT_SYS == FLEXT_SYS_PD
//! Bind object to a symbol
- bool Bind(const t_symbol *s) { pd_bind(&thisHdr()->ob_pd,const_cast<t_symbol *>(s)); return true; }
+ bool Bind(const t_symbol *sym);
//! Unbind object from a symbol
- bool Unbind(const t_symbol *s) { pd_unbind(&thisHdr()->ob_pd,const_cast<t_symbol *>(s)); return true; }
-#elif FLEXT_SYS == FLEXT_SYS_MAX
- //! Bind object to a symbol
- bool Bind(const t_symbol *s) { if(s->s_thing) return false; else { const_cast<t_symbol *>(s)->s_thing = (t_object *)thisHdr(); return true; } }
- //! Unbind object from a symbol
- bool Unbind(const t_symbol *s) { if(s->s_thing != (t_object *)thisHdr()) return false; else { const_cast<t_symbol *>(s)->s_thing = NULL; return true; } }
+ bool Unbind(const t_symbol *sym);
#endif
#if FLEXT_SYS == FLEXT_SYS_JMAX
//! Bind object to a symbol (as string)
- bool Bind(const char *c); // ** TODO **
+ bool Bind(const char *sym); // ** TODO **
//! Unbind object from a symbol (as string)
- bool Unbind(const char *c); // ** TODO **
+ bool Unbind(const char *sym); // ** TODO **
#else
//! Bind object to a symbol (as string)
- bool Bind(const char *c) { return Bind(MakeSymbol(c)); }
+ bool Bind(const char *sym) { return Bind(MakeSymbol(sym)); }
//! Unbind object from a symbol (as string)
- bool Unbind(const char *c) { return Unbind(MakeSymbol(c)); }
+ bool Unbind(const char *sym) { return Unbind(MakeSymbol(sym)); }
#endif
- //! Bind a method to a symbol
- bool BindMethod(const t_symbol *s,bool (*m)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *data = NULL);
- //! Unbind a method from a symbol
- bool UnbindMethod(const t_symbol *s);
-
- //! Bind a method to a symbol (as string)
- bool BindMethod(const char *c,bool (*m)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *data = NULL) { return BindMethod(MakeSymbol(c),m,data); }
- //! Unbind a method from a symbol (as string)
- bool UnbindMethod(const char *c) { return UnbindMethod(MakeSymbol(c)); }
+ /*! \brief Bind a method to a symbol
+ \param sym Symbol to bind to
+ \param meth Function to bind
+ \param data User data that is passed to the function
+ \return true on success
+ */
+ bool BindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL);
+ /*! \brief Unbind a method from a symbol
+ \param data returns data pointer specified with BindMethod
+ \return true on success
+ */
+ bool UnbindMethod(const t_symbol *sym,void **data = NULL);
+
+ /*! \brief Bind a method to a symbol (as string)
+ \param sym Symbol to bind to
+ \param meth Function to bind
+ \param data User data that is passed to the function
+ \return true on success
+ */
+ 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); }
+ /*! \brief Unbind a method from a symbol (as string)
+ \param data returns data pointer specified with BindMethod
+ \return true on success
+ */
+ bool UnbindMethod(const char *sym,void **data = NULL) { return UnbindMethod(MakeSymbol(sym),data); }
//! @} FLEXT_C_BIND