#include "SZLOrderedZoneHeaderWriter.h"
#include "ThirdPartyHeadersBegin.h"
#include <boost/assign.hpp>
#include "ThirdPartyHeadersEnd.h"
#include "AltTecUtil.h"
#include "fileStuff.h"
#include "IJKZoneInfo.h"
#include "ItemSetIterator.h"
#include "writeValueArray.h"
namespace tecplot { namespace ___3933 { SZLOrderedZoneHeaderWriter::SZLOrderedZoneHeaderWriter( ItemSetIterator&    varIter, ___4636         zone, ___4636         ___341, ___37&         ___36, ___1881 const&  ijkZoneInfo, ___1392 const& varFileLocs) : ZoneHeaderWriterAbstract(varIter, zone, ___341, ___36) , m_ijkZoneInfo(ijkZoneInfo) , ___2673(varFileLocs) {} SZLOrderedZoneHeaderWriter::~SZLOrderedZoneHeaderWriter() {} uint64_t SZLOrderedZoneHeaderWriter::sizeInFile(bool ___2002) const { uint64_t ___3358 = zoneHeaderTagsSizeInFile(3, ___2002); size_t numVarsToWrite = static_cast<size_t>(m_varIter.___2812()); ___3358 += arraySizeInFile<uint64_t, true  >(numVarsToWrite, ___2002); return ___3358; } ___372 SZLOrderedZoneHeaderWriter::write(FileWriterInterface& fileWriter) const { REQUIRE(fileWriter.___2041()); ___4352 const numVarsToWrite = m_varIter.___2812(); REQUIRE(___2673.size() == uint64_t(numVarsToWrite)); ___372 ___2039 = ___4226; try { ___3945 ___3944 = boost::assign::map_list_of<uint16_t, uint64_t> (___2784, uint64_t(m_ijkZoneInfo.getNumCszs())) (___2824, uint64_t(m_ijkZoneInfo.getNumNszs())) (___4342, 0); ___1393 headerFileLoc = fileWriter.fileLoc(); ___2039 = ___4565(fileWriter, ___3944); if (___2039) { ___3944[___4342] = fileWriter.fileLoc(); ___2039 = ___4563<uint64_t, true, 0>(fileWriter, appendZoneSuffix(VAR_FILE_LOC_DESCRIPTION).c_str(), ___2677 - m_baseZone, numVarsToWrite, &___2673[0]); } ___1393 endFileLoc = fileWriter.fileLoc(); ___2039 = ___2039 && fileWriter.___3459(headerFileLoc) && ___4565(fileWriter, ___3944) && fileWriter.___3459(endFileLoc); } catch(std::bad_alloc const&) { ___2039 = ___1186("Out of memory while writing zone %d header.", ___2677 + 1); } catch(...) { ___2039 = ___1186("Unrecoverable error while writing zone %d header.", ___2677 + 1); } ENSURE(VALID_BOOLEAN(___2039)); return ___2039; } }}
