本文整理汇总了C++中rb_define_private_method函数的典型用法代码示例。如果您正苦于以下问题:C++ rb_define_private_method函数的具体用法?C++ rb_define_private_method怎么用?C++ rb_define_private_method使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rb_define_private_method函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: init_html_sax_parser
void init_html_sax_parser()
{
VALUE klass = cNokogiriHtmlSaxParser =
rb_const_get(mNokogiriHtmlSax, rb_intern("Parser"));
rb_define_private_method(klass, "native_parse_memory", native_parse_memory, 2);
rb_define_private_method(klass, "native_parse_file", native_parse_file, 2);
}
开发者ID:regularfry,项目名称:merb-book,代码行数:7,代码来源:html_sax_parser.c
示例2: Init_lazy_proxy
void Init_lazy_proxy() {
id_call = rb_intern("call");
id_respond_to = rb_intern("respond_to?");
rb_cLazyProxy = rb_define_class("LazyProxy", rb_cObject);
rb_define_alloc_func(rb_cLazyProxy, lp_alloc);
rb_define_method(rb_cLazyProxy, "__setobj__", lp_initialize, -1);
rb_define_method(rb_cLazyProxy, "__getobj__", lp_get_resolv, 0);
rb_define_method(rb_cLazyProxy, "__reset__", lp_reset, 0);
rb_define_method(rb_cLazyProxy, "send", lp_send, -1);
rb_define_method(rb_cLazyProxy, "inspect", lp_inspect, 0);
rb_define_private_method(rb_cLazyProxy, "initialize", lp_initialize, -1);
rb_define_private_method(rb_cLazyProxy, "initialize_copy", lp_init_copy, 1);
rb_define_private_method(rb_cLazyProxy, "method_missing", lp_method_missing, -1);
rb_define_private_method(rb_cLazyProxy, "respond_to_missing?", lp_respond_to_missing, -1);
ATTACH_FORW_FUNC("enum_for", enum_for);
ATTACH_FORW_FUNC("to_enum", to_enum);
ATTACH_FORW_FUNC("to_s", to_s);
ATTACH_FORW_FUNC("!", fnot);
ATTACH_FORW_FUNC("!=", noteql);
ATTACH_FORW_FUNC("==", eqleql);
ATTACH_FORW_FUNC("===", eqleqleql);
ATTACH_FORW_FUNC("=~", eqltld);
ATTACH_FORW_FUNC("nil?", isnil);
}
开发者ID:mavax,项目名称:lazy_proxy,代码行数:29,代码来源:lazy_proxy.c
示例3: Init_oily_png
void Init_oily_png() {
VALUE OilyPNG = rb_define_module("OilyPNG");
VALUE OilyPNG_Canvas = rb_define_module_under(OilyPNG, "Resampling");
rb_define_private_method(OilyPNG_Canvas, "steps_residues", oily_png_canvas_steps_residues, 2);
rb_define_private_method(OilyPNG_Canvas, "steps", oily_png_canvas_steps, 2);
rb_define_method(OilyPNG_Canvas, "resample_nearest_neighbor!", oily_png_canvas_resample_nearest_neighbor_bang, 2);
rb_define_method(OilyPNG_Canvas, "resample_bilinear!", oily_png_canvas_resample_bilinear_bang, 2);
// Setup decoding module
VALUE OilyPNG_PNGDecoding = rb_define_module_under(OilyPNG, "PNGDecoding");
rb_define_method(OilyPNG_PNGDecoding, "decode_png_image_pass", oily_png_decode_png_image_pass, 6);
// Setup encoding module
VALUE OilyPNG_PNGEncoding = rb_define_module_under(OilyPNG, "PNGEncoding");
rb_define_method(OilyPNG_PNGEncoding, "encode_png_image_pass_to_stream", oily_png_encode_png_image_pass_to_stream, 4);
// Setup Color module
VALUE OilyPNG_Color = rb_define_module_under(OilyPNG, "Color");
rb_define_method(OilyPNG_Color, "compose_quick", oily_png_color_compose_quick, 2);
rb_define_method(OilyPNG_Color, "euclidean_distance_rgba", oily_png_euclidean_distance_rgba, 2);
rb_define_method(OilyPNG_Color, "r", oily_png_color_r, 1);
rb_define_method(OilyPNG_Color, "g", oily_png_color_g, 1);
rb_define_method(OilyPNG_Color, "b", oily_png_color_b, 1);
rb_define_method(OilyPNG_Color, "a", oily_png_color_a, 1);
// Setup Operations module
VALUE OilyPNG_Operations = rb_define_module_under(OilyPNG, "Operations");
rb_define_method(OilyPNG_Operations, "compose!", oily_png_compose_bang, -1);
rb_define_method(OilyPNG_Operations, "replace!", oily_png_replace_bang, -1);
}
开发者ID:retailnext,项目名称:oily_png,代码行数:31,代码来源:oily_png_ext.c
示例4: init_Johnson_SpiderMonkey_Proxy
void init_Johnson_SpiderMonkey_Proxy(VALUE spidermonkey)
{
/* HACK: These comments are *only* to make RDoc happy.
VALUE johnson = rb_define_module("Johnson");
VALUE spidermonkey = rb_define_module_under(johnson, "SpiderMonkey");
*/
VALUE johnson = rb_const_get(rb_mKernel, rb_intern("Johnson"));
VALUE johnson_proxy = rb_const_get(johnson, rb_intern("RubyLandProxy"));
/* RubyLandProxy class. */
proxy_class = rb_define_class_under(spidermonkey, "RubyLandProxy", johnson_proxy);
rb_define_method(proxy_class, "[]", get, 1);
rb_define_method(proxy_class, "[]=", set, 2);
rb_define_method(proxy_class, "function?", function_p, 0);
rb_define_method(proxy_class, "respond_to?", respond_to_p, -1);
rb_define_method(proxy_class, "each", each, 0);
rb_define_method(proxy_class, "length", length, 0);
rb_define_method(proxy_class, "to_s", to_s, 0);
rb_define_private_method(proxy_class, "runtime", runtime, 0);
rb_define_private_method(proxy_class, "function_property?", function_property_p, 1);
rb_define_private_method(proxy_class, "call_function_property", call_function_property, -1);
VALUE callable = rb_define_module_under(proxy_class, "Callable");
rb_define_singleton_method(callable, "test?", callable_test_p, 1);
rb_define_private_method(callable, "native_call", native_call, -1);
rb_funcall(johnson_proxy, rb_intern("insert_wrapper"), 1, callable);
script_class = rb_define_class_under(spidermonkey, "RubyLandScript", proxy_class);
}
开发者ID:aasmith,项目名称:johnson,代码行数:33,代码来源:ruby_land_proxy.c
示例5: rbffi_Struct_Init
void
rbffi_Struct_Init(VALUE moduleFFI)
{
VALUE StructClass;
rbffi_StructLayout_Init(moduleFFI);
rbffi_StructClass = StructClass = rb_define_class_under(moduleFFI, "Struct", rb_cObject);
rb_global_variable(&rbffi_StructClass);
rbffi_StructInlineArrayClass = rb_define_class_under(rbffi_StructClass, "InlineArray", rb_cObject);
rb_global_variable(&rbffi_StructInlineArrayClass);
rbffi_StructLayoutCharArrayClass = rb_define_class_under(rbffi_StructLayoutClass,
"CharArray", rbffi_StructInlineArrayClass);
rb_global_variable(&rbffi_StructLayoutCharArrayClass);
rb_define_alloc_func(StructClass, struct_allocate);
rb_define_method(StructClass, "initialize", struct_initialize, -1);
rb_define_method(StructClass, "order", struct_order, -1);
rb_define_alias(rb_singleton_class(StructClass), "alloc_in", "new");
rb_define_alias(rb_singleton_class(StructClass), "alloc_out", "new");
rb_define_alias(rb_singleton_class(StructClass), "alloc_inout", "new");
rb_define_alias(rb_singleton_class(StructClass), "new_in", "new");
rb_define_alias(rb_singleton_class(StructClass), "new_out", "new");
rb_define_alias(rb_singleton_class(StructClass), "new_inout", "new");
rb_define_method(StructClass, "pointer", struct_get_pointer, 0);
rb_define_private_method(StructClass, "pointer=", struct_set_pointer, 1);
rb_define_method(StructClass, "layout", struct_get_layout, 0);
rb_define_private_method(StructClass, "layout=", struct_set_layout, 1);
rb_define_method(StructClass, "[]", struct_aref, 1);
rb_define_method(StructClass, "[]=", struct_aset, 2);
rb_define_method(StructClass, "null?", struct_null_p, 0);
rb_include_module(rbffi_StructInlineArrayClass, rb_mEnumerable);
rb_define_alloc_func(rbffi_StructInlineArrayClass, inline_array_allocate);
rb_define_method(rbffi_StructInlineArrayClass, "initialize", inline_array_initialize, 2);
rb_define_method(rbffi_StructInlineArrayClass, "[]", inline_array_aref, 1);
rb_define_method(rbffi_StructInlineArrayClass, "[]=", inline_array_aset, 2);
rb_define_method(rbffi_StructInlineArrayClass, "each", inline_array_each, 0);
rb_define_method(rbffi_StructInlineArrayClass, "size", inline_array_size, 0);
rb_define_method(rbffi_StructInlineArrayClass, "to_a", inline_array_to_a, 0);
rb_define_method(rbffi_StructInlineArrayClass, "to_ptr", inline_array_to_ptr, 0);
rb_define_method(rbffi_StructLayoutCharArrayClass, "to_s", inline_array_to_s, 0);
rb_define_alias(rbffi_StructLayoutCharArrayClass, "to_str", "to_s");
id_pointer_ivar = rb_intern("@pointer");
id_layout_ivar = rb_intern("@layout");
id_layout = rb_intern("layout");
id_get = rb_intern("get");
id_put = rb_intern("put");
id_to_ptr = rb_intern("to_ptr");
id_to_s = rb_intern("to_s");
}
开发者ID:sgonyea,项目名称:ffi,代码行数:60,代码来源:Struct.c
示例6: Init_module_uninclude
void Init_module_uninclude(void)
{
VALUE rb_cModule;
/* For rdoc: rb_cModule = rb_define_class("Module", rb_cObject) */
rb_cModule = rb_const_get(rb_cObject, rb_intern("Module"));
rb_define_private_method(rb_cModule, "uninclude", module_uninclude, -1);
rb_define_private_method(rb_cModule, "remove_features", module_remove_features, 1);
rb_define_private_method(rb_cModule, "unincluded", module_unincluded, 1);
}
开发者ID:vic,项目名称:lispy,代码行数:9,代码来源:module_uninclude.c
示例7: Init_flock
void Init_flock(void) {
mFlock = rb_define_module("Flock");
scFlock = rb_singleton_class(mFlock);
rb_define_private_method(scFlock, "do_kcluster", RUBY_METHOD_FUNC(rb_do_kcluster), -1);
rb_define_private_method(scFlock, "do_self_organizing_map", RUBY_METHOD_FUNC(rb_do_self_organizing_map), -1);
rb_define_private_method(scFlock, "do_treecluster", RUBY_METHOD_FUNC(rb_do_treecluster), -1);
/* kcluster method - K-Means */
rb_define_const(mFlock, "METHOD_AVERAGE", INT2NUM('a'));
/* kcluster method - K-Medians */
rb_define_const(mFlock, "METHOD_MEDIAN", INT2NUM('m'));
/* treecluster method - pairwise single-linkage clustering */
rb_define_const(mFlock, "METHOD_SINGLE_LINKAGE", INT2NUM('s'));
/* treecluster method - pairwise maximum- (or complete-) linkage clustering */
rb_define_const(mFlock, "METHOD_MAXIMUM_LINKAGE", INT2NUM('m'));
/* treecluster method - pairwise average-linkage clustering */
rb_define_const(mFlock, "METHOD_AVERAGE_LINKAGE", INT2NUM('a'));
/* treecluster method - pairwise centroid-linkage clustering */
rb_define_const(mFlock, "METHOD_CENTROID_LINKAGE", INT2NUM('c'));
rb_define_const(mFlock, "METRIC_EUCLIDIAN", INT2NUM('e'));
rb_define_const(mFlock, "METRIC_CITY_BLOCK", INT2NUM('b'));
rb_define_const(mFlock, "METRIC_CORRELATION", INT2NUM('c'));
rb_define_const(mFlock, "METRIC_ABSOLUTE_CORRELATION", INT2NUM('a'));
rb_define_const(mFlock, "METRIC_UNCENTERED_CORRELATION", INT2NUM('u'));
rb_define_const(mFlock, "METRIC_ABSOLUTE_UNCENTERED_CORRELATION", INT2NUM('x'));
rb_define_const(mFlock, "METRIC_SPEARMAN", INT2NUM('s'));
rb_define_const(mFlock, "METRIC_KENDALL", INT2NUM('k'));
/* Randomly assign data points to clusters using a uniform distribution. */
rb_define_const(mFlock, "SEED_RANDOM", INT2NUM(0));
/*
K-Means++ style initialization where data points are probabilistically assigned to clusters
based on their distance from closest cluster.
*/
rb_define_const(mFlock, "SEED_KMEANS_PLUSPLUS", INT2NUM(1));
/*
Deterministic cluster assignment by spreading out initial clusters as far away from each other
as possible.
*/
rb_define_const(mFlock, "SEED_SPREADOUT", INT2NUM(2));
rb_define_module_function(mFlock, "euclidian_distance", RUBY_METHOD_FUNC(rb_euclid), -1);
rb_define_module_function(mFlock, "cityblock_distance", RUBY_METHOD_FUNC(rb_cityblock), -1);
rb_define_module_function(mFlock, "correlation_distance", RUBY_METHOD_FUNC(rb_correlation), -1);
rb_define_module_function(mFlock, "absolute_correlation_distance", RUBY_METHOD_FUNC(rb_acorrelation), -1);
rb_define_module_function(mFlock, "uncentered_correlation_distance", RUBY_METHOD_FUNC(rb_ucorrelation), -1);
rb_define_module_function(mFlock, "absolute_uncentered_correlation_distance", RUBY_METHOD_FUNC(rb_uacorrelation), -1);
rb_define_module_function(mFlock, "spearman_distance", RUBY_METHOD_FUNC(rb_spearman), -1);
rb_define_module_function(mFlock, "kendall_distance", RUBY_METHOD_FUNC(rb_kendall), -1);
}
开发者ID:deepfryed,项目名称:flock,代码行数:57,代码来源:flock.c
示例8: Init_cparse
void
Init_cparse(void)
{
VALUE Racc, Parser;
ID id_racc = rb_intern("Racc");
if (rb_const_defined(rb_cObject, id_racc)) {
Racc = rb_const_get(rb_cObject, id_racc);
Parser = rb_const_get_at(Racc, rb_intern("Parser"));
}
else {
Racc = rb_define_module("Racc");
Parser = rb_define_class_under(Racc, "Parser", rb_cObject);
}
rb_define_method(Parser, "initialize", (VALUE(*)(ANYARGS))initialize, 0);
rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 0);
rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 2);
rb_define_const(Parser, "Racc_Runtime_Core_Version_C",
rb_str_new2(RACC_VERSION));
rb_define_const(Parser, "Racc_Runtime_Core_Id_C",
rb_str_new2("$originalId: cparse.c,v 1.8 2006/07/06 11:39:46 aamine Exp $"));
CparseParams = rb_define_class_under(Racc, "CparseParams", rb_cObject);
RaccBug = rb_eRuntimeError;
id_yydebug = rb_intern("@yydebug");
id_nexttoken = rb_intern("next_token");
id_onerror = rb_intern("on_error");
id_noreduce = rb_intern("_reduce_none");
id_errstatus = rb_intern("@racc_error_status");
id_d_shift = rb_intern("racc_shift");
id_d_reduce = rb_intern("racc_reduce");
id_d_accept = rb_intern("racc_accept");
id_d_read_token = rb_intern("racc_read_token");
id_d_next_state = rb_intern("racc_next_state");
id_d_e_pop = rb_intern("racc_e_pop");
id_action_table = rb_intern("@action_table");
id_action_check = rb_intern("@action_check");
id_action_default = rb_intern("@action_default");
id_action_pointer = rb_intern("@action_pointer");
id_goto_table = rb_intern("@goto_table");
id_goto_check = rb_intern("@goto_check");
id_goto_default = rb_intern("@goto_default");
id_goto_pointer = rb_intern("@goto_pointer");
id_nt_base = rb_intern("@nt_base");
id_reduce_table = rb_intern("@reduce_table");
id_token_table = rb_intern("@token_table");
id_shift_n = rb_intern("@shift_n");
id_reduce_n = rb_intern("@reduce_n");
id_use_result = rb_intern("@use_result");
}
开发者ID:hsbt,项目名称:racc,代码行数:56,代码来源:cparse.c
示例9: Init_ext
void
Init_ext(void)
{
// async def method_a; end
rb_define_private_method(rb_cModule, "async", mod_async, 1);
// [].map &async { |args| await Task.new { } }
rb_define_private_method(rb_mKernel, "async", kern_async, -1);
mAsync = rb_define_module("Async");
}
开发者ID:rhenium,项目名称:async-ruby,代码行数:10,代码来源:async.c
示例10: rbqml_init_component
void rbqml_init_component() {
rbqml_cComponent = rb_define_class_under(rb_path2class("QML"), "Component", rb_cObject);
rb_define_alloc_func(rbqml_cComponent, &component_alloc);
rb_define_private_method(rbqml_cComponent, "initialize_impl", &component_initialize, 0);
rb_define_private_method(rbqml_cComponent, "load_path_impl", &component_load_path, 1);
rb_define_private_method(rbqml_cComponent, "load_data_impl", &component_load_data, 2);
rb_define_private_method(rbqml_cComponent, "error_string", &component_error_string, 0);
rb_define_private_method(rbqml_cComponent, "create_impl", &component_create, 0);
}
开发者ID:polamjag,项目名称:ruby-qml,代码行数:10,代码来源:component.c
示例11: init_felica
void init_felica()
{
cNfcFelica = rb_define_class_under(cNfc, "Felica", rb_cObject);
rb_define_method(cNfcFelica, "szLen", szLen, 0);
rb_define_method(cNfcFelica, "btResCode", btResCode, 0);
rb_define_method(cNfcFelica, "abtId", abtId, 0);
rb_define_private_method(cNfcFelica, "abtPad", abtPad, 0);
rb_define_private_method(cNfcFelica, "abtSysCode", abtSysCode, 0);
}
开发者ID:pbrumm,项目名称:nfc,代码行数:10,代码来源:nfc_felica.c
示例12: Init_super_method
void Init_super_method(void) {
rb_require("safe_send.so");
rb_cMethod = rb_const_get(rb_cObject, rb_intern("Method"));
id_instance_method = rb_intern("instance_method");
sym_call = ID2SYM(rb_intern("call"));
rb_global_variable(&sym_call);
rb_define_private_method(rb_cObject, "super_method", ruby_super_method, 2);
rb_define_private_method(rb_cObject, "super_call", ruby_super_call, -1);
}
开发者ID:cout,项目名称:ruby-treasures,代码行数:11,代码来源:super_method.c
示例13: init_html_sax_push_parser
void init_html_sax_push_parser()
{
VALUE nokogiri = rb_define_module("Nokogiri");
VALUE html = rb_define_module_under(nokogiri, "HTML");
VALUE sax = rb_define_module_under(html, "SAX");
VALUE klass = rb_define_class_under(sax, "PushParser", cNokogiriXmlSaxPushParser);
cNokogiriHtmlSaxPushParser = klass;
rb_define_private_method(klass, "initialize_native", initialize_native, 3);
rb_define_private_method(klass, "native_write", native_write, 2);
}
开发者ID:a-ramamurthy,项目名称:rails-decal-proj-2,代码行数:12,代码来源:html_sax_push_parser.c
示例14: init_xml_sax_push_parser
void init_xml_sax_push_parser()
{
VALUE nokogiri = rb_define_module("Nokogiri");
VALUE xml = rb_define_module_under(nokogiri, "XML");
VALUE sax = rb_define_module_under(xml, "SAX");
VALUE klass = rb_define_class_under(sax, "PushParser", rb_cObject);
cNokogiriXmlSaxPushParser = klass;
rb_define_alloc_func(klass, allocate);
rb_define_private_method(klass, "initialize_native", initialize_native, 2);
rb_define_private_method(klass, "native_write", native_write, 2);
}
开发者ID:BMorearty,项目名称:Webiva,代码行数:13,代码来源:xml_sax_push_parser.c
示例15: Init_oci8
VALUE Init_oci8(void)
{
#if 0
/*
* OCIHandle is the abstract base class for all OCI handles and
* descriptors which are opaque data types of Oracle Call Interface.
*/
oci8_cOCIHandle = rb_define_class("OCIHandle", rb_cObject);
cOCI8 = rb_define_class("OCI8", oci8_cOCIHandle);
#endif
cOCI8 = oci8_define_class("OCI8", &oci8_svcctx_class);
oracle_client_vernum = INT2FIX(oracle_client_version);
if (have_OCIClientVersion) {
sword major, minor, update, patch, port_update;
OCIClientVersion(&major, &minor, &update, &patch, &port_update);
oracle_client_vernum = INT2FIX(ORAVERNUM(major, minor, update, patch, port_update));
}
sym_SYSDBA = ID2SYM(rb_intern("SYSDBA"));
sym_SYSOPER = ID2SYM(rb_intern("SYSOPER"));
id_at_prefetch_rows = rb_intern("@prefetch_rows");
id_at_username = rb_intern("@username");
id_set_prefetch_rows = rb_intern("prefetch_rows=");
rb_define_singleton_method_nodoc(cOCI8, "oracle_client_vernum", oci8_s_oracle_client_vernum, 0);
if (have_OCIMessageOpen && have_OCIMessageGet) {
rb_define_singleton_method(cOCI8, "error_message", oci8_s_error_message, 1);
}
rb_define_private_method(cOCI8, "parse_connect_string", oci8_parse_connect_string, 1);
rb_define_method(cOCI8, "initialize", oci8_svcctx_initialize, -1);
rb_define_method(cOCI8, "logoff", oci8_svcctx_logoff, 0);
rb_define_method(cOCI8, "parse", oci8_svcctx_parse, 1);
rb_define_method(cOCI8, "commit", oci8_commit, 0);
rb_define_method(cOCI8, "rollback", oci8_rollback, 0);
rb_define_method(cOCI8, "non_blocking?", oci8_non_blocking_p, 0);
rb_define_method(cOCI8, "non_blocking=", oci8_set_non_blocking, 1);
rb_define_method(cOCI8, "autocommit?", oci8_autocommit_p, 0);
rb_define_method(cOCI8, "autocommit=", oci8_set_autocommit, 1);
rb_define_method(cOCI8, "long_read_len", oci8_long_read_len, 0);
rb_define_method(cOCI8, "long_read_len=", oci8_set_long_read_len, 1);
rb_define_method(cOCI8, "break", oci8_break, 0);
rb_define_method(cOCI8, "prefetch_rows=", oci8_set_prefetch_rows, 1);
rb_define_private_method(cOCI8, "oracle_server_vernum", oci8_oracle_server_vernum, 0);
rb_define_method(cOCI8, "ping", oci8_ping, 0);
rb_define_method(cOCI8, "client_identifier=", oci8_set_client_identifier, 1);
rb_define_method(cOCI8, "module=", oci8_set_module, 1);
rb_define_method(cOCI8, "action=", oci8_set_action, 1);
rb_define_method(cOCI8, "client_info=", oci8_set_client_info, 1);
return cOCI8;
}
开发者ID:Vachman,项目名称:STMT,代码行数:51,代码来源:oci8.c
示例16: Init_oci8_connection_pool
void Init_oci8_connection_pool(VALUE cOCI8)
{
#if 0
cOCIHandle = rb_define_class("OCIHandle", rb_cObject);
cOCI8 = rb_define_class("OCI8", cOCIHandle);
cOCIConnectionPool = rb_define_class_under(cOCI8, "ConnectionPool", cOCIHandle);
#endif
cOCIConnectionPool = oci8_define_class_under(cOCI8, "ConnectionPool", &oci8_cpool_class);
rb_define_private_method(cOCIConnectionPool, "initialize", oci8_cpool_initialize, -1);
rb_define_method(cOCIConnectionPool, "reinitialize", oci8_cpool_reinitialize, 3);
rb_define_private_method(cOCIConnectionPool, "pool_name", oci8_cpool_pool_name, 0);
}
开发者ID:adanmayer,项目名称:ruby-oci8,代码行数:14,代码来源:connection_pool.c
示例17: init_Johnson_SpiderMonkey_Runtime
void init_Johnson_SpiderMonkey_Runtime(VALUE spidermonkey)
{
VALUE klass = rb_define_class_under(spidermonkey, "Runtime", rb_cObject);
rb_define_alloc_func(klass, allocate);
rb_define_private_method(klass, "initialize_native", initialize_native, 1);
rb_define_method(klass, "global", global, 0);
rb_define_method(klass, "debugger=", set_debugger, 1);
rb_define_method(klass, "gc_zeal=", set_gc_zeal, 1);
rb_define_method(klass, "evaluate_compiled_script", evaluate_compiled_script, 1);
rb_define_private_method(klass, "native_compile", native_compile, 3);
rb_define_private_method(klass, "set_trap", set_trap, 3);
}
开发者ID:ripta,项目名称:johnson,代码行数:14,代码来源:runtime.c
示例18: init_xml_schema
void init_xml_schema()
{
VALUE nokogiri = rb_define_module("Nokogiri");
VALUE xml = rb_define_module_under(nokogiri, "XML");
VALUE klass = rb_define_class_under(xml, "Schema", rb_cObject);
cNokogiriXmlSchema = klass;
rb_define_singleton_method(klass, "read_memory", read_memory, 1);
rb_define_singleton_method(klass, "from_document", from_document, 1);
rb_define_private_method(klass, "validate_document", validate_document, 1);
rb_define_private_method(klass, "validate_file", validate_file, 1);
}
开发者ID:AndreasKrueger,项目名称:nokogiri,代码行数:14,代码来源:xml_schema.c
示例19: Init_phuby
void Init_phuby()
{
mPhuby = rb_define_module("Phuby");
/* FIXME: This belongs in it's own .c file */
cPhubyRuntime = rb_define_class_under(mPhuby, "Runtime", rb_cObject);
rb_define_method(cPhubyRuntime, "start", start, 0);
rb_define_method(cPhubyRuntime, "stop", stop, 0);
rb_define_method(cPhubyRuntime, "[]", get, 1);
rb_define_method(cPhubyRuntime, "[]=", set, 2);
rb_define_private_method(cPhubyRuntime, "native_eval", native_eval, 2);
rb_define_private_method(cPhubyRuntime, "native_eval_io", native_eval_io, 2);
}
开发者ID:Serabe,项目名称:phuby,代码行数:15,代码来源:phuby.c
示例20: rbqml_init_engine
void rbqml_init_engine() {
rb_require("qml/errors");
VALUE mQML = rb_define_module("QML");
rbqml_cEngine = rb_define_class_under(mQML, "Engine", rb_cObject);
rb_define_alloc_func(rbqml_cEngine, &engine_alloc);
rb_define_private_method(rbqml_cEngine, "initialize", engine_initialize, 0);
rb_define_method(rbqml_cEngine, "add_import_path", engine_add_import_path, 1);
rb_define_private_method(rbqml_cEngine, "evaluate_impl", engine_evaluate, 3);
rb_define_method(rbqml_cEngine, "new_array", engine_new_array, 1);
rb_define_method(rbqml_cEngine, "new_object", engine_new_object, 0);
rb_define_method(rbqml_cEngine, "collect_garbage", engine_collect_garbage, 0);
}
开发者ID:skimura0,项目名称:ruby-qml,代码行数:15,代码来源:engine.c
注:本文中的rb_define_private_method函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论