2025-02-25 10:46:07 -06:00
|
|
|
#include "module.h"
|
|
|
|
|
|
|
|
|
|
namespace sword_rs {
|
|
|
|
|
Module::Module(sword::SWModule* module) : module(module) { }
|
|
|
|
|
|
2025-02-25 15:36:58 -06:00
|
|
|
void Module::decrement() {
|
|
|
|
|
this->module->decrement();
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-25 10:46:07 -06:00
|
|
|
rust::String Module::get_name() const {
|
|
|
|
|
return rust::String(this->module->getName());
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-25 15:36:58 -06:00
|
|
|
void Module::increment() {
|
|
|
|
|
this->module->increment();
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-25 14:55:39 -06:00
|
|
|
rust::String Module::render_text() {
|
|
|
|
|
return std::string(
|
|
|
|
|
(const char*) this->module->renderText()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Module::set_key_text(const rust::String& keyText) {
|
|
|
|
|
this->module->setKeyText(std::string(keyText).c_str());
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-25 10:46:07 -06:00
|
|
|
rust::String Module::strip_text() {
|
|
|
|
|
return std::string(
|
|
|
|
|
(const char*) this->module->stripText()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|