2025-02-24 22:35:47 -06:00
|
|
|
#pragma once
|
|
|
|
|
#include <sword/swmodule.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
#include "rust/cxx.h"
|
|
|
|
|
|
|
|
|
|
class Module {
|
|
|
|
|
private:
|
|
|
|
|
sword::SWModule* module;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Module(sword::SWModule* module) : module(module) { };
|
|
|
|
|
|
|
|
|
|
rust::String get_name() const {
|
|
|
|
|
return rust::String(this->module->getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rust::String strip_text() {
|
|
|
|
|
return std::string(
|
|
|
|
|
(const char*) this->module->stripText()
|
|
|
|
|
);
|
|
|
|
|
}
|
2025-02-25 00:06:12 -06:00
|
|
|
|
|
|
|
|
void set_key_text(const rust::String& keyText) {
|
|
|
|
|
this->module->setKeyText(std::string(keyText).c_str());
|
|
|
|
|
}
|
2025-02-24 22:35:47 -06:00
|
|
|
};
|