flext  0.6.0
Functions
Methods for binding a flext class to a symbol

Functions

bool flext_base::Bind (const t_symbol *sym)
 Bind object to a symbol. More...
 
bool flext_base::Unbind (const t_symbol *sym)
 Unbind object from a symbol. More...
 
bool flext_base::Bind (const char *sym)
 Bind object to a symbol (as string) More...
 
bool flext_base::Unbind (const char *sym)
 Unbind object from a symbol (as string) More...
 
bool flext_base::BindMethod (const t_symbol *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. More...
 
bool flext_base::UnbindMethod (const t_symbol *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. More...
 
bool flext_base::GetBoundMethod (const t_symbol *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. More...
 
bool flext_base::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) More...
 
bool flext_base::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) More...
 
bool flext_base::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) More...
 
bool flext_base::UnbindAll ()
 

Detailed Description

Function Documentation

◆ Bind() [1/2]

bool flext_base::Bind ( const char *  sym)
inline

Bind object to a symbol (as string)

◆ Bind() [2/2]

bool flext_base::Bind ( const t_symbol *  sym)

Bind object to a symbol.

◆ BindMethod() [1/2]

bool flext_base::BindMethod ( const char *  sym,
bool(*)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)  meth,
void *  data = NULL 
)
inline

Bind a method to a symbol (as string)

◆ BindMethod() [2/2]

bool flext_base::BindMethod ( const t_symbol *  sym,
bool(*)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)  meth,
void *  data = NULL 
)

Bind a method to a symbol.

Parameters
symSymbol to bind to
methFunction to bind
dataUser data that is passed to the function
Returns
true on success

◆ GetBoundMethod() [1/2]

bool flext_base::GetBoundMethod ( const char *  sym,
bool(*)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)  meth,
void *&  data 
)
inline

Get data of bound method of a symbol (as string)

◆ GetBoundMethod() [2/2]

bool flext_base::GetBoundMethod ( const t_symbol *  sym,
bool(*)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)  meth,
void *&  data 
)

Get data of bound method of a symbol.

Parameters
symSymbol to bind to
methFunction to bind
dataReference to returned user data
Returns
true on success (symbol/method combination was found)

◆ Unbind() [1/2]

bool flext_base::Unbind ( const char *  sym)
inline

Unbind object from a symbol (as string)

◆ Unbind() [2/2]

bool flext_base::Unbind ( const t_symbol *  sym)

Unbind object from a symbol.

◆ UnbindAll()

bool flext_base::UnbindAll ( )

Unbind all symbol bindings

Note
Memory associated to data pointers passed by BindMethod will not be freed!

◆ UnbindMethod() [1/2]

bool flext_base::UnbindMethod ( const char *  sym,
bool(*)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)  meth = NULL,
void **  data = NULL 
)
inline

Unbind a method from a symbol (as string)

◆ UnbindMethod() [2/2]

bool flext_base::UnbindMethod ( const t_symbol *  sym,
bool(*)(flext_base *obj, t_symbol *sym, int argc, t_atom *argv, void *data)  meth = NULL,
void **  data = NULL 
)

Unbind a method from a symbol.

Parameters
symSymbol to unbind from (if NULL... unbind all functions)
methMethod to unbind (if NULL ... unbind all functions bound to symbol)
datareturns data pointer specified with BindMethod
Returns
true on success