Bonjour,
J'ai ecrit un petit programme pour parser un fichier XML (en utilisant Xerces C) et qui le transforme en graphe (en utilisant Boost).
Le probleme est que lorsque j'ajoute les aretes (avec la fonction add_edge), a un moment en plein milieu de mon graphe j'ai 4 aretes qui refusent de s'ajouter en lancant une exception vector::_M_fill_insert.
Pour info, j'ai defini mon graphe comme ceci:
J'ai essaye de chercher sur Google des infos sur cette exception, mais il n'y a strictement rien (a part une page sur des erreurs de l'iPhone
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 typedef struct { unsigned char inputNbs[MAX_SELECTION_CHOICES]; unsigned char* inputNames[MAX_SELECTION_CHOICES]; unsigned char choice; } selector; typedef struct { unsigned short div[MAX_DIVISION_CHOICES]; } divisor; typedef struct { unsigned int nbOutputs; } repeater; typedef struct { unsigned char outputNbs[MAX_INVSELECTION_CHOICES]; unsigned char* outputNames[MAX_INVSELECTION_CHOICES]; unsigned char choice; } invSelector; typedef struct { unsigned char* name; } clockSource; typedef union { selector sel; divisor div; repeater rep; invSelector invSel; clockSource clkSrc; } nodeType; typedef boost::property<boost::edge_name_t, XERCES_STD_QUALIFIER string> EdgeNameProperty; typedef boost::property<boost::vertex_name_t, XERCES_STD_QUALIFIER string, boost::property<boost::vertex_rank_t, nodeType> > VertexProperties; typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, VertexProperties, EdgeNameProperty> Graph;)
J'ai egalement trouve que _M_fill_insert est une methode protegee de la classe std::vector... mais ca ne m'avance pas beaucoup.
Donc, si quelqu'un a une petite idee, je lui en serais tres reconnaissante.
Merci.
Partager