当前位置: 首页>>代码示例>>C++>>正文


C++ ListKey::getText方法代码示例

本文整理汇总了C++中ListKey::getText方法的典型用法代码示例。如果您正苦于以下问题:C++ ListKey::getText方法的具体用法?C++ ListKey::getText怎么用?C++ ListKey::getText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ListKey的用法示例。


在下文中一共展示了ListKey::getText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char **argv)
{
    const char *range = (argc > 1) ? argv[1] : "Mat 2:10,12-15";

    VerseKey parser;
    ListKey result;

    result = parser.parseVerseList(range, parser.getText().c_str(), true);

    // let's iterate the key and display
    for (result.positionToTop(); !result.popError(); result.increment()) {
        cout << result.getText() << "\n";
    }
    cout << endl;

    // Now let's output a module with the entries from the result

    // we'll initialize our library of books
    SWMgr library(std::make_shared<MarkupFilterMgr>(FMT_PLAIN));    // render plain without fancy markup

    // Let's get a book;
    auto const book(library.getModule("KJV"));

    // couldn't find our test module
    if (!book) return -1;

    // now let's iterate the book and display
    for (result.positionToTop(); !result.popError(); result.increment()) {
        book->setKey(result);
        cout << "*** " << book->getKeyText() << ": " << book->renderText() << "\n";
    }

    return 0;
}
开发者ID:swordxx,项目名称:swordxx,代码行数:34,代码来源:verserangeparse.cpp

示例2: main

int main(int argc, char **argv) {

	SWMgr mgr;
	SWModule *mod = mgr.getModule("KJVgb");

	VerseKey *key1 = (VerseKey *)mod->createKey();

	key1->setTestament(2);
	key1->setBook(4);
	key1->setChapter(2);
	key1->setVerse(3);

	cout << "\n" << key1->getText() << ":\n\n";

	ListKey keys;
	keys << *key1;

	cout << "\n" << keys.getRangeText() << ":\n\n";

	ListKey keys2 = keys;

	cout << "\n" << keys2.getRangeText() << ":\n\n";

	keys = key1->parseVerseList("Lk.4.5");

	cout << "\n" << key1->getText() << ":\n\n";

	key1->setText("jn.6.7");

	cout << "\n" << key1->getText() << ":\n\n";
	

	mod->setKey("lk.2.3");

	cout << "\n" << mod->getKeyText() << ":\n" << endl;
	cout << mod->getRawEntry() << endl;


	cout << "\nListkey persist key iteration test\n\n";
	keys = key1->parseVerseList("mat1", 0, true);

	for (keys = TOP; !keys.popError(); keys++) {
		cout << "\n" << keys.getText() << ":\n" << endl;
	}


	keys.setPersist(true);

	mod->setKey(keys);

	for ((*mod) = TOP; !mod->popError(); (*mod)++) {
		cout << "\n" << mod->getKeyText() << ":\n" << endl;
	}

	delete key1;

	return 0;
}
开发者ID:bluehavana,项目名称:sword,代码行数:58,代码来源:vtreekeytest.cpp

示例3:

const char *listkey_iterator_val(SWHANDLE lki) {	
	ListKey *lk = (ListKey*)lki;
	if(!lk->popError())
		return (const char *) lk->getText();
	return NULL;
}
开发者ID:,项目名称:,代码行数:6,代码来源:


注:本文中的ListKey::getText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。