[Ellipsis] Implement parsing of espm records: SHOU, SLGM, WOOP, WTHR. #2113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Issue: resolves #2109
View Plan Details
Step 1: Define SHOU class in SHOU.h
Path:
libespm/include/libespm/SHOU.h
Create
SHOU.h
inlibespm/include/libespm/
. Defineclass SHOU : public RecordHeader
with aData
struct andGetData
method, similar toSLGM
.Step 2: Implement SHOU.cpp
Path:
libespm/src/SHOU.cpp
In
libespm/src/SHOU.cpp
, implementSHOU::GetData
usingRecordHeaderAccess::IterateFields
, similar toSLGM.cpp
.Step 3: Define SLGM class in SLGM.h
Path:
libespm/include/libespm/SLGM.h
Create
SLGM.h
inlibespm/include/libespm/
. Defineclass SLGM : public RecordHeader
with aData
struct andGetData
method, similar toSHOU
.Step 4: Implement SLGM.cpp
Path:
libespm/src/SLGM.cpp
In
libespm/src/SLGM.cpp
, implementSLGM::GetData
usingRecordHeaderAccess::IterateFields
, similar toSHOU.cpp
.Step 5: Define WOOP class in WOOP.h
Path:
libespm/include/libespm/WOOP.h
Create
WOOP.h
inlibespm/include/libespm/
. Defineclass WOOP : public RecordHeader
with aData
struct andGetData
method, similar toSLGM
.Step 6: Implement WOOP.cpp
Path:
libespm/src/WOOP.cpp
In
libespm/src/WOOP.cpp
, implementWOOP::GetData
usingRecordHeaderAccess::IterateFields
, similar toSLGM.cpp
.Step 7: Define WTHR class in WTHR.h
Path:
libespm/include/libespm/WTHR.h
Create
WTHR.h
inlibespm/include/libespm/
. Defineclass WTHR : public RecordHeader
with aData
struct andGetData
method, similar toSLGM
.Step 8: Implement WTHR.cpp
Path:
libespm/src/WTHR.cpp
In
libespm/src/WTHR.cpp
, implementWTHR::GetData
usingRecordHeaderAccess::IterateFields
, similar toSLGM.cpp
.Step 9: Add includes to Records.h
Path:
libespm/include/libespm/Records.h
Add
#include "SHOU.h"
,#include "SLGM.h"
,#include "WOOP.h"
,#include "WTHR.h"
tolibespm/include/libespm/Records.h
.Step 10: Add tests for new records
Path:
unit/EspmTest.cpp
In
unit/EspmTest.cpp
, add test cases forSHOU
,SLGM
,WOOP
, andWTHR
following existing test patterns.Implementation
Define SHOU class in SHOU.h
Defined the SHOU class in SHOU.h with a Data struct and GetData method, similar to SLGM.Implement SHOU.cpp
Implemented SHOU::GetData in SHOU.cpp using RecordHeaderAccess::IterateFields, similar to SLGM::GetData.Define SLGM class in SLGM.h
Defined the SLGM class in SLGM.h with a Data struct and GetData method, similar to SHOU.Implement SLGM.cpp
Implemented SLGM::GetData in SLGM.cpp using RecordHeaderAccess::IterateFields, similar to SHOU::GetData.Define WOOP class in WOOP.h
Defined the WOOP class in WOOP.h with a Data struct and GetData method, similar to SLGM.Implement WOOP.cpp
Implemented WOOP::GetData in WOOP.cpp using RecordHeaderAccess::IterateFields, similar to SHOU and SLGM.Define WTHR class in WTHR.h
Defined the WTHR class in WTHR.h with a Data struct and GetData method, similar to the other classes.Implement WTHR.cpp
Implemented WTHR::GetData in WTHR.cpp using RecordHeaderAccess::IterateFields, similar to the other classes.Add includes to Records.h
Added include statements for SHOU, SLGM, WOOP, and WTHR in Records.h in alphabetical order.Add tests for new records
Implemented test cases for SHOU, SLGM, WOOP, and WTHR in EspmTest.cpp using placeholder IDs. The tests follow the existing pattern of looking up records by ID, checking their type, and verifying their data using REQUIRE statements.Something look wrong? If this PR isn't quite right, you can tag @ellipsis-dev to ask for changes, or add more details to the source issue and ask for another try. For more information, check the documentation.