diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-05-17 23:12:59 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-05-17 23:12:59 (GMT) |
commit | 73a09734a145722a3bd6199750fad62b46dd9339 (patch) | |
tree | 9e7e6d7a78d27cb5d6d6048ab02cddf4983f6f45 /src/glibext/singleton-int.h | |
parent | a20cf5f374e64c6db50bf33545dc67804e90eabc (diff) |
Dead with singleton instances containing singleton instances.
Diffstat (limited to 'src/glibext/singleton-int.h')
-rw-r--r-- | src/glibext/singleton-int.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/glibext/singleton-int.h b/src/glibext/singleton-int.h index ac31a32..49cfecd 100644 --- a/src/glibext/singleton-int.h +++ b/src/glibext/singleton-int.h @@ -29,17 +29,23 @@ +/* Fournit une liste de candidats embarqués par un candidat. */ +typedef GSingletonCandidate ** (* list_inner_instances_fc) (const GSingletonCandidate *, size_t *); + +/* Met à jour une liste de candidats embarqués par un candidat. */ +typedef void (* update_inner_instances_fc) (GSingletonCandidate *, GSingletonCandidate **, size_t); + /* Fournit l'empreinte d'un candidat à une centralisation. */ typedef guint (* hash_candidate_fc) (const GSingletonCandidate *); /* Détermine si deux candidats à l'unicité sont identiques. */ typedef gboolean (* is_candidate_equal_fc) (const GSingletonCandidate *, const GSingletonCandidate *); -/* Marque un candidat comme traité ou en cours de traitement. */ -typedef void (* mark_candidate_as_processed_fc) (GSingletonCandidate *, bool); +/* Marque un candidat comme figé. */ +typedef void (* set_candidate_ro_fc) (GSingletonCandidate *); -/* Indique si un objet marqué comme unique. */ -typedef bool (* is_candidate_processed_fc) (const GSingletonCandidate *, bool); +/* Indique si le candidat est figé. */ +typedef bool (* is_candidate_ro_fc) (GSingletonCandidate *); /* Instance d'objet visant à être unique (interface) */ @@ -47,11 +53,14 @@ struct _GSingletonCandidateIface { GTypeInterface base_iface; /* A laisser en premier */ + list_inner_instances_fc list_inner; /* Récupération d'internes */ + update_inner_instances_fc update_inner; /* Mise à jour des éléments */ + hash_candidate_fc hash; /* Prise d'empreinte */ is_candidate_equal_fc is_equal; /* Comparaison */ - mark_candidate_as_processed_fc mark; /* Définition de l'état */ - is_candidate_processed_fc is_processed; /* Consultation de l'état */ + set_candidate_ro_fc set_ro; /* Bascule en mode figé */ + is_candidate_ro_fc is_ro; /* Consultation de l'état */ }; |