#include "ZoneHeaderWriterAbstract.h"
#include "ThirdPartyHeadersBegin.h"
#include <boost/assign.hpp>
#include <boost/foreach.hpp>
#include "ThirdPartyHeadersEnd.h"
#include "AltTecUtil.h"
#include "FileWriterInterface.h"
#include "ItemSetIterator.h"
#include "SzlFileLoader.h"
#include "writeValueArray.h"
namespace tecplot { namespace ___3933 { ZoneHeaderWriterAbstract::ZoneHeaderWriterAbstract( ItemSetIterator&   varIter, ___4636        zone, ___4636        ___341, ___37&        ___36, std::string const& zoneMarkerLabel  , uint32_t           zoneMarker  , std::string const& zoneNumberLabel  , std::string const& zoneNumberSuffix  ) : m_varIter(varIter) , ___2677(zone) , m_baseZone(___341) , ___2337(___36) , m_zoneMarkerLabel(zoneMarkerLabel) , m_zoneMarker(zoneMarker) , m_zoneNumberLabel(zoneNumberLabel) , m_zoneNumberSuffix(zoneNumberSuffix) {} ZoneHeaderWriterAbstract::~ZoneHeaderWriterAbstract() {} void ZoneHeaderWriterAbstract::setMarkerAndLabels( std::string const& zoneMarkerLabel, uint32_t zoneMarker, std::string const& zoneNumberLabel, std::string const& zoneNumberSuffix) { m_zoneMarkerLabel = zoneMarkerLabel; m_zoneMarker = zoneMarker; m_zoneNumberLabel = zoneNumberLabel; m_zoneNumberSuffix = zoneNumberSuffix; } ___372 ZoneHeaderWriterAbstract::___4565(FileWriterInterface& file, ___3945 const& ___3944) const { REQUIRE(file.___2041()); ___372 ___2039 = ___4226; if (file.___2002()) { ___2039 = writeValue<uint32_t, false, 0>(file, m_zoneMarkerLabel.c_str(), m_zoneMarker) && writeValue<uint32_t, false, 0>(file, m_zoneNumberLabel.c_str(), (___2677 - m_baseZone) + 1); } UInt16Array tagArray; ___2039 = ___2039 && tagArray.alloc(___3944.size()); if (___2039) { size_t numTags = 0; BOOST_FOREACH(___3945::value_type const& ___4314, ___3944) tagArray[numTags++] = ___4314.first; ___2039 = ___2039 && writeValue<uint16_t, false, 0>(file, ___2839, static_cast<uint16_t>(___3944.size())) && ___4563<uint16_t, false, 0>(file, ___3943, ___2745, numTags, &tagArray[0]); } if (___2039) { ___3942 tagDescriptionMap = ___4689; BOOST_FOREACH(___3945::value_type const& ___4314, ___3944) ___2039 = ___2039 && writeValue<uint64_t, true, 0>(file, tagDescriptionMap[___4314.first].c_str(), ___4314.second); } ENSURE(VALID_BOOLEAN(___2039)); return ___2039; } uint64_t ZoneHeaderWriterAbstract::zoneHeaderTagsSizeInFile(uint16_t numTags, bool ___2002) const { uint64_t ___3358 = 0; if (___2002) ___3358 += 2 * valueSizeInFile<uint32_t, false>(___2002); ___3358 += valueSizeInFile<uint16_t, false>(___2002); ___3358 += arraySizeInFile<uint16_t, false>(static_cast<size_t>(numTags), ___2002); ___3358 += numTags * valueSizeInFile<uint64_t, true  >(___2002); return ___3358; } std::string ZoneHeaderWriterAbstract::appendZoneSuffix(std::string const& str) const { return str + m_zoneNumberSuffix; } }}
