// read documents in a file, using the document buffer given as argument // (can be BoWDocument* or BoWDocumentST*) void readDocuments(istream& fileIn, ostream& out) { while (! fileIn.eof()) { // enum type with small number of values coded on one byte; BoWBlocType blocType; fileIn >> blocType; if (blocType==DOCUMENT_PROPERTIES_BLOC) { Lima::Common::Misc::DocumentProperties props; props.read(fileIn); props.write(out); fileIn >> blocType; } BoWText text; while (blocType==BOW_TEXT_BLOC) { text.read(fileIn); if (fileIn.eof()) break; fileIn >> blocType; } text.write(out); }