Skip to content

Commit b69717e

Browse files
committed
feat: export class size
1 parent 429a448 commit b69717e

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/dumpers/schemas/json_exporter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ void DumpClasses(const std::vector<IntermediateSchemaClass>& classes, json& clas
153153
json classObj;
154154
classObj["name"] = intermediateClass.name;
155155
classObj["module"] = intermediateClass.module;
156+
classObj["size"] = intermediateClass.size;
156157

157158
auto classMetadataArr = SerializeMetadataArray(intermediateClass.metadata);
158159
if (classMetadataArr.size())

src/main/dumpers/schemas/schemas.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ void DumpClasses(CSchemaSystemTypeScope* typeScope, std::vector<IntermediateSche
4343
IntermediateSchemaClass schemaClass{
4444
.name = std::string(classInfo->m_pszName),
4545
.module = std::string(classInfo->m_pszProjectName),
46+
.size = classInfo->m_nSize
4647
};
4748

4849
spdlog::trace("Dumping class: '{}'", classInfo->m_pszName);

src/main/dumpers/schemas/schemas.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct IntermediateSchemaClass
5050
{
5151
std::string name;
5252
std::string module;
53+
int32_t size;
5354
std::vector<IntermediateMetadata> metadata;
5455
std::vector<IntermediateSchemaClassParent> parents;
5556
std::vector<IntermediateSchemaClassField> fields;

0 commit comments

Comments
 (0)