With a little help, we now have VerseKey

Went with a basic wrapper that cxx is able to handle for the bridge
between the languages, along with simple wrapper methods
This commit is contained in:
Greg Hellings
2025-06-25 02:30:42 -05:00
parent fc7b3a7ec5
commit c8dd1ce0f0
12 changed files with 919 additions and 10 deletions
+10
View File
@@ -15,6 +15,16 @@ namespace sword_rs {
return rust::String(this->module->getType());
}
VerseKey* Module::get_verse_key() const {
sword::VerseKey* key = dynamic_cast<sword::VerseKey*>(this->module->getKey());
if (key) {
// Create a borrowed VerseKey on the heap - caller must delete but not the inner ptr
VerseKey* result = new VerseKey{key, false};
return result;
}
return nullptr;
}
void Module::increment() {
this->module->increment();
}