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


C++ LoadDatabase函数代码示例

本文整理汇总了C++中LoadDatabase函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadDatabase函数的具体用法?C++ LoadDatabase怎么用?C++ LoadDatabase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: LoadDatabase

void Scene_Title::Start() {
    LoadDatabase();

    static bool init = false;
    if (!init) {
        if (Data::system.ldb_id == 2003) {
            Output::Debug("Switching to Rpg2003 Interpreter");
            Player::engine = Player::EngineRpg2k3;
        }

        FileFinder::InitRtpPaths();
    }
    init = true;

    Main_Data::game_data.Setup();

    // Create Game System
    Game_System::Init();

    if (!Player::battle_test_flag) {
        CreateTitleGraphic();
        PlayTitleMusic();
    }

    CreateCommandWindow();
}
开发者ID:Bonstra,项目名称:EasyRPG-Player,代码行数:26,代码来源:scene_title.cpp

示例2: outstring_log

void ScriptMgr::ScriptsInit()
{
    //Trinity Script startup
    outstring_log(" _____     _       _ _         ____            _       _");
    outstring_log("|_   _| __(_)_ __ (_) |_ _   _/ ___|  ___ _ __(_)_ __ | |_ ");
    outstring_log("  | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
    outstring_log("  | || |  | | | | | | |_| |_| |___) | (__| |  | | |_) | |_ ");
    outstring_log("  |_||_|  |_|_| |_|_|\\__|\\__, |____/ \\___|_|  |_| .__/ \\__|");
    outstring_log("                         |___/                  |_|        ");
    outstring_log("");
    outstring_log("");

    //Load database (must be called after SD2Config.SetSource).
    LoadDatabase();

    outstring_log("TSCR: Loading C++ scripts");
    barGoLink bar(1);
    bar.step();
    outstring_log("");

    for (uint16 i =0; i<MAX_SCRIPTS; ++i)
        m_scripts[i]=NULL;

    FillSpellSummary();

    AddScripts();

    outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);

    outstring_log(">> Load Overriden SQL Data.");
    LoadOverridenSQLData();
}
开发者ID:Elevim,项目名称:RG-332,代码行数:32,代码来源:ScriptMgr.cpp

示例3: __

void ScriptMgr::ScriptsInit()
{
    //Trinity Script startup
    /*sLog.outString(" _____     _       _ _         ____            _       _");
    sLog.outString("|_   _| __(_)_ __ (_) |_ _   _/ ___|  ___ _ __(_)_ __ | |_ ");
    sLog.outString("  | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
    sLog.outString("  | || |  | | | | | | |_| |_| |___) | (__| |  | | |_) | |_ ");
    sLog.outString("  |_||_|  |_|_| |_|_|\\__|\\__, |____/ \\___|_|  |_| .__/ \\__|");
    sLog.outString("                         |___/                  |_|        ");
    sLog.outString("");
    sLog.outString("");*/

	/* Beginning Of PDS-4TC Badge*/ /* Added by Pryd inspired by Lorac */ 
	sLog.outString("  .                 .               .     ");
	sLog.outString("               .             .         ");
    sLog.outString("  ____    .         \\ /         .   ");
	sLog.outString(" /\\ / \\       .    - ^ -                ");
	sLog.outString(" \\ \\_ /    .       / | \\ .           .    ");
	sLog.outString("  \\ \\\\    _                      .     ");
	sLog.outString("   \\ \\\\ \\// _    _  /\\  __           ");
	sLog.outString("    \\ \\\\ \\\\ \\\\  // /`'\\ \\__ \\  /     ");
	sLog.outString("     \\//__\\\\ \\\\// /____\\ \\__ \\/        ");
	sLog.outString("        _____//  ````````                    ");
	sLog.outString("       /\\  ___\\  PDS-4TC-2011      ");
	sLog.outString("       \\ \\ \\__/   ______  _  __  _____          ");
	sLog.outString("        \\ \\ \\    /\\  __ \\/\\`'__\\/\\  __\\         ");
	sLog.outString("    ,,   \\ \\ \\___\\ \\ \\_\\ \\ \\ \\_/\\ \\ \\//_         ");
	sLog.outString("_/\\_|_____\\ \\_____\\ \\_____\\ \\_\\  \\ \\____\\        ");
	sLog.outString(" ` ` ` ` ` \\______/\\/_____/\\/_/   \\/____/        ");
	sLog.outString("       ");
	sLog.outString( "PryDevCore based on TrinityCore");
	sLog.outString( "Project Resource Locations");
	sLog.outString( "Main Site:      Http://prydevserver.com");
	sLog.outString( "Support Forum:  Http://prydevserver.com/forum/");
	sLog.outString( " ");
	sLog.outString( "PryDevServer.com Development For the Community");

    /* End Of PDS-4TC Badge*/ /* Added by Pryd inspired by Lorac */
    //Load database (must be called after SD2Config.SetSource).
    LoadDatabase();

    sLog.outString("Loading C++ scripts");
    barGoLink bar(1);
    bar.step();
    sLog.outString("");

    for (uint16 i =0; i<MAX_SCRIPTS; ++i)
        m_scripts[i]=NULL;

    FillSpellSummary();

    AddScripts();

	

    sLog.outString(">> Loaded %i C++ Scripts.", num_sc_scripts);

    sLog.outString(">> Load Overriden SQL Data.");
    LoadOverridenSQLData();
}
开发者ID:Mferrill,项目名称:BotCore,代码行数:60,代码来源:ScriptMgr.cpp

示例4: Prioritize

	void Prioritize()
	{
		// XXX: Load the DB here because the order in which modules are init()ed at boot is
		// alphabetical, this means we must wait until all modules have done their init()
		// to be able to set the modes they provide (e.g.: m_stripcolor is inited after us)
		// Prioritize() is called after all module initialization is complete, consequently
		// all modes are available now

		static bool loaded = false;
		if (loaded)
			return;

		loaded = true;

		// Load only when there are no linked servers - we set the TS of the channels we
		// create to the current time, this can lead to desync because spanningtree has
		// no way of knowing what we do
		ProtocolInterface::ServerList serverlist;
		ServerInstance->PI->GetServerList(serverlist);
		if (serverlist.size() < 2)
		{
			try
			{
				LoadDatabase();
			}
			catch (CoreException& e)
			{
				ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Error loading permchannels database: " + std::string(e.GetReason()));
			}
		}
	}
开发者ID:novas0x2a,项目名称:inspircd,代码行数:31,代码来源:m_permchannels.cpp

示例5: DoQuery

void DoQuery(char* fileName, char *query)
{
	char **result;
	WordSet *set;
	/*load database into the set*/
	set = LoadDatabase(set, fileName);
	if (!set)
		return;
	/*allocate memory for the result*/
	result = AllocResult(fileName, result);

	if (result == NULL)
		return;

	/*if null parameter is passed, go to Interactive mode*/
	if (query == NULL){
		printf("Interactive Mode:\n");
		InteractiveMode(set, result);
	} else {
		printf("Query Mode:\n");
		QueryMode(set, result, query);
	}
	/*free memory*/
	free(result);
	FreeSet(set);

}
开发者ID:trongrg,项目名称:TST-Tree,代码行数:27,代码来源:main.c

示例6: LoadDatabase

void ScriptMgr::InitScriptLibrary()
{
    LoadDatabase();

    outstring_log("StrawberryScripts: Loading C++ scripts");
    BarGoLink bar(1);
    bar.step();
    outstring_log("");

    // Resize script ids to needed ammount of assigned ScriptNames (from core)
    m_scripts.resize(GetScriptIdsCount(), NULL);

    FillSpellSummary();

    AddScripts();

    // Check existance scripts for all registered by core script names
    for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
    {
        if (!m_scripts[i])
            error_log("SSC: No script found for ScriptName '%s'.", GetScriptName(i));
    }

    outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
开发者ID:ErYayo,项目名称:StrawberryCore,代码行数:25,代码来源:ScriptMgr.cpp

示例7: outstring_log

void ScriptMgr::ScriptsInit()
{
    outstring_log("   ____                              _____           _       _   ");
    outstring_log("  / __ \\                            / ____|         (_)     | |  ");
    outstring_log(" | |  | |_ __ ___  __ _  ___  _ __ | (___   ___ _ __ _ _ __ | |_ ");
    outstring_log(" | |  | | '__/ _ \\/ _` |/ _ \\| '_ \\ \\___ \\ / __| '__| | '_ \\| __|");
    outstring_log(" | |__| | | |  __/ (_| | (_) | | | |____) | (__| |  | | |_) | |_ ");
    outstring_log("  \\____/|_|  \\___|\\__, |\\___/|_| |_|_____/ \\___|_|  |_| .__/ \\__|");
    outstring_log("                   __/ |                              | |        ");
    outstring_log("                  |___/                               |_|  \n");

    //Load database (must be called after SD2Config.SetSource).
    LoadDatabase();

    for (uint16 i = 0; i < MAX_SCRIPTS; ++i)
        m_scripts[i] = NULL;

    FillSpellSummary();

    AddScripts();

    outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);

    outstring_log(">> Load Overriden SQL Data.");
    LoadOverridenSQLData();
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:26,代码来源:ScriptMgr.cpp

示例8: InitScriptLibrary

MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
    // ScriptDev2 startup
    outstring_log("");
    outstring_log(" MMM  MMM    MM");
    outstring_log("M  MM M  M  M  M");
    outstring_log("MM    M   M   M");
    outstring_log(" MMM  M   M  M");
    outstring_log("   MM M   M MMMM");
    outstring_log("MM  M M  M ");
    outstring_log(" MMM  MMM  http://www.scriptdev2.com");
    outstring_log("");

   // Get configuration file
   bool configFailure = false;
   if (!SD2Config.SetSource(_MANGOSD_CONFIG))
       configFailure = true;
   else
       outstring_log("SD2: Using configuration file %s", _MANGOSD_CONFIG);

   // Set SD2 Error Log File
   std::string sd2LogFile = SD2Config.GetStringDefault("SD2ErrorLogFile", "SD2Errors.log");
   setScriptLibraryErrorFile(sd2LogFile.c_str(), "SD2");

   if (configFailure)
       script_error_log("Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");

   // Check config file version
   if (SD2Config.GetIntDefault("ConfVersion", 0) != _MANGOSDCONFVERSION)
       script_error_log("Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");

   outstring_log("");

   // Load database (must be called after SD2Config.SetSource).
    LoadDatabase();

    outstring_log("SD2: Loading C++ scripts");
    BarGoLink bar(1);
    bar.step();
    outstring_log("");

    // Resize script ids to needed ammount of assigned ScriptNames (from core)
    m_scripts.resize(GetScriptIdsCount(), NULL);

    FillSpellSummary();

    AddScripts();

    // Check existance scripts for all registered by core script names
    for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
    {
        if (!m_scripts[i])
            script_error_log("No script found for ScriptName '%s'.", GetScriptName(i));
    }

    outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
开发者ID:AwkwardDev,项目名称:mangos-d3,代码行数:58,代码来源:ScriptMgr.cpp

示例9: InitScriptLibrary

MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
    // ScriptDev2 startup
    outstring_log("");
    outstring_log(" MMM  MMM    MM");
    outstring_log("M  MM M  M  M  M");
    outstring_log("MM    M   M   M");
    outstring_log(" MMM  M   M  M");
    outstring_log("   MM M   M MMMM");
    outstring_log("MM  M M  M ");
    outstring_log(" MMM  MMM  http://www.scriptdev2.com");
    outstring_log("R2 modifications included (https://github.com/mangosR2/scriptdev2)");
    outstring_log(_VERSION);

    // Get configuration file
    if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG))
        error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
    else
        outstring_log("SD2: Using configuration file %s",_SCRIPTDEV2_CONFIG);

    // Check config file version
    if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION)
        error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");

    outstring_log("");

    // Load database (must be called after SD2Config.SetSource).
    LoadDatabase();

    outstring_log("SD2: Loading C++ scripts");
    BarGoLink bar(1);
    bar.step();
    outstring_log("");

    // Resize script ids to needed ammount of assigned ScriptNames (from core)
    m_scripts.resize(GetScriptIdsCount(), NULL);

    m_scriptStorage.clear();

    FillSpellSummary();

    AddScripts();

    // Check existance scripts for all registered by core script names
    for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
    {
        if (!m_scripts[i])
            error_log("SD2: No script found for ScriptName '%s'.", GetScriptName(i));
    }

    outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
开发者ID:finomen,项目名称:scriptdev2,代码行数:53,代码来源:ScriptMgr.cpp

示例10: root_node_

ParallelPlaneManager::ParallelPlaneManager(osg::ref_ptr<osg::Node> root_node):
    root_node_(root_node),
    data_mutex_(QMutex::Recursive)
{
    QSettings settings("massheatmap.ini",QSettings::IniFormat);
    QString pcaFileName = settings.value("data_file","pca.csv").toString();
    QString covFileName = settings.value("coverage_file","./coverage_data/pack_test.csv").toString();
    use_cached_database_ = settings.value("use_cached_database","true").toBool();

    LoadDatabase(pcaFileName,covFileName);
    InitializeSceneGraph();
}
开发者ID:Jerdak,项目名称:MassHeatMap,代码行数:12,代码来源:ParallelPlaneManager.cpp

示例11: getMSTime

void ScriptMgr::Initialize()
{
    uint32 oldMSTime = getMSTime();

    LoadDatabase();

    sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts");

    FillSpellSummary();
    AddScripts();

    sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
开发者ID:KingPin,项目名称:TrinityCore,代码行数:13,代码来源:ScriptMgr.cpp

示例12: getMSTime

void ScriptMgr::Initialize()
{
    uint32 oldMSTime = getMSTime();

    LoadDatabase();

    TC_LOG_INFO("server.loading", "Loading C++ scripts");

    FillSpellSummary();
    AddScripts();

    TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
开发者ID:tyraela,项目名称:NetherCore,代码行数:13,代码来源:ScriptMgr.cpp

示例13: DisplayMode

void DisplayMode(char *mode, char *fileName)
{
	WordSet *set;
	printf("Display Mode\n");
	set = LoadDatabase(set, fileName);
	if (set == NULL)
		return;
	if (strcmp(mode, "preorder")==0)
		DisplayPreOrder(set);
	else if (strcmp(mode, "postorder")==0)
		DisplayPostOrder(set);
	else
		DisplayInOrder(set);
}
开发者ID:trongrg,项目名称:TST-Tree,代码行数:14,代码来源:main.c

示例14: getMSTime

void ScriptMgr::Initialize()
{
    uint32 oldMSTime = getMSTime();

    LoadDatabase();

    sLog->outString("Loading C++ scripts");

    FillSpellSummary();
    AddScripts();

    sLog->outString(">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
    sLog->outString();
}
开发者ID:Ramusik,项目名称:MadboxpcWOW_3.0,代码行数:14,代码来源:ScriptMgr.cpp

示例15: getMSTime

void ScriptMgr::Initialize()
{
    uint32 oldMSTime = getMSTime();

    LoadDatabase();
    // Load TeleNPC2 - maybe not the best place to load it ...
    LoadNpcTele();

    TC_LOG_INFO("server.loading", "Loading C++ scripts");

    FillSpellSummary();
    AddScripts();

    TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
开发者ID:Kretol,项目名称:TrinityCore,代码行数:15,代码来源:ScriptMgr.cpp


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