CicmWrapper  Beta 0.4
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Data Structures | Functions
The BASIC Object Part

The t_eobj part. More...

Data Structures

struct  t_eproxy
 The Proxy object. More...
 
struct  t_eobj
 The default object. More...
 

Functions

void * eobj_new (t_eclass *c)
 The t_eobj creation function. More...
 
void eobj_free (void *x)
 The t_eobj deletion function.
This function should replace pd_free(). More...
 
t_eproxyeobj_proxynew (void *x)
 Adds a proxy inlet to a t_eobj. More...
 
int eobj_getproxy (void *x)
 Retreives the index of the proxy that received the last message. More...
 
t_eclasseobj_getclass (void *x)
 Retrieves the eclass of a t_eobj. More...
 
t_symboleobj_getclassname (void *x)
 Retrieves the classe name of a t_eobj. More...
 
t_canvas * eobj_getcanvas (void *x)
 Retreives the canvas that owns the t_eobj. More...
 
char eobj_isbox (void *x)
 Retreives if a t_eobj is a GUI box or not. More...
 
char eobj_isdsp (void *x)
 Retreives if a t_eobj is a DSP object or not. More...
 
void eobj_attrprocess_viabinbuf (void *x, t_binbuf *d)
 Changes the attributes with a binbuf. More...
 
void eobj_attrprocess_viatoms (void *x, int argc, t_atom *argv)
 Changes the attributes with an array of atoms. More...
 
void eobj_attr_setvalueof (void *x, t_symbol *s, int argc, t_atom *argv)
 Sets the values of an attribute. More...
 
void eobj_attr_getvalueof (void *x, t_symbol *s, int *argc, t_atom **argv)
 Gets the values of an attribute. More...
 

Detailed Description

The t_eobj part.

This part refers to the methods and structures that can be used by all the t_eobj structures.


Data Structure Documentation

struct t_eproxy

The Proxy object.

It contains the proxy class, the eobj owner and the index of the proxy.

Data Fields
t_pd p_pd

The class object.

t_object * p_owner

The pointer to the eobj owner.

t_inlet * p_inlet

The pointer to the inlet.

int p_index

The index of the proxy.

struct t_eobj

The default object.

It contains the Pd object, the canvas pointer and members for proxy inlets. This should be used for no graphical object that don't have signal processing methods.

Data Fields
t_object o_obj

The Pd object.

t_symbol * o_id

The object ID.

t_canvas * o_canvas

The canvas that own the object.

t_eproxy ** o_proxy

The array of proxy inlets.

int o_nproxy

The number of proxy inlets.

int o_current_proxy

The index of the current proxy inlet used

Function Documentation

void* eobj_new ( t_eclass c)

The t_eobj creation function.

Allocates the memory for an intance of a t_eobj of a specific eclass, intialize the defaults values and methods.
This function should replace pd_new().

Parameters
cThe t_eclass pointer.
Returns
This function returns a pointer to a new instance of a t_eobj.
void eobj_free ( void *  x)

The t_eobj deletion function.
This function should replace pd_free().

Detaches the t_eobj from Pure Data and frees the proxy inlets.

Parameters
xThe t_eobj pointer
t_eproxy* eobj_proxynew ( void *  x)

Adds a proxy inlet to a t_eobj.

Allocates and initializes a new proxy inlet.
This function should replace inlet_new().

Parameters
xThe t_eobj pointer.
Returns
This function returns a pointer to the new proxy inlet.
int eobj_getproxy ( void *  x)

Retreives the index of the proxy that received the last message.

Retreives the current proxy index. This function should only be used while a message has been received.

Parameters
xThe t_eobj pointer.
Returns
This function return the index of the current proxy.
t_eclass* eobj_getclass ( void *  x)

Retrieves the eclass of a t_eobj.

Directly access to the eclass structure of the t_eobj.

Parameters
xThe t_eobj pointer.
Returns
This function returns a pointer to the eclass of the t_eobj.
t_symbol* eobj_getclassname ( void *  x)

Retrieves the classe name of a t_eobj.

Directly access to the name of the eclass of the t_eobj.

Parameters
xThe t_eobj pointer.
Returns
This function returns the name of the class of the t_eobj.
t_canvas* eobj_getcanvas ( void *  x)

Retreives the canvas that owns the t_eobj.

Directly access to the canvas structure of the t_eobj.

Parameters
xThe t_eobj pointer.
Returns
This function returns a pointer the canvas that owns the t_eobj.
char eobj_isbox ( void *  x)

Retreives if a t_eobj is a GUI box or not.

Check if the box flag is postive or null.

Parameters
xThe t_eobj pointer.
Returns
This function returns 1 if the t_eobj is a GUI and 0 if not.
char eobj_isdsp ( void *  x)

Retreives if a t_eobj is a DSP object or not.

Check if the dsp method has been initialized.

Parameters
xThe t_eobj pointer.
Returns
This function returns 1 if the t_eobj is a DSP object and 0 if not.
void eobj_attrprocess_viabinbuf ( void *  x,
t_binbuf d 
)

Changes the attributes with a binbuf.

Retrieves and interpretes a binbuf to initialize the attributes.

Parameters
xThe t_ebox pointer.
dThe binbuf pointer.
void eobj_attrprocess_viatoms ( void *  x,
int  argc,
t_atom argv 
)

Changes the attributes with an array of atoms.

Retrieves and interpretes a binbuf to initialize the attributes.

Parameters
xThe t_ebox pointer.
argcThe number of atoms.
argvThe pointer to the atoms.
void eobj_attr_setvalueof ( void *  x,
t_symbol s,
int  argc,
t_atom argv 
)

Sets the values of an attribute.

Retrieves the attribute setter and calls it if it exist otherwise it does nothing.

Parameters
xThe t_eobj pointer.
sThe name of the attribute.
argcThe number of the atoms.
argvThe array of the atoms.
void eobj_attr_getvalueof ( void *  x,
t_symbol s,
int *  argc,
t_atom **  argv 
)

Gets the values of an attribute.

Retrieves the attribute getter and calls it if it exist otherwise it does nothing. You should free the atoms if they has been allocated.

Parameters
xThe t_eobj pointer.
sThe name of the attribute.
argcThe pointer to an int that will be initialize with the number of the atoms.
argvThe pointer to the array of the atoms that will be allocated if the attribute exist.