summaryrefslogtreecommitdiff
path: root/TemplateFactory.cpp
diff options
context:
space:
mode:
authorLywx <kiritodev01@gmail.com>2024-03-20 21:17:11 -0600
committerGitHub <noreply@github.com>2024-03-20 21:17:11 -0600
commitf0c70f855a892ca7dc21cee4b4037dad983adb8f (patch)
treef15cc271b00166476a2e7b780e50d911770a7316 /TemplateFactory.cpp
parent8465919ab7aba6cfde7d25ad1731673e5da01642 (diff)
Auto pad and overlap detection (#47)
* Fully implemented pad and overlap detection * Cleaned code, fixed pad generation and added alignment * Added debug size on pads
Diffstat (limited to 'TemplateFactory.cpp')
-rw-r--r--TemplateFactory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/TemplateFactory.cpp b/TemplateFactory.cpp
index 60e03fc..811231b 100644
--- a/TemplateFactory.cpp
+++ b/TemplateFactory.cpp
@@ -6,29 +6,29 @@
#include "utils/TorchUtils.h"
TypeData::TypeData(uint32_t data): mData(data) {
-
+
}
-void TypeHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
+ExportResult TypeHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
const auto symbol = GetSafeNode(node, "symbol", entryName);
if(Companion::Instance->IsOTRMode()){
write << "static const char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\n";
- return;
+ return std::nullopt;
}
write << "extern Type " << symbol << ";\n";
// write << "extern Type " << symbol << "[];\n";
}
-void TypeCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
+ExportResult TypeCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
const auto symbol = GetSafeNode(node, "symbol", entryName);
const auto offset = GetSafeNode<uint32_t>(node, "offset");
auto data = std::static_pointer_cast<TypeData>(raw);
-
+
}
-void TypeBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
+ExportResult TypeBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) {
}