27 using namespace GMap3d;
38 os =
new ofstream(filename.c_str());
40 os =
new ostringstream;
45 int* lasts =
new int[nbLevels];
50 for (i=0; i<nbLevels; ++i)
53 CDynamicCoverageAll it(FMap);
55 for (i=0; it.cont(); ++it, ++i)
56 for (j=0; j<nbLevels; ++j)
61 for (i=0; i<nbLevels; ++i)
62 (*os) << lasts[i] <<
" ";
68 if (! FMap->save(*os, BinaryFormat))
79 res =
new ostringstream;
83 res =
static_cast<ostringstream*
>(os);
94 is =
new ifstream(AStream->str().c_str());
102 is =
new istringstream(AStream->str());
105 int* lasts =
new int[nbLevels];
109 for (i=0; i<nbLevels; ++i)
117 FMap->removeAllDarts();
122 for (i=0; i<nbLevels; ++i)
126 if ( FMap->load(*is, BinaryFormat)==NULL )
128 FMap->removeAllDarts();
134 CDynamicCoverageAll it(FMap);
136 for (n=0; it.cont(); ++it)
139 for (i=0, it.reinit(); it.cont(); ++it, ++i)
140 for (k=0; k<nbLevels; ++k)
141 if (lasts[k] == n-i-1)
147 assert(FMap->checkTopology());
148 assert(FMap->checkEmbeddings(ORBIT_VERTEX, ATTRIBUTE_VERTEX,
true));