mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Dump structured data def reserved count
This commit is contained in:
parent
51003e5f6d
commit
040f945009
@ -53,7 +53,7 @@ void StructuredDataDefDumper::EndVersion()
|
|||||||
m_flags.m_empty_line_before_block = false;
|
m_flags.m_empty_line_before_block = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StructuredDataDefDumper::BeginEnum(const std::string& enumName, const size_t enumEntryCount)
|
void StructuredDataDefDumper::BeginEnum(const std::string& enumName, const size_t enumEntryCount, size_t enumReservedEntryCount)
|
||||||
{
|
{
|
||||||
assert(m_flags.m_in_version);
|
assert(m_flags.m_in_version);
|
||||||
assert(m_block == Block::BLOCK_NONE);
|
assert(m_block == Block::BLOCK_NONE);
|
||||||
@ -65,7 +65,13 @@ void StructuredDataDefDumper::BeginEnum(const std::string& enumName, const size_
|
|||||||
m_stream << "\n";
|
m_stream << "\n";
|
||||||
|
|
||||||
Indent();
|
Indent();
|
||||||
m_stream << "enum " << enumName << "\n";
|
if (enumReservedEntryCount != enumEntryCount)
|
||||||
|
m_stream << "enum(" << enumReservedEntryCount << ") ";
|
||||||
|
else
|
||||||
|
m_stream << "enum ";
|
||||||
|
m_stream << enumName;
|
||||||
|
|
||||||
|
m_stream << "\n";
|
||||||
|
|
||||||
Indent();
|
Indent();
|
||||||
m_stream << "{\n";
|
m_stream << "{\n";
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
void BeginVersion(int version);
|
void BeginVersion(int version);
|
||||||
void EndVersion();
|
void EndVersion();
|
||||||
|
|
||||||
void BeginEnum(const std::string& enumName, size_t enumEntryCount);
|
void BeginEnum(const std::string& enumName, size_t enumEntryCount, size_t enumReservedEntryCount);
|
||||||
void EndEnum();
|
void EndEnum();
|
||||||
void WriteEnumEntry(const std::string& entryName, size_t entryValue);
|
void WriteEnumEntry(const std::string& entryName, size_t entryValue);
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "Dumping/StructuredDataDef/StructuredDataDefDumper.h"
|
#include "Dumping/StructuredDataDef/StructuredDataDefDumper.h"
|
||||||
|
|
||||||
@ -115,7 +116,7 @@ void AssetDumperStructuredDataDefSet::DumpEnum(StructuredDataDefDumper& dumper,
|
|||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << "ENUM_" << enumIndex;
|
ss << "ENUM_" << enumIndex;
|
||||||
|
|
||||||
dumper.BeginEnum(ss.str(), static_cast<size_t>(_enum->entryCount));
|
dumper.BeginEnum(ss.str(), static_cast<size_t>(_enum->entryCount), static_cast<size_t>(_enum->reservedEntryCount));
|
||||||
|
|
||||||
for (auto i = 0; i < _enum->entryCount; i++)
|
for (auto i = 0; i < _enum->entryCount; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user