Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New, proper, module mecanism. Still missing dependency tracking, but already allow...
[simgrid.git] / include / gras / module.h
index 0dfb6fa..df21bc3 100644 (file)
@@ -1,22 +1,21 @@
-/* $Id$ */
 
-/* module - modularize the code                                             */
+#ifndef GRAS_MODULE_H
+#define GRAS_MODULE_H
 
-/* Authors: Martin Quinson                                                  */
-/* Copyright (C) 2004 the Martin Quinson.                                   */
+#include <xbt.h>
 
-/* 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. */
+/* Function users of module should use */
+void gras_module_join(const char *name);
+void gras_module_leave(const char *name);
 
-#ifndef _GRAS_MODULE_H
-#define _GRAS_MODULE_H
 
-typedef struct gras_module_ gras_module_t;
+/* Functions module implementor should use */
+void gras_module_add(const char *name, unsigned int data_size, int *ID,
+                    void_f_void_t  *init_f, void_f_void_t  *exit_f,
+                    void_f_pvoid_t *join_f, void_f_pvoid_t *leave_f) ;
 
-typedef gras_module_t (*gras_module_new_fct_t)(int argc, char **argv);
-typedef int (*gras_module_finalize_fct_t)(void);
 
-void gras_init(int *argc,char **argv);
-void gras_init_defaultlog(int *argc,char **argv, const char *defaultlog);
-void gras_exit(void);
-#endif /* _GRAS_MODULE_H */
+void *gras_moddata_by_id(unsigned int ID);
+
+
+#endif /* GRAS_MODULE_H */