Max API  8.0.2
Object Module

Functions

long jit_object_classname_compare (void *x, t_symbol *name)
 Compares object's class name with the name provided. More...
 
t_symboljit_object_method_argsafe_get (void *x, t_symbol *s)
 Checks to see if symbol is safe to call as an attribute style argument. More...
 
void * jit_object_new_imp (void *cn, void *p1, void *p2, void *p3, void *p4, void *p5, void *p6, void *p7, void *p8, void *dummy)
 Instantiates an object specified by class name. More...
 
void * jit_object_method_imp (void *x, void *s, void *p1, void *p2, void *p3, void *p4, void *p5, void *p6, void *p7, void *p8)
 Calls an object method specified by method name. More...
 
void * jit_object_method_typed (void *x, t_symbol *s, long ac, t_atom *av, t_atom *rv)
 Calls a typed object method specified by method name. More...
 
method jit_object_getmethod (void *x, t_symbol *s)
 Retrieves an object method specified by method name. More...
 
long jit_object_attr_usercanset (void *x, t_symbol *s)
 Determines if an object attribute is user settable. More...
 
long jit_object_attr_usercanget (void *x, t_symbol *s)
 Determines if an object attribute is user gettable. More...
 
void * jit_object_attr_get (void *x, t_symbol *attrname)
 Retrieves an object's attribute pointer specified by attribute name. More...
 
t_jit_err jit_object_free (void *x)
 Frees an object. More...
 
t_symboljit_object_classname (void *x)
 Retrieves an object's class name. More...
 
void * jit_object_class (void *x)
 Retrieves an object's class pointer. More...
 
void * jit_object_register (void *x, t_symbol *s)
 Registers an object in the named object registry. More...
 
t_jit_err jit_object_unregister (void *x)
 Unregisters an object from the named object registry. More...
 
void * jit_object_findregistered (t_symbol *s)
 Retrieves a registered object associated with name. More...
 
t_symboljit_object_findregisteredbyptr (void *x)
 Retrieves a registered object's name. More...
 
void * jit_object_attach (t_symbol *s, void *x)
 Attaches an object as a client of a named server object for notification. More...
 
t_jit_err jit_object_detach (t_symbol *s, void *x)
 Detaches a client object from a named server object. More...
 
t_jit_err jit_object_notify (void *x, t_symbol *s, void *data)
 Notifies all client objects for a named server object. More...
 
t_jit_err jit_object_importattrs (void *x, t_symbol *s, long argc, t_atom *argv)
 Imports object attributes from an XML file. More...
 
t_jit_err jit_object_exportattrs (void *x, t_symbol *s, long argc, t_atom *argv)
 Exports object attributes to an XML file. More...
 
t_jit_err jit_object_exportsummary (void *x, t_symbol *s, long argc, t_atom *argv)
 Exports object summary to an XML file. More...
 

Detailed Description

Function Documentation

◆ jit_object_attach()

void* jit_object_attach ( t_symbol s,
void *  x 
)

Attaches an object as a client of a named server object for notification.

Parameters
sname of server object
xclient object pointer
Returns
If successful, server object pointer. Otherwise NULL.

References object_attach().

Referenced by max_jit_mop_inputs(), max_jit_mop_notify(), and max_jit_mop_outputs().

◆ jit_object_attr_get()

void* jit_object_attr_get ( void *  x,
t_symbol attrname 
)

Retrieves an object's attribute pointer specified by attribute name.

Parameters
xobject pointer
attrnameattribute name
Returns
attribute object pointer

References object_attr_get().

◆ jit_object_attr_usercanget()

long jit_object_attr_usercanget ( void *  x,
t_symbol s 
)

Determines if an object attribute is user gettable.

Parameters
xobject pointer
sattribute name
Returns
1 if gettable, 0 if not gettable

References object_attr_usercanget().

◆ jit_object_attr_usercanset()

long jit_object_attr_usercanset ( void *  x,
t_symbol s 
)

Determines if an object attribute is user settable.

Parameters
xobject pointer
sattribute name
Returns
1 if settable, 0 if not settable

References object_attr_usercanset().

Referenced by max_jit_attr_args().

◆ jit_object_class()

void* jit_object_class ( void *  x)

Retrieves an object's class pointer.

Parameters
xobject pointer
Returns
class pointer

References object_class().

Referenced by jit_object_method_argsafe_get(), and max_jit_mop_setup().

◆ jit_object_classname()

t_symbol* jit_object_classname ( void *  x)

Retrieves an object's class name.

Parameters
xobject pointer
Returns
class name t_symbol pointer

References object_classname().

Referenced by jit_object_classname_compare(), and jit_object_exportattrs().

◆ jit_object_classname_compare()

long jit_object_classname_compare ( void *  x,
t_symbol name 
)

Compares object's class name with the name provided.

Parameters
xobject pointer
namename to compare with class name
Returns
1 if equal, 0 if not equal

References jit_object_classname().

Referenced by max_jit_obex_adornment_get().

◆ jit_object_detach()

t_jit_err jit_object_detach ( t_symbol s,
void *  x 
)

Detaches a client object from a named server object.

Parameters
sname of server object
xclient object pointer
Returns
t_jit_err error code

References jit_err_from_max_err(), and object_detach().

Referenced by max_jit_mop_free().

◆ jit_object_exportattrs()

t_jit_err jit_object_exportattrs ( void *  x,
t_symbol s,
long  argc,
t_atom argv 
)

Exports object attributes to an XML file.

Parameters
xobject pointer
signored
argcargument count
argvargument vector
Returns
t_jit_err error code

References _jit_sym_getname, freebytes(), gensym(), jit_atom_setsym(), jit_object_classname(), jit_object_free(), object_attr_get(), t_symbol::s_name, and symbolarray_sort().

Referenced by jit_class_new(), and max_jit_classex_standard_wrap().

◆ jit_object_exportsummary()

t_jit_err jit_object_exportsummary ( void *  x,
t_symbol s,
long  argc,
t_atom argv 
)

Exports object summary to an XML file.

Warning
Currently this function does nothing, but is reserved for future use.
Parameters
xobject pointer
signored
argcargument count
argvargument vector
Returns
t_jit_err error code

Referenced by max_jit_classex_standard_wrap().

◆ jit_object_findregistered()

void * jit_object_findregistered ( t_symbol s)

Retrieves a registered object associated with name.

Parameters
sregistered name
Returns
If successful, object pointer. Otherwise NULL.

Referenced by jit_matrix_jit_gl_texture(), jit_matrix_op(), max_jit_mop_jit_matrix(), and max_jit_mop_notify().

◆ jit_object_findregisteredbyptr()

t_symbol* jit_object_findregisteredbyptr ( void *  x)

Retrieves a registered object's name.

Parameters
xobject pointer
Returns
If successful, t_symbol pointer name. Otherwise NULL.

References object_findregisteredbyptr().

◆ jit_object_free()

◆ jit_object_getmethod()

method jit_object_getmethod ( void *  x,
t_symbol s 
)

Retrieves an object method specified by method name.

Parameters
xobject pointer
smethod name
Returns
method

References object_getmethod().

Referenced by jit_attr_filterget(), and jit_attr_filterset().

◆ jit_object_importattrs()

t_jit_err jit_object_importattrs ( void *  x,
t_symbol s,
long  argc,
t_atom argv 
)

Imports object attributes from an XML file.

Parameters
xobject pointer
signored
argcargument count
argvargument vector
Returns
t_jit_err error code

References _jit_sym_name, freebytes(), gensym(), jit_linklist_chuck(), jit_linklist_getindex(), jit_linklist_getsize(), jit_object_free(), and object_attr_setvalueof().

Referenced by jit_class_new(), and max_jit_classex_standard_wrap().

◆ jit_object_method_argsafe_get()

t_symbol* jit_object_method_argsafe_get ( void *  x,
t_symbol s 
)

Checks to see if symbol is safe to call as an attribute style argument.

Parameters
xobject pointer
sname as used via argument
Returns
If successful, name of method to map the argument name to. Otherwise, NULL.

References jit_class_method_argsafe_get(), and jit_object_class().

Referenced by max_jit_attr_args().

◆ jit_object_method_imp()

void* jit_object_method_imp ( void *  x,
void *  s,
void *  p1,
void *  p2,
void *  p3,
void *  p4,
void *  p5,
void *  p6,
void *  p7,
void *  p8 
)

Calls an object method specified by method name.

This operation is untyped, and the contents of the stack following the method name argument are blindly passed to the method called.

Parameters
xobject pointer
smethod name
p1untyped arguments passed on to the method
p2untyped arguments passed on to the method
p3untyped arguments passed on to the method
p4untyped arguments passed on to the method
p5untyped arguments passed on to the method
p6untyped arguments passed on to the method
p7untyped arguments passed on to the method
p8untyped arguments passed on to the method
Warning
It is important to know any necessary arguments for untyped constructors such as those used by jit_matrix or jit_attr_offset.
Returns
method dependent, but uses void * as a super type.

◆ jit_object_method_typed()

void* jit_object_method_typed ( void *  x,
t_symbol s,
long  ac,
t_atom av,
t_atom rv 
)

Calls a typed object method specified by method name.

This operation only supports methods which are typed–i.e. it cannot be used to call private, untyped A_CANT methods.

Parameters
xobject pointer
smethod name
acargument count
avargument vector
rvreturn value for A_GIMMEBACK methods
Returns
method dependent, but uses void * as a super type.

References object_method_typed().

◆ jit_object_new_imp()

void* jit_object_new_imp ( void *  cn,
void *  p1,
void *  p2,
void *  p3,
void *  p4,
void *  p5,
void *  p6,
void *  p7,
void *  p8,
void *  dummy 
)

Instantiates an object specified by class name.

This function may used to create instances of any Jitter object.

Parameters
cnclass name
p1untyped arguments passed on to the constructor
p2untyped arguments passed on to the constructor
p3untyped arguments passed on to the constructor
p4untyped arguments passed on to the constructor
p5untyped arguments passed on to the constructor
p6untyped arguments passed on to the constructor
p7untyped arguments passed on to the constructor
p8untyped arguments passed on to the constructor
dummyunused
Warning
It is important to know any necessary arguments for untyped constructors such as those used by jit_matrix or jit_attr_offset.
Returns
If successful, a valid object pointer. Otherwise, NULL.

◆ jit_object_notify()

t_jit_err jit_object_notify ( void *  x,
t_symbol s,
void *  data 
)

Notifies all client objects for a named server object.

Parameters
xserver object pointer
snotification message
datamessage specific data
Returns
t_jit_err error code

References object_notify().

Referenced by jit_matrix_setinfo(), and jit_matrix_setinfo_ex().

◆ jit_object_register()

void* jit_object_register ( void *  x,
t_symbol s 
)

Registers an object in the named object registry.

Parameters
xobject pointer
sobject name
Returns
object pointer
Warning
It is important to use the object pointer returned by jit_object_register, since if there is an existing object with the same name and class, it could free the input object and pass back a reference to the previously defined object.

References object_register().

Referenced by max_jit_mop_inputs(), max_jit_mop_notify(), and max_jit_mop_outputs().

◆ jit_object_unregister()

t_jit_err jit_object_unregister ( void *  x)

Unregisters an object from the named object registry.

Parameters
xobject pointer
Returns
t_jit_err error code

References jit_err_from_max_err(), and object_unregister().