Fetching modules and their names
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#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()
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user