Max API
8.0.2
|
Functions | |
t_max_err | class_copy (t_symbol *src_name_space, t_symbol *src_classname, t_symbol *dst_name_space, t_symbol *dst_classname) |
Duplicates a previously registered object class, and registers a copy of this class. More... | |
void * | jit_class_new (C74_CONST char *name, method mnew, method mfree, long size,...) |
Creates a new class with the name specified by the name argument. More... | |
t_jit_err | jit_class_addmethod (void *c, method m, const char *name,...) |
Adds a named method to a class. More... | |
t_jit_err | jit_class_addattr (void *c, t_jit_object *attr) |
Adds an attribute to a class. More... | |
t_jit_err | jit_class_addadornment (void *c, t_jit_object *o) |
Adds an adornment to a class. More... | |
t_jit_err | jit_class_addinterface (void *c, void *interfaceclass, long byteoffset, long flags) |
Adds an interface to a class. More... | |
void * | jit_class_adornment_get (void *c, t_symbol *classname) |
Retrieves an adornment from a class. More... | |
t_jit_err | jit_class_free (void *c) |
Frees a class. More... | |
t_symbol * | jit_class_nameget (void *c) |
Retrieves the name of a class. More... | |
long | jit_class_symcompare (void *c, t_symbol *name) |
Compares name of class with the name provided. More... | |
t_jit_err | jit_class_register (void *c) |
Registers class in the class registry. More... | |
method | jit_class_method (void *c, t_symbol *methodname) |
Retrieves method function pointer for named method. More... | |
t_messlist * | jit_class_mess (t_jit_class *c, t_symbol *methodname) |
Retrieves messlist entry for named method. More... | |
void * | jit_class_attr_get (void *c, t_symbol *attrname) |
Retrieves attribute pointer associated with name provided. More... | |
void * | jit_class_findbyname (t_symbol *classname) |
Retrieves class pointer associated with name provided. More... | |
t_jit_err | jit_class_addtypedwrapper (void *c, method m, char *name,...) |
Adds a typed wrapper method to a class. More... | |
t_messlist * | jit_class_typedwrapper_get (void *c, t_symbol *s) |
Retrieves typed wrapper messlist pointer associated with name provided. More... | |
t_jit_err | jit_class_method_addargsafe (void *c, char *argname, char *methodname) |
Marks a method as safe to call as an attribute style argument. More... | |
t_symbol * | jit_class_method_argsafe_get (void *c, t_symbol *s) |
Checks to see if symbol is safe to call as an attribute style argument. More... | |
t_max_err class_copy | ( | t_symbol * | src_name_space, |
t_symbol * | src_classname, | ||
t_symbol * | dst_name_space, | ||
t_symbol * | dst_classname | ||
) |
Duplicates a previously registered object class, and registers a copy of this class.
src_name_space | The source class's name space. |
src_classname | The source class's class name. |
dst_name_space | The copied class's name space. |
dst_classname | The copied class's class name. |
MAX_ERR_NONE
if successful, or one of the other error codes defined in "ext_obex.h" if unsuccessful. t_jit_err jit_class_addadornment | ( | void * | c, |
t_jit_object * | o | ||
) |
Adds an adornment to a class.
Adornments provide additional state and behavior to a class. This is most commonly used for the jit_mop adornment.
c | class pointer |
o | object to use as adornment |
References jit_err_from_max_err().
t_jit_err jit_class_addattr | ( | void * | c, |
t_jit_object * | attr | ||
) |
Adds an attribute to a class.
c | class pointer |
attr | attribute object |
References class_addattr(), and jit_err_from_max_err().
t_jit_err jit_class_addinterface | ( | void * | c, |
void * | interfaceclass, | ||
long | byteoffset, | ||
long | flags | ||
) |
Adds an interface to a class.
Automatically expose methods and attributes of an interface class to a classes. Can also be used for class containers or subclassing behavior. If method or attribute is present in interface class prior to this call, the inteface class' method or attribute will not be added. Use a nonzero byteoffset to contained class' object pointer in struct for container class. Use byte offset of zero for interface or subclassing behavior.
c | class pointer |
interfaceclass | interface class pointer |
byteoffset | byte offset (if for a contained object) |
flags | reserved for future use |
References gensym(), hashtab_funall(), hashtab_new(), and hashtab_store().
t_jit_err jit_class_addmethod | ( | void * | c, |
method | m, | ||
const char * | name, | ||
... | |||
) |
Adds a named method to a class.
c | class pointer |
m | function called when method is invoked |
name | method name |
... | type signature for the method in the standard Max type list format (see Chapter 3 of the Writing Externals in Max document for more information) |
References class_addmethod(), and jit_err_from_max_err().
t_jit_err jit_class_addtypedwrapper | ( | void * | c, |
method | m, | ||
char * | name, | ||
... | |||
) |
Adds a typed wrapper method to a class.
Typed wrappers typically are used when there is an existing private, untyped method defined for a Jitter class, but it is desirable to expose the method to language bindings which require a typed interface–e.g. Java or JavaScript.
c | class pointer |
m | function called when method is invoked |
name | method name |
... | type signature for the method in the standard Max type list format (see Chapter 3 of the Writing Externals in Max document for more information) |
References jit_err_from_max_err().
void* jit_class_adornment_get | ( | void * | c, |
t_symbol * | classname | ||
) |
Retrieves an adornment from a class.
Adornments provide additional state and behavior to a class. This is most commonly used for the jit_mop adornment.
c | class pointer |
classname | classname of adornment to retrieve |
Referenced by max_jit_classex_mop_mproc(), max_jit_classex_mop_wrap(), and max_jit_mop_setup().
void* jit_class_attr_get | ( | void * | c, |
t_symbol * | attrname | ||
) |
Retrieves attribute pointer associated with name provided.
c | class pointer |
attrname | attribute name |
void* jit_class_findbyname | ( | t_symbol * | classname | ) |
Retrieves class pointer associated with name provided.
classname | class name |
References class_findbyname().
t_jit_err jit_class_free | ( | void * | c | ) |
Frees a class.
c | class pointer |
References class_free(), and jit_err_from_max_err().
t_messlist* jit_class_mess | ( | t_jit_class * | c, |
t_symbol * | methodname | ||
) |
Retrieves messlist entry for named method.
c | class pointer |
methodname | method name |
Retrieves method function pointer for named method.
c | class pointer |
methodname | method name |
t_jit_err jit_class_method_addargsafe | ( | void * | c, |
char * | argname, | ||
char * | methodname | ||
) |
Marks a method as safe to call as an attribute style argument.
c | class pointer |
argname | name as used via argument |
methodname | name of method to map the argument name to |
References gensym(), and jit_err_from_max_err().
Checks to see if symbol is safe to call as an attribute style argument.
c | class pointer |
s | name as used via argument |
References gensym().
Referenced by jit_object_method_argsafe_get().
t_symbol* jit_class_nameget | ( | void * | c | ) |
Retrieves the name of a class.
c | class pointer |
References class_nameget().
Referenced by jit_class_symcompare().
Creates a new class with the name specified by the name argument.
name | class name |
mnew | class constructor |
mfree | class destructor |
size | object struct size in bytes |
... | type signature for the constructor in the standard Max type list format (see Chapter 3 of the Writing Externals in Max document for more information) |
References A_CANT, A_GIMME, class_addmethod(), class_new(), jit_object_exportattrs(), and jit_object_importattrs().
t_jit_err jit_class_register | ( | void * | c | ) |
Registers class in the class registry.
c | class pointer |
References class_register(), and jit_err_from_max_err().
long jit_class_symcompare | ( | void * | c, |
t_symbol * | name | ||
) |
Compares name of class with the name provided.
c | class pointer |
name | name to compare with class name |
References jit_class_nameget().
t_messlist* jit_class_typedwrapper_get | ( | void * | c, |
t_symbol * | s | ||
) |
Retrieves typed wrapper messlist pointer associated with name provided.
c | class pointer |
s | name |