summaryrefslogtreecommitdiff
path: root/src/arch/operand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/operand.h')
-rw-r--r--src/arch/operand.h64
1 files changed, 43 insertions, 21 deletions
diff --git a/src/arch/operand.h b/src/arch/operand.h
index 234ee64..72a1b56 100644
--- a/src/arch/operand.h
+++ b/src/arch/operand.h
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* operand.h - prototypes pour la gestion générique des opérandes
*
- * Copyright (C) 2008-2020 Cyrille Bagard
+ * Copyright (C) 2008-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -25,20 +25,16 @@
#define _ARCH_OPERAND_H
-#include <glib-object.h>
-
+#include <stdbool.h>
-#include "../common/packed.h"
-#include "../format/format.h"
-#include "../glibext/bufferline.h"
+#include "../glibext/helpers.h"
-/* ------------------------ DEFINITION D'OPERANDE QUELCONQUE ------------------------ */
+#define G_TYPE_ARCH_OPERAND (g_arch_operand_get_type())
-/* Depuis "../analysis/binary.h" : description de fichier binaire */
-typedef struct _GLoadedBinary GLoadedBinary;
+DECLARE_GTYPE(GArchOperand, g_arch_operand, G, ARCH_OPERAND);
/* Indications supplémentaires liées aux opérandes */
@@ -58,6 +54,41 @@ typedef enum _ArchOperandFlag
#define AOF_USER_FLAG(n) (1 << (AOF_USER_BIT + n))
+/* Ajoute une information complémentaire à un opérande. */
+bool g_arch_operand_set_flag(GArchOperand *, ArchOperandFlag);
+
+/* Retire une information complémentaire à un opérande. */
+bool g_arch_operand_unset_flag(GArchOperand *, ArchOperandFlag);
+
+/* Détermine si un opérande possède un fanion particulier. */
+bool g_arch_operand_has_flag(const GArchOperand *, ArchOperandFlag);
+
+/* Fournit les particularités de l'opérande. */
+ArchOperandFlag g_arch_operand_get_flags(const GArchOperand *);
+
+
+
+
+#if 0
+
+
+#include <glib-object.h>
+
+
+#include "../common/packed.h"
+#include "../format/format.h"
+#include "../glibext/bufferline.h"
+
+
+
+/* ------------------------ DEFINITION D'OPERANDE QUELCONQUE ------------------------ */
+
+
+/* Depuis "../analysis/binary.h" : description de fichier binaire */
+typedef struct _GLoadedBinary GLoadedBinary;
+
+
+
#define G_TYPE_ARCH_OPERAND g_arch_operand_get_type()
#define G_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_ARCH_OPERAND, GArchOperand))
#define G_IS_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_ARCH_OPERAND))
@@ -95,18 +126,6 @@ char *g_arch_operand_build_tooltip(const GArchOperand *, const GLoadedBinary *);
#endif
-/* Ajoute une information complémentaire à un opérande. */
-bool g_arch_operand_set_flag(GArchOperand *, ArchOperandFlag);
-
-/* Retire une information complémentaire à un opérande. */
-bool g_arch_operand_unset_flag(GArchOperand *, ArchOperandFlag);
-
-/* Détermine si un opérande possède un fanion particulier. */
-bool g_arch_operand_has_flag(const GArchOperand *, ArchOperandFlag);
-
-/* Fournit les particularités de l'opérande. */
-ArchOperandFlag g_arch_operand_get_flags(const GArchOperand *);
-
/* --------------------- TRANSPOSITIONS VIA CACHE DES OPERANDES --------------------- */
@@ -116,5 +135,8 @@ ArchOperandFlag g_arch_operand_get_flags(const GArchOperand *);
typedef struct _GAsmStorage GAsmStorage;
+#endif
+
+
#endif /* _ARCH_OPERAND_H */