Пример #1
0
 void MapWriter::writeEntity(const Model::Entity& entity, std::ostream& stream) {
     writeEntityHeader(entity, stream);
     const Model::BrushList& brushes = entity.brushes();
     for (unsigned int i = 0; i < brushes.size(); i++)
         writeBrush(*brushes[i], stream);
     writeEntityFooter(stream);
 }
Пример #2
0
 size_t MapWriter::writeEntity(Model::Entity& entity, const size_t lineNumber, FILE* stream) {
     size_t lineCount = writeEntityHeader(entity, stream);
     const Model::BrushList& brushes = entity.brushes();
     for (unsigned int i = 0; i < brushes.size(); i++)
         lineCount += writeBrush(*brushes[i], lineNumber + lineCount, stream);
     lineCount += writeEntityFooter(stream);
     entity.setFilePosition(lineNumber, lineCount);
     return lineCount;
 }