Files
sword_rs/src/cxx/module.h
T

57 lines
1.5 KiB
C++
Raw Normal View History

2025-06-30 01:35:39 -05:00
/*
* A safe, Rust-native binding for the SWORD library
* Copyright (C) 2025 Gregory Hellings
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
2025-02-24 22:35:47 -06:00
#pragma once
2025-06-25 02:30:42 -05:00
#include <memory>
2025-02-24 22:35:47 -06:00
#include <sword/swmodule.h>
#include <string>
#include "rust/cxx.h"
2025-06-25 02:30:42 -05:00
#include "versekey.h"
2025-02-24 22:35:47 -06:00
namespace sword_rs {
class Module {
private:
sword::SWModule* module;
2025-02-24 22:35:47 -06:00
public:
Module(sword::SWModule* module);
2025-02-24 22:35:47 -06:00
2025-02-25 15:36:58 -06:00
void decrement();
rust::String get_name() const;
2025-02-24 22:35:47 -06:00
2025-02-25 19:49:02 -06:00
rust::String get_type() const;
2025-06-26 02:19:26 -05:00
SwordVerseKey* get_verse_key() const;
2025-06-25 02:30:42 -05:00
2025-02-25 15:36:58 -06:00
void increment();
2025-02-25 15:45:58 -06:00
bool is_skip_consecutive_links() const;
2025-02-25 14:55:39 -06:00
rust::String render_text();
2025-02-25 00:06:12 -06:00
void set_key_text(const rust::String& keyText);
2025-02-25 14:55:39 -06:00
2025-02-25 15:45:58 -06:00
void set_skip_consecutive_links(bool skip);
2025-02-25 14:55:39 -06:00
rust::String strip_text();
};
}