/* SimGrid Ruby bindings */
-/* Copyright (c) 2010, the SimGrid team. All right reserved. */
+/* Copyright (c) 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
extern const char*xbt_ctx_factory_to_use; /*Hack: let msg load directly the right factory */
typedef VALUE(*rb_meth)(ANYARGS);
-void Init_simgrid_ruby() {
+void Init_libsimgrid() {
xbt_ctx_factory_to_use = "ruby";
// Modules
//Task Methods
rb_define_module_function(rb_task,"new",(rb_meth)rb_task_new,3);
- rb_define_module_function(rb_task,"setData",(rb_meth)rb_task_set_data,2);
- rb_define_module_function(rb_task,"data",(rb_meth)rb_task_get_data,1);
rb_define_module_function(rb_task,"compSize",(rb_meth)rb_task_comp,1);
rb_define_module_function(rb_task,"name",(rb_meth)rb_task_name,1);
rb_define_module_function(rb_task,"execute",(rb_meth)rb_task_execute,1);
rb_define_module_function(rb_task,"listenFromHost",(rb_meth)rb_task_listen_host,3);
rb_define_module_function(rb_task,"setPriority",(rb_meth)rb_task_set_priority,2);
rb_define_module_function(rb_task,"cancel",(rb_meth)rb_task_cancel,1);
+ rb_define_module_function(rb_task,"hasData",(rb_meth)rb_task_has_data,1);
+ rb_define_module_function(rb_task,"setData",(rb_meth)rb_task_set_data,2);
+ rb_define_module_function(rb_task,"data",(rb_meth)rb_task_get_data,1);
//Host Methods
rb_define_module_function(rb_host,"getByName",(rb_meth)rb_host_get_by_name,1);
rb_define_module_function(rb_host,"number",(rb_meth)rb_host_number,0);
rb_define_module_function(rb_host,"isAvail",(rb_meth)rb_host_is_avail,1);
rb_define_module_function(rb_host,"getHostProcess",(rb_meth)rb_host_process,1);
-}
\ No newline at end of file
+ rb_define_module_function(rb_host,"all",(rb_meth)rb_host_get_all_hosts,0);
+}