summaryrefslogtreecommitdiff
path: root/src/analysis/prototype.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/prototype.h')
-rw-r--r--src/analysis/prototype.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/analysis/prototype.h b/src/analysis/prototype.h
new file mode 100644
index 0000000..f86d541
--- /dev/null
+++ b/src/analysis/prototype.h
@@ -0,0 +1,69 @@
+
+/* OpenIDA - Outil d'analyse de fichiers binaires
+ * prototype.h - prototypes pour la manipulation des prototypes de fonctions et de variables
+ *
+ * Copyright (C) 2008 Cyrille Bagard
+ *
+ * This file is part of OpenIDA.
+ *
+ * OpenIDA is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * OpenIDA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ANALYSIS_PROTOTYPE_H
+#define _ANALYSIS_PROTOTYPE_H
+
+
+#include "variable.h"
+
+
+
+/* Type de routine traitée */
+typedef enum _RoutineType
+{
+ RTT_CLASSIC, /* Fonction ou méthode */
+ RTT_CONSTRUCTOR, /* Constructeur */
+ RTT_DESTRUCTOR /* Destructeur */
+
+} RoutineType;
+
+
+/* Variable représentant un prototype de routine */
+typedef struct _bin_routine bin_routine;
+
+
+/* Crée une représentation de routine. */
+bin_routine *create_binary_routine(void);
+
+/* Supprime une représentation de routine de la mémoire. */
+void delete_binary_routine(bin_routine *);
+
+/* Définit le type d'une routine. */
+void set_binary_routine_type(bin_routine *, RoutineType);
+
+/* Définit le nom humain d'une routine. */
+void set_binary_routine_name(bin_routine *, char *);
+
+/* Définit le type de retour d'une routine. */
+void set_binary_routine_return_type(bin_routine *, variable *);
+
+/* Ajoute un argument à une routine. */
+void add_arg_to_binary_routine(bin_routine *, variable *);
+
+/* Décrit le prototype de la routine sous forme de caractères. */
+char *routine_to_string(const bin_routine *);
+
+
+
+#endif /* _ANALYSIS_PROTOTYPE_H */