Max 5 API Reference
00001 #ifndef _JPATCHER_UTILS_H_ 00002 #define _JPATCHER_UTILS_H_ 00003 00004 BEGIN_USING_C_LINKAGE 00005 00006 /** Copy an array of atoms. 00007 @ingroup atom 00008 @param argc1 The count of atoms in argv1. 00009 @param argv1 The address to the first of an array of atoms that is the source for the copy. 00010 @param argv2 The address to the first of an array of atoms that is the destination for the copy. 00011 Note that this array must already by allocated using sysmem_newptr() or atom_alloc(). */ 00012 void atom_copy(short argc1, t_atom *argv1, t_atom *argv2); 00013 00014 /** Print the contents of an array of atoms to the Max window. 00015 @ingroup atom 00016 @param argc The count of atoms in argv. 00017 @param argv The address to the first of an array of atoms. */ 00018 void postargs(short argc, t_atom *argv); 00019 00020 /** Print the contents of a dictionary to the Max window. 00021 @ingroup dictionary 00022 @param d A pointer to a dictionary object. */ 00023 void postdictionary(t_object *d); 00024 00025 00026 /** Return a pointer to an object contained in an atom if it is of the specified class. 00027 @ingroup atom 00028 @param x The address of a pointer to the object contained in av if it is of the specified class upon return. 00029 Otherwise NULL upon return. 00030 @param idx The index of the atom in the array from which to get the object pointer. 00031 @param argc The count of atoms in argv. 00032 @param argv The address to the first of an array of atoms. 00033 @param cls A symbol containing the class name of which the object should be an instance. 00034 @return A Max error code. */ 00035 t_max_err atom_arg_getobjclass(t_object **x, long idx, long argc, t_atom *argv, t_symbol *cls); 00036 00037 /** Return a pointer to an object contained in an atom if it is of the specified class. 00038 @ingroup atom 00039 @param av A pointer to the atom from which to get the #t_object. 00040 @param cls A symbol containing the class name of which the object should be an instance. 00041 @return A pointer to the object contained in av if it is of the specified class, otherwise NULL. */ 00042 void *atom_getobjclass(t_atom *av, t_symbol *cls); 00043 00044 00045 method my_object_getmethod(void *obj, t_symbol *s); 00046 00047 00048 END_USING_C_LINKAGE 00049 00050 #endif // #ifndef _JPATCHER_UTILS_H_
Copyright © 2008, Cycling '74