/* Chrysalide - Outil d'analyse de fichiers binaires * generator-int.h - définitions internes propres aux intermédiaires de génération de lignes à partir de bribres de texte * * Copyright (C) 2016-2024 Cyrille Bagard * * This file is part of Chrysalide. * * Chrysalide 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. * * Chrysalide 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 Chrysalide. If not, see . */ #ifndef _GLIBEXT_GENERATOR_INT_H #define _GLIBEXT_GENERATOR_INT_H #include "generator.h" /* Indique le nombre de ligne prêtes à être générées. */ typedef size_t (* count_tokgen_lines_fc) (const GTokenGenerator *); /* Renseigne sur les propriétés liées à un générateur. */ typedef BufferLineFlags (* get_tokgen_flags_fc) (const GTokenGenerator *, size_t, size_t); /* Imprime dans une ligne de rendu le contenu représenté. */ typedef void (* populate_tokgen_line_fc) (const GTokenGenerator *, size_t, size_t, GBufferLine *, void *); #if 0 /* Retrouve l'emplacement correspondant à une position donnée. */ typedef void (* compute_tokgen_fc) (const GTokenGenerator *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ typedef int (* contain_tokgen_fc) (const GTokenGenerator *, size_t, size_t, const GLineCursor *); #endif /* Intermédiaire pour la génération de lignes (interface) */ struct _GTokenGeneratorInterface { GTypeInterface base_iface; /* A laisser en premier */ count_tokgen_lines_fc count; /* Décompte des lignes */ get_tokgen_flags_fc get_flags; /* Récupération des drapeaux */ populate_tokgen_line_fc populate; /* Impression d'une ligne */ #if 0 compute_tokgen_fc compute; /* Calcul d'emplacement */ contain_tokgen_fc contain; /* Inclusion de positions */ #endif }; #endif /* _GLIBEXT_GENERATOR_INT_H */