#include #include "Handle.h" #include "String.h" void GeneDeroul(Handle * h, String * & l1, String * & l2) { int count; list result; String r1, r2; count = 0; while (1) { (*h) >> r1; (*h) >> r2; if ((r1 == "") && (r2 == "")) break; result.push_back(r1); result.push_back(r2); count++; } l1 = new String[count + 1]; l2 = new String[count + 1]; for (int i = 0; i < count; i++) { r1 = result.front(); result.pop_front(); r2 = result.front(); result.pop_front(); l1[i] = r1; l2[i] = r2; } l1[count] = ""; l2[count] = ""; } int GeneList(Handle * h, int nbcol, String * & l) { int nblig; list result; String r; bool is_null; nblig = 0; while (1) { is_null = true; for (int i = 0; i < nbcol; i++) { (*h) >> r; result.push_back(r); if (r != "") is_null = false; } if (is_null) break; nblig++; } l = new String[nbcol * nblig + 1]; for (int i = 0; i < (nbcol * nblig); i++) { r = result.front(); result.pop_front(); l[i] = r; } l[nbcol * nblig] = ""; return nblig; }