-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#ifndef STRUCTT0X11_HPP | ||
#define STRUCTT0X11_HPP | ||
|
||
#include <cstdint> | ||
#include <memory> | ||
#include <optional> | ||
#include <ostream> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include <fmt/core.h> | ||
#include <nameof.hpp> | ||
|
||
#include "General.hpp" | ||
#include "Structures/StructT0x10.hpp" | ||
|
||
namespace OOCP | ||
{ | ||
class StructT0x11 : public StructT0x10 | ||
{ | ||
public: | ||
StructT0x11(StreamContext& aCtx) | ||
: StructT0x10{aCtx} | ||
{ | ||
} | ||
|
||
|
||
std::string to_string() const override; | ||
|
||
// void accept(Visitor& aVisitor) const override | ||
// { | ||
// aVisitor.visit(*this); | ||
// } | ||
|
||
Structure getObjectType() const override | ||
{ | ||
return Structure::T0x11; | ||
} | ||
}; | ||
|
||
[[maybe_unused]] static std::string to_string(const StructT0x11& aObj) | ||
{ | ||
std::string str; | ||
|
||
str += fmt::format("{}:\n", nameof::nameof_type<decltype(aObj)>()); | ||
|
||
str += fmt::format("{}symbolDisplayProps:\n", indent(1)); | ||
for(size_t i = 0u; i < aObj.symbolDisplayProps.size(); ++i) | ||
{ | ||
if(aObj.symbolDisplayProps[i]) | ||
{ | ||
str += indent(fmt::format("[{}]: {}", i, aObj.symbolDisplayProps[i]->to_string()), 2); | ||
} | ||
} | ||
|
||
return str; | ||
} | ||
|
||
inline std::string StructT0x11::to_string() const | ||
{ | ||
return OOCP::to_string(*this); | ||
} | ||
|
||
[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructT0x11& aObj) | ||
{ | ||
aOs << to_string(aObj); | ||
|
||
return aOs; | ||
} | ||
} // namespace OOCP | ||
|
||
#endif // STRUCTT0X11_HPP |