本文整理汇总了C++中class_register函数的典型用法代码示例。如果您正苦于以下问题:C++ class_register函数的具体用法?C++ class_register怎么用?C++ class_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了class_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: init_uio_class
static int init_uio_class(void)
{
int ret;
/* This is the first time in here, set everything up properly */
ret = uio_major_init();
if (ret)
goto exit;
ret = class_register(&uio_class);
if (ret) {
printk(KERN_ERR "class_register failed for uio\n");
goto err_class_register;
}
return 0;
err_class_register:
uio_major_cleanup();
exit:
return ret;
}
开发者ID:98416,项目名称:Z7Max_NX505J_H129_kernel,代码行数:21,代码来源:uio.c
示例2: main
int main(void) {
resonators_class = class_new("basicresonators~", (method) resonators_new,
(method) resonators_free, (short)sizeof(t_resonators),
0L, A_GIMME, 0);
post("Copyright (c) 1986, 1987-2013 Adrian Freed. All Rights Reserved");
post("Maximum number of resonances: %d", MAXRESONANCES);
class_addmethod(resonators_class, (method)resonators_dsp, "dsp", A_CANT, 0);
class_addmethod(resonators_class, (method)resonators_dsp64, "dsp64", A_CANT, 0);
class_addmethod(resonators_class, (method)resonators_list, "list", A_GIMME, 0);
class_addmethod(resonators_class, (method)resonators_clear, "clear", 0);
class_addmethod(resonators_class, (method)resonators_bang, "bang", 0);
class_addmethod(resonators_class, (method)resonators_float, "float", A_FLOAT, 0);
class_addmethod(resonators_class, (method)resonators_int, "int", A_LONG, 0);
class_addmethod(resonators_class, (method)resonators_assist, "assist", A_CANT, 0);
class_dspinit(resonators_class);
class_register(CLASS_BOX, resonators_class);
return 0;
}
开发者ID:CNMAT,项目名称:CNMAT-Externs,代码行数:21,代码来源:basicresonators~.c
示例3: main
int C74_EXPORT main()
{
this_class = class_new("dynamic.out~",
(method) dynamic_out_new,
(method)dynamic_out_free,
sizeof(t_dynamic_out),
NULL,
A_DEFLONG,
0);
class_addmethod(this_class, (method)dynamic_out_dsp, "dsp", A_CANT, 0);
class_addmethod(this_class, (method)dynamic_out_dsp64, "dsp64", A_CANT, 0);
class_addmethod(this_class, (method)dynamic_out_assist, "assist", A_CANT, 0);
class_addmethod(this_class, (method)dynamic_out_int, "int", A_LONG, 0);
class_dspinit(this_class);
class_register(CLASS_BOX, this_class);
return 0;
}
开发者ID:AlexHarker,项目名称:AHarker_Externals,代码行数:21,代码来源:dynamic.out~.cpp
示例4: init_exm_class
static int init_exm_class(void)
{
int ret;
/* This is the first time in here, set everything up properly */
ret = exm_major_init();
if (ret)
goto exit;
ret = class_register(&exm_class);
if (ret) {
pr_err("class_register failed for exm\n");
goto err_class_register;
}
return 0;
err_class_register:
exm_major_cleanup();
exit:
return ret;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:21,代码来源:exm.c
示例5: init_subt_ttx_ctrl
void init_subt_ttx_ctrl(subt_ttx_ctrl_init_t *p_param)
{
subt_ttx_ctrl_priv_t *p_this = NULL;
RET_CODE ret = SUCCESS;
p_this = mtos_malloc(sizeof(subt_ttx_ctrl_priv_t));
memset(p_this, 0, sizeof(subt_ttx_ctrl_priv_t));
p_this->mutex_lock_mode = p_param->lock_mode;
p_this->enable_ttx_type_subt = p_param->enable_ttx_type_subt;
p_this->subt_ready_cb = p_param->subt_ready_cb;
p_this->ttx_ready_cb = p_param->ttx_ready_cb;
class_register(SUBT_TTX_CTRL_CLASS_ID, (class_handle_t)p_this);
ret = mul_teletext_init(&p_param->ttx_para);
CHECK_FAIL_RET_VOID(ret == SUCCESS);
ret = mul_subtitle_init(&p_param->subt_para);
CHECK_FAIL_RET_VOID(ret == SUCCESS);
}
开发者ID:github188,项目名称:NewCool-UC-3.1.0-priv,代码行数:21,代码来源:subt_ttx_ctrl_api.c
示例6: main
int main (void)
{
t_class *c = class_new(OMAX_DOC_NAME, (method) oudp_new,(method) myobject_free,(short)sizeof(t_oudpreceive),0L,A_GIMME, 0);
class_addmethod(c, (method)oudp_assist, "assist", A_CANT,0);
class_addmethod(c, (method)odot_version, "version", 0);
class_addmethod(c, (method)oudp_doc, "doc", 0);
class_addmethod(c, (method)slipbyte, "int", A_LONG, 0);
class_addmethod(c, (method)sliplist, "list", A_GIMME, 0);
class_addmethod(c, (method)oudp_printcontents, "printcontents", 0);
finder_addclass("Devices","slipOSC");
class_register(CLASS_BOX, c);
oudp_class = c;
ODOT_PRINT_VERSION;
return 0;
}
开发者ID:CNMAT,项目名称:CNMAT-odot,代码行数:21,代码来源:o.udp.receive.c
示例7: main
int C74_EXPORT main(void)
{
t_class *max_class, *jit_class;
jit_realsense_grab_init();
max_class = class_new("jit.realsense.grab", (method)max_jit_realsense_grab_new, (method)max_jit_realsense_grab_free, sizeof(t_max_jit_realsense_grab), NULL, A_GIMME, 0);
max_jit_class_obex_setup(max_class, calcoffset(t_max_jit_realsense_grab, obex));
jit_class = jit_class_findbyname(gensym("jit_realsense_grab"));
max_jit_class_mop_wrap(max_class, jit_class, MAX_JIT_MOP_FLAGS_OWN_OUTPUTMATRIX | MAX_JIT_MOP_FLAGS_OWN_JIT_MATRIX); // attrs & methods for name, type, dim, planecount, bang, outputmatrix, etc
max_jit_class_wrap_standard(max_class, jit_class, 0); // attrs & methods for getattributes, dumpout, maxjitclassaddmethods, etc
max_jit_class_addmethod_usurp_low(max_class, (method)max_jit_realsense_grab_outputmatrix, "outputmatrix");
class_addmethod(max_class, (method)max_jit_mop_assist, "assist", A_CANT, 0); // standard matrix-operator (mop) assist fn
class_register(CLASS_BOX, max_class);
max_jit_realsense_grab_class = max_class;
return 0;
}
开发者ID:ramagottfried,项目名称:optic,代码行数:21,代码来源:max.jit.realsense.grab.c
示例8: main
int C74_EXPORT main(void)
{
t_class *c;
TTGraphInit();
common_symbols_init();
c = class_new("j.unpack-", (method)UnpackNew, (method)UnpackFree, sizeof(Unpack), (method)0L, A_GIMME, 0);
class_addmethod(c, (method)MaxGraphReset, "graph.reset", A_CANT, 0);
class_addmethod(c, (method)MaxGraphConnect, "graph.connect", A_OBJ, A_LONG, 0);
class_addmethod(c, (method)MaxGraphDrop, "graph.drop", A_CANT, 0);
class_addmethod(c, (method)MaxGraphObject, "graph.object", A_CANT, 0);
class_addmethod(c, (method)UnpackAssist, "assist", A_CANT, 0);
class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0);
class_register(_sym_box, c);
sUnpackClass = c;
return 0;
}
开发者ID:avilleret,项目名称:JamomaMax,代码行数:21,代码来源:j.unpack.cpp
示例9: main
int main(void){
t_class *c = class_new("te_breakout~", (method)bkout_new, (method)dsp_free, sizeof(t_bkout), 0L, A_GIMME, 0);
class_dspinit(c);
class_addmethod(c, (method)bkout_dsp, "dsp", A_CANT, 0);
class_addmethod(c, (method)bkout_dsp64, "dsp64", A_CANT, 0);
class_addmethod(c, (method)bkout_notify, "notify", A_CANT, 0);
class_addmethod(c, (method)bkout_assist, "assist", A_CANT, 0);
CLASS_ATTR_SYM(c, "name", 0, t_bkout, name);
CLASS_ATTR_LONG(c, "function", 0, t_bkout, function);
CLASS_ATTR_LONG(c, "numoutlets", 0, t_bkout, numoutlets);
class_register(CLASS_BOX, c);
bkout_class = c;
common_symbols_init();
return 0;
}
开发者ID:CNMAT,项目名称:CNMAT-Externs,代码行数:21,代码来源:te_breakout~.c
示例10: main
int main()
{
t_class *c;
c = class_new("match", (method)match_new, (method)match_free,
(short)sizeof(t_match), 0L, A_GIMME, 0);
class_addmethod(c, (method)match_int, "int", A_LONG, 0);
class_addmethod(c, (method)match_float, "float", A_FLOAT, 0);
class_addmethod(c, (method)match_list, "list", A_GIMME, 0);
class_addmethod(c, (method)match_anything, "anything", A_GIMME, 0);
class_addmethod(c, (method)match_set, "set", A_GIMME,0);
class_addmethod(c, (method)match_clear, "clear", 0);
class_addmethod(c, (method)match_assist, "assist",A_CANT,0);
class_register(CLASS_BOX, c);
match_class = c;
ps_nn = gensym("nn");
ps_list = gensym("list");
return 0;
}
开发者ID:Cycling74,项目名称:max5-sdk,代码行数:21,代码来源:match.c
示例11: scripto_ui_classinit
void scripto_ui_classinit(void)
{
t_class *c = class_new("scripto_ui", (method)scripto_ui_new, (method)scripto_ui_free, sizeof(t_scripto_ui), 0L, A_GIMME, 0L);
c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
jbox_initclass(c, 0);
class_addmethod(c, (method)scripto_ui_paint, "paint", A_CANT, 0);
class_addmethod(c, (method)scripto_ui_mousedown,"mousedown", A_CANT, 0);
class_addmethod(c, (method)scripto_ui_mousedrag,"mousedrag", A_CANT, 0);
class_addmethod(c, (method)jbox_notify, "notify", A_CANT, 0); // for auto-repainting
CLASS_ATTR_RGBA(c, "oncolor", 0, t_scripto_ui, u_oncolor);
CLASS_ATTR_PAINT(c, "oncolor", 0);
CLASS_ATTR_RGBA(c, "offcolor", 0, t_scripto_ui, u_offcolor);
CLASS_ATTR_PAINT(c, "offcolor", 0);
class_register(CLASS_BOX, c);
s_scripto_ui_class = c;
}
开发者ID:AlvaroBuitrago,项目名称:max-test,代码行数:21,代码来源:scripto.c
示例12: main
int C74_EXPORT main(void)
{
t_class *c;
c = class_new("breakgen", (method)breakgen_new, (method)breakgen_free, (long)sizeof(t_breakgen),
0L /* leave NULL!! */, A_GIMME, 0);
class_addmethod(c, (method)breakgen_bang, "bang", 0);
class_addmethod(c, (method)breakgen_identify, "identify", 0);
CLASS_METHOD_ATTR_PARSE(c, "identify", "undocumented", gensym("long"), 0, "1");
// here's an otherwise undocumented method, which does something that the user can't actually
// do from the patcher however, we want them to know about it for some weird documentation reason.
// so let's make it documentable. it won't appear in the quickref, because we can't send it from a message.
class_addmethod(c, (method)breakgen_acant, "blooop", A_CANT, 0);
CLASS_METHOD_ATTR_PARSE(c, "blooop", "documentable", gensym("long"), 0, "1");
class_addmethod(c, (method)breakgen_wavetype, "wavetype", A_LONG, 0);
class_addmethod(c, (method)breakgen_setfreq, "freq", A_FLOAT, 0);
class_addmethod(c, (method)breakgen_setconstsig, "constval", A_FLOAT, 0);
class_addmethod(c, (method)breakgen_setsr, "sr", A_FLOAT, 0);
class_addmethod(c, (method)breakgen_setter, "set", A_GIMME, 0);
class_addmethod(c, (method)breakgen_writebuf, "writebuf", A_GIMME, 0);
class_addmethod(c, (method)breakgen_writefile, "writefile", A_GIMME, 0);
/* you CAN'T call this from the patcher */
class_addmethod(c, (method)breakgen_assist, "assist", A_CANT, 0);
class_addmethod(c, (method)breakgen_dblclick, "dblclick", A_CANT, 0);
class_addmethod(c, (method)breakgen_getrand, "getrand", A_CANT, 0);
CLASS_ATTR_SYM(c, "name", 0, t_breakgen, name);
class_register(CLASS_BOX, c);
breakgen_class = c;
buffy_modified = gensym("buffer_modified");
return 0;
}
开发者ID:flats,项目名称:breakgen-Max,代码行数:40,代码来源:breakgen.c
示例13: main
int main(void) {
t_class *c = class_new("radialbeameq~", (method)radialBeamformNew, (method)radialBeamformFree, sizeof(RadialBeamform), 0L, A_GIMME, 0);
class_dspinit(c);
version(0);
CLASS_ATTR_LONG(c, "n", 0, RadialBeamform, sh_degree);
CLASS_ATTR_FILTER_MIN(c, "n", 0);
CLASS_ATTR_ACCESSORS(c, "n", 0, radialBeamformSetn);
// needs special set get
CLASS_ATTR_SYM(c, "mode", 0, RadialBeamform, bf_mode_sym);
CLASS_ATTR_ACCESSORS(c, "mode", 0, radialBeamformSetMode);
CLASS_ATTR_FLOAT(c, "max_wng", 0, RadialBeamform, max_wng);
CLASS_ATTR_FILTER_MIN(c, "max_wng", 0);
CLASS_ATTR_FILTER_MAX(c, "max_wng", 96);
CLASS_ATTR_ACCESSORS(c, "max_wng", 0, radialBeamformSetWNG);
CLASS_ATTR_FLOAT(c, "omega_cutoff", 0, RadialBeamform, omega_cutoff);
CLASS_ATTR_FLOAT(c, "slope_cutoff", 0, RadialBeamform, slope_cutoff);
CLASS_ATTR_FLOAT(c, "delta_n", 0, RadialBeamform, delta_n);
CLASS_ATTR_ACCESSORS(c, "delta_n", 0, radialBeamformSetDeltan);
CLASS_ATTR_FLOAT(c, "delta_n0", 0, RadialBeamform, delta_n0);
CLASS_ATTR_ACCESSORS(c, "delta_n0", 0, radialBeamformSetDeltan);
class_addmethod(c, (method)radialBeamformDsp, "dsp", A_CANT, 0);
class_addmethod(c, (method)radialBeamformReset, "reset", 0);
class_register(CLASS_BOX, c);
radialbeameq_class = c;
//common_symbols_init();
return 0;
}
开发者ID:CNMAT,项目名称:CNMAT-Externs,代码行数:40,代码来源:radial_beamform~.c
示例14: main
int main (void)
{
this_class = class_new ("irextract~",
(method) irextract_new,
(method)irextract_free,
sizeof(t_irextract),
0L,
A_GIMME,
0);
class_addmethod (this_class, (method)irextract_assist, "assist", A_CANT, 0L);
class_addmethod (this_class, (method)irextract_sweep, "sweep", A_GIMME, 0L);
class_addmethod (this_class, (method)irextract_mls, "mls", A_GIMME, 0L);
class_addmethod (this_class, (method)irextract_noise, "white", A_GIMME, 0L);
class_addmethod (this_class, (method)irextract_noise, "brown", A_GIMME, 0L);
class_addmethod (this_class, (method)irextract_noise, "pink", A_GIMME, 0L);
class_addmethod (this_class, (method)irextract_clear, "clear", 0L);
class_addmethod (this_class, (method)irextract_getir, "getir", A_GIMME, 0L);
class_addmethod (this_class, (method)irextract_dump, "dump", A_GIMME, 0L);
declare_HIRT_common_attributes(this_class);
CLASS_ATTR_DOUBLE(this_class, "amp", 0, t_irextract, amp);
CLASS_ATTR_LABEL(this_class,"amp", 0, "Signal Amplitude (dB)");
CLASS_ATTR_LONG(this_class, "invamp", 0, t_irextract, inv_amp);
CLASS_ATTR_STYLE_LABEL(this_class,"invamp",0,"onoff","Invert Amplitude");
CLASS_ATTR_LONG(this_class, "bandlimit", 0, t_irextract, bandlimit);
CLASS_ATTR_STYLE_LABEL(this_class,"bandlimit",0,"onoff","Bandlimit Sweep Measurements");
class_register(CLASS_BOX, this_class);
buffer_access_init();
return 0;
}
开发者ID:EQ4,项目名称:HISSTools_Impulse_Response_Toolbox,代码行数:40,代码来源:irextract~.c
示例15: main
int C74_EXPORT main()
{
#ifdef MSP_VERSION
this_class = class_new("randomvals~",
(method)randomvals_new,
(method)randomvals_free,
sizeof(t_randomvals),
NULL,
A_DEFLONG,
0);
class_addmethod(this_class, (method)randomvals_dsp, "dsp", A_CANT, 0);
class_addmethod(this_class, (method)randomvals_dsp64, "dsp64", A_CANT, 0);
class_dspinit(this_class);
#else
this_class = class_new("randomvals",
(method)randomvals_new,
(method)randomvals_free,
sizeof(t_randomvals),
NULL,
A_DEFLONG,
0);
class_addmethod(this_class, (method)randomvals_int, "int", A_LONG, 0);
#endif
class_addmethod(this_class, (method)randomvals_list, "list", A_GIMME, 0);
class_addmethod(this_class, (method)randomvals_assist, "assist", A_CANT, 0);
class_register(CLASS_BOX, this_class);
return 0;
}
开发者ID:AlexHarker,项目名称:AHarker_Externals,代码行数:40,代码来源:randomvals.c
示例16: ext_main
/****************************************************************
* Initialization
*/
void ext_main(void *r)
{
t_class *c;
c = class_new("strstr",
(method)strstr_new,
(method)strstr_free,
(long)sizeof(t_strstr),
(method)NULL,
A_GIMME, 0);
class_addmethod(c, (method)strstr_assist, "assist", A_CANT, 0);
class_addmethod(c, (method)strstr_bang, "bang", 0);
class_addmethod(c, (method)strstr_int, "int", A_LONG, 0);
class_addmethod(c, (method)strstr_float, "float", A_FLOAT, 0);
class_addmethod(c, (method)strstr_list, "list", A_GIMME, 0);
class_addmethod(c, (method)strstr_anything, "anything", A_GIMME, 0);
class_addmethod(c, (method)strstr_set, "set", A_GIMME, 0);
class_addmethod(c, (method)strstr_post, "post", 0);
class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0);
CLASS_ATTR_LONG(c, "mode", 0, t_strstr, mode);
CLASS_ATTR_ORDER(c, "mode", 0, "1"); // order
CLASS_ATTR_LABEL(c, "mode", 0, "mode"); // label
CLASS_ATTR_FILTER_CLIP(c, "mode", 0, 1); // min-max filter
CLASS_ATTR_SAVE(c, "mode", 0); // save with patcher
CLASS_ATTR_SELFSAVE(c, "mode", 0); // display as saved
CLASS_ATTR_ACCESSORS(c, "mode", NULL, str_mode_set);
CLASS_ATTR_LONG(c, "fprecision", 0, t_strstr, fprecision);
CLASS_ATTR_ORDER(c, "fprecision", 0, "2");
CLASS_ATTR_LABEL(c, "fprecision", 0, "float precision");
CLASS_ATTR_FILTER_CLIP(c, "fprecision", 0, 10);
CLASS_ATTR_SAVE(c, "fprecision", 0);
CLASS_ATTR_SELFSAVE(c, "fprecision", 0);
CLASS_ATTR_ACCESSORS(c, "fprecision", NULL, str_fprecision_set);
class_register(CLASS_BOX, c);
strstr_class = c;
}
开发者ID:ycandau,项目名称:str_objects,代码行数:43,代码来源:strstr.c
示例17: main
int C74_EXPORT main(void)
{
t_class *c;
c = class_new("el.multigrain~", (method)multigrain_new, (method)dsp_free, sizeof(t_multigrain), 0,A_GIMME, 0);
class_addmethod(c,(method)multigrain_dsp64, "dsp64", A_CANT, 0);
class_addmethod(c,(method)multigrain_assist,"assist",A_CANT,0);
class_addmethod(c,(method)multigrain_dblclick, "dblclick", A_CANT, 0);
class_addmethod(c,(method)multigrain_setbuf, "setbuf", A_SYM, A_SYM, 0);
class_addmethod(c,(method)multigrain_spray, "spray", 0);
class_addmethod(c,(method)multigrain_pitchspray, "pitchspray", 0);
class_addmethod(c,(method)multigrain_transpose, "transpose", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_events, "events", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_pitchdev, "pitchdev", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_lowblock, "lowblock", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_highblock, "highblock", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_interpolate, "interpolate", A_FLOAT, 0);
class_addmethod(c,(method)multigrain_retro_odds, "retro_odds", A_FLOAT, 0);
class_addmethod(c,(method)multigrain_nopan, "nopan", A_FLOAT, 0);
class_addmethod(c,(method)multigrain_seed, "seed", A_FLOAT, 0);
class_addmethod(c,(method)multigrain_mute, "mute", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_steady, "steady", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_interpolate, "interpolate", A_FLOAT, 0);
class_addmethod(c,(method)multigrain_interpolate_envelope, "interpolate_envelope", A_FLOAT, 0);
class_addmethod(c,(method)multigrain_constrain_scale, "constrain_scale", A_DEFFLOAT, 0);
class_addmethod(c,(method)multigrain_grist, "grist", A_GIMME, 0);
class_addmethod(c,(method)multigrain_grain, "grain", A_GIMME, 0);
class_addmethod(c,(method)multigrain_setscale, "setscale", A_GIMME, 0);
class_addmethod(c,(method)multigrain_chanrange, "chanrange", A_GIMME, 0);
class_addmethod(c,(method)multigrain_setgroup, "setgroup", A_GIMME, 0);
class_addmethod(c,(method)multigrain_info, "info", 0);
class_addmethod(c, (method)multigrain_notify, "notify", A_CANT, 0);
class_dspinit(c);
class_register(CLASS_BOX, c);
multigrain_class = c;
potpourri_announce(OBJECT_NAME);
return 0;
}
开发者ID:ericlyon,项目名称:LyonPotpourri3.0-MaxMSP,代码行数:40,代码来源:multigrain~.c
示例18: main
int C74_EXPORT main(void)
{
t_class *c;
c = class_new("uisimp3",
(method)uisimp_new,
(method)uisimp_free,
sizeof(t_uisimp),
(method)NULL,
A_GIMME,
0L);
c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
jbox_initclass(c, JBOX_COLOR | JBOX_FIXWIDTH | JBOX_FONTATTR);
class_addmethod(c, (method) uisimp_paint, "paint", A_CANT, 0);
class_addmethod(c, (method) uisimp_int, "int", A_LONG, 0);
class_addmethod(c, (method) uisimp_mousedown, "mousedown", A_CANT, 0);
class_addmethod(c, (method) uisimp_mousedrag, "mousedrag", A_CANT, 0);
class_addmethod(c, (method) uisimp_mousewheel, "mousewheel", A_CANT, 0);
class_addmethod(c, (method) uisimp_mouseup, "mouseup", A_CANT, 0);
class_addmethod(c, (method) uisimp_getdrawparams, "getdrawparams", A_CANT, 0);
class_addmethod(c, (method) uisimp_assist, "assist", A_CANT, 0);
class_addmethod(c, (method) jbox_notify, "notify", A_CANT, 0);
CLASS_ATTR_DEFAULT(c, "patching_rect", 0, "0 0 50 50");
CLASS_ATTR_DEFAULT(c, "color", 0, "0.8 0.5 0.2 1");
CLASS_ATTR_CHAR(c,"reset",0, t_uisimp, j_reset);
CLASS_ATTR_STYLE_LABEL(c,"reset",0,"onoff","Reset Counter on Click");
CLASS_ATTR_CATEGORY(c,"reset",0,"Tweaks");
CLASS_ATTR_DEFAULT_SAVE(c,"reset",0,"1");
s_uisimp_class = c;
class_register(CLASS_BOX, s_uisimp_class);
return 0;
}
开发者ID:CICM,项目名称:max6-sdk,代码行数:40,代码来源:uisimp3.c
示例19: main
extern "C" int C74_EXPORT main(void)
{
t_class *c;
c = class_new("tap.filecontainer", (method)filecontainer_new, (method)filecontainer_free, sizeof(t_filecontainer), (method)0L, A_GIMME, 0);
common_symbols_init();
// MESSAGES:
class_addmethod(c, (method)filecontainer_addfile, "addfile", A_DEFSYM, 0L);
class_addmethod(c, (method)filecontainer_removefile, "removefile", A_SYM, 0L);
class_addmethod(c, (method)filecontainer_getnumfiles, "getnumfiles", 0L);
class_addmethod(c, (method)filecontainer_getfilenames, "getfilenames", 0L);
class_addmethod(c, (method)filecontainer_getfilepath, "getfilepath", A_SYM, 0L);
class_addmethod(c, (method)filecontainer_addfileattr, "addfileattr", A_GIMME, 0L);
class_addmethod(c, (method)filecontainer_removefileattr, "removefileattr", A_GIMME, 0L);
class_addmethod(c, (method)filecontainer_getnumfileattrs, "getnumfileattrs", A_SYM, 0L);
class_addmethod(c, (method)filecontainer_getfileattrnames, "getfileattrnames", A_SYM, 0L);
class_addmethod(c, (method)filecontainer_getfileattrvalue, "getfileattrvalue", A_GIMME, 0L);
class_addmethod(c, (method)filecontainer_sql, "sql", A_SYM, 0L);
class_addmethod(c, (method)filecontainer_open, "open", A_DEFSYM, 0L); // create a cache of temp files
class_addmethod(c, (method)filecontainer_close, "close", 0L); // remove temp files
// class_addmethod(c, (method)filecontainer_spoolfile, "sync", A_GIMME, 0L); // sync temp files and the db based on moddates
class_addmethod(c, (method)filecontainer_assist, "assist", A_CANT, 0L);
class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0);
// Finalize our class
class_register(_sym_box, c);
s_filecontainer_class = c;
ps_getblob = gensym("getblob");
ps_setblob = gensym("setblob");
ps_getlastinsertid = gensym("getlastinsertid");
ps_starttransaction = gensym("starttransaction");
ps_endtransaction = gensym("endtransaction");
}
开发者ID:tap,项目名称:TapTools,代码行数:39,代码来源:tap.filecontainer.cpp
示例20: main
extern "C" int C74_EXPORT main(void)
{
t_class* c = class_new("tap.comb~", (method)comb_new, (method)comb_free, sizeof(t_comb), (method)0L, A_GIMME, 0);
common_symbols_init();
class_addmethod(c, (method)comb_dsp64, "dsp64", A_CANT, 0);
class_addmethod(c, (method)comb_int, "int", A_LONG, 0L); // Input as int
class_addmethod(c, (method)comb_float, "float", A_FLOAT, 0L); // Input as double
class_addmethod(c, (method)comb_lp_cf, "lpass", A_FLOAT, 0L); // for backwards compatibility
class_addmethod(c, (method)comb_clear, "clear", 0L);
class_addmethod(c, (method)comb_assist, "assist", A_CANT, 0L);
class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT,0);
class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0);
CLASS_ATTR_DOUBLE(c, "feedback", 0, t_comb, attr_feedback);
CLASS_ATTR_ACCESSORS(c, "feedback", NULL, attr_set_feedback);
CLASS_ATTR_LONG(c, "autoclip", 0, t_comb, attr_autoclip);
CLASS_ATTR_ACCESSORS(c, "autoclip", NULL, attr_set_autoclip);
CLASS_ATTR_STYLE(c, "autoclip", 0, "onoff");
CLASS_ATTR_DOUBLE(c, "delay", 0, t_comb, attr_delay);
CLASS_ATTR_ACCESSORS(c, "delay", NULL, attr_set_delay);
CLASS_ATTR_DOUBLE(c, "decay", 0, t_comb, attr_decay);
CLASS_ATTR_ACCESSORS(c, "decay", NULL, attr_set_decay);
CLASS_ATTR_DOUBLE(c, "buffersize", 0, t_comb, attr_buffersize);
CLASS_ATTR_ACCESSORS(c, "buffersize", NULL, attr_set_buffersize);
CLASS_ATTR_DOUBLE(c, "lowpass", 0, t_comb, attr_lowpass);
CLASS_ATTR_ACCESSORS(c, "lowpass", NULL, attr_set_lowpass);
class_dspinit(c); // Setup object's class to work with MSP
class_register(_sym_box, c);
s_comb_class = c;
}
开发者ID:tap,项目名称:TapTools,代码行数:39,代码来源:tap.comb~.cpp
注:本文中的class_register函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论