• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Initialize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Initialize

swq_expr_node::swq_expr_node()

{
    Initialize();
}
开发者ID:agrismart,项目名称:gdal-1.9.2,代码行数:5,代码来源:swq_expr_node.cpp


示例2: main

int main(int argc, char* argv[])
{
#ifdef Q_WS_X11
  QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
#endif

  QGuiApplication app(argc,argv);
  SettingsRef     settings;
  MainWindow      *window;
  int             result;

#ifdef __UBUNTU__
  QString appId = getenv("APP_ID");
  appId = appId.split("_")[0];
#else
  QString appId = "osmscout.fransschreuder";
#endif
  app.setOrganizationName(appId);
  app.setOrganizationDomain(appId);
  app.setApplicationName(appId.split(".")[0]);


  QTranslator qtTranslator;
  qtTranslator.load("qt_" + QLocale::system().name(),
          QLibraryInfo::location(QLibraryInfo::TranslationsPath));

  app.installTranslator(&qtTranslator);

  QTranslator myappTranslator;
  myappTranslator.load("osmscout_" + QLocale::system().name(), ":/po");

  app.installTranslator(&myappTranslator);

  //qRegisterMetaType<RenderMapRequest>();
  qRegisterMetaType<DatabaseLoadedResponse>();

  qmlRegisterType<MapWidget>("net.sf.libosmscout.map", 1, 0, "Map");
  qmlRegisterType<Location>("net.sf.libosmscout.map", 1, 0, "Location");
  qmlRegisterType<LocationListModel>("net.sf.libosmscout.map", 1, 0, "LocationListModel");
  qmlRegisterType<RouteStep>("net.sf.libosmscout.map", 1, 0, "RouteStep");
  qmlRegisterType<RoutingListModel>("net.sf.libosmscout.map", 1, 0, "RoutingListModel");
  qmlRegisterType<MapListModel>("net.sf.libosmscout.map", 1, 0, "MapListModel");
  qmlRegisterType<DownloadListModel>("net.sf.libosmscout.map", 1, 0, "DownloadListModel");
  qmlRegisterType<DownloadDirListModel>("net.sf.libosmscout.map", 1, 0, "DownloadDirListModel");

  qmlRegisterSingletonType<Theme>("net.sf.libosmscout.map", 1, 0, "Theme", ThemeProvider);
  qmlRegisterType<DownloadManager>("net.sf.libosmscout.map", 1, 0, "DownloadManager");
  qmlRegisterType<UnityScreen>("net.sf.libosmscout.map", 1, 0, "UnityScreen");

  osmscout::log.Debug(true);

  QThread thread;

  if (!DBThread::InitializeInstance()) {
    std::cerr << "Cannot initialize DBThread" << std::endl;
  }

  DBThread* dbThread=DBThread::GetInstance();

  window=new MainWindow(settings,
                        dbThread);
  dbThread->connect(&thread, SIGNAL(started()), SLOT(Initialize()));
  dbThread->connect(&thread, SIGNAL(finished()), SLOT(Finalize()));

  dbThread->moveToThread(&thread);
  thread.start();

  result=app.exec();

  delete window;

  thread.quit();
  thread.wait();

  DBThread::FreeInstance();

  return result;
}
开发者ID:AQbernhard,项目名称:OSMScout-ubuntu,代码行数:78,代码来源:OSMScout.cpp


示例3: Initialize

//
// инициализация COM порта
//
BOOL CComPort::Initialize(DWORD baud,BYTE parity,BYTE stopbit)
{	                    //не изменяем сост. линий 
 return Initialize(baud,parity,stopbit,-1,-1);
} 
开发者ID:fredcooke,项目名称:secu3man,代码行数:7,代码来源:ccomport.cpp


示例4: npc_floonAI

 npc_floonAI(Creature* creature) : ScriptedAI(creature)
 {
     Initialize();
     m_uiNormFaction = creature->getFaction();
 }
开发者ID:Keader,项目名称:TrinityCore,代码行数:5,代码来源:zone_terokkar_forest.cpp


示例5: npc_unkor_the_ruthlessAI

 npc_unkor_the_ruthlessAI(Creature* creature) : ScriptedAI(creature)
 {
     Initialize();
 }
开发者ID:Keader,项目名称:TrinityCore,代码行数:4,代码来源:zone_terokkar_forest.cpp


示例6: instance_dark_portal

 instance_dark_portal(Map *map) : ScriptedInstance(map) {Initialize();};
开发者ID:AwkwardDev,项目名称:Project-WoW,代码行数:1,代码来源:instance_dark_portal.cpp


示例7: raLogfile

Log::Log() :
    raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL),
    dberLogfile(NULL), m_colored(false), m_includeTime(false), m_gmlog_per_account(false)
{
    Initialize();
}
开发者ID:82cheyenne82,项目名称:MaNGOS-Core-4.3.4,代码行数:6,代码来源:Log.cpp


示例8: CMenuPanel


//.........这里部分代码省略.........
	SchemeHandle_t hTeamWindowText = pSchemes->getSchemeHandle("Briefing Text");
	SchemeHandle_t hTeamInfoText   = pSchemes->getSchemeHandle("Team Info Text");

	// get the Font used for the Titles
	Font *pTitleFont = pSchemes->getFont(hTitleScheme);
	int   r, g, b, a;

	// Create the title
	Label *pLabel = new Label("", TEAMMENU_TITLE_X, TEAMMENU_TITLE_Y);
	pLabel->setParent(this);
	pLabel->setFont(pTitleFont);
	pSchemes->getFgColor(hTitleScheme, r, g, b, a);
	pLabel->setFgColor(r, g, b, a);
	pSchemes->getBgColor(hTitleScheme, r, g, b, a);
	pLabel->setBgColor(r, g, b, a);
	pLabel->setContentAlignment(vgui::Label::a_west);
	pLabel->setText("%s", gHUD.m_TextMessage.BufferedLocaliseTextString("#Title_SelectYourTeam"));

	// Create the Info Window
	m_pTeamWindow = new CTransparentPanel(255, TEAMMENU_WINDOW_X, TEAMMENU_WINDOW_Y, TEAMMENU_WINDOW_SIZE_X, TEAMMENU_WINDOW_SIZE_Y);
	m_pTeamWindow->setParent(this);
	m_pTeamWindow->setBorder(new LineBorder(Color(255 * 0.7, 170 * 0.7, 0, 0)));

	// Create the Map Name Label
	m_pMapTitle = new Label("", TEAMMENU_WINDOW_TITLE_X, TEAMMENU_WINDOW_TITLE_Y);
	m_pMapTitle->setFont(pTitleFont);
	m_pMapTitle->setParent(m_pTeamWindow);
	pSchemes->getFgColor(hTitleScheme, r, g, b, a);
	m_pMapTitle->setFgColor(r, g, b, a);
	pSchemes->getBgColor(hTitleScheme, r, g, b, a);
	m_pMapTitle->setBgColor(r, g, b, a);
	m_pMapTitle->setContentAlignment(vgui::Label::a_west);

	// Create the Scroll panel
	m_pScrollPanel = new CTFScrollPanel(TEAMMENU_WINDOW_TEXT_X, TEAMMENU_WINDOW_TEXT_Y, TEAMMENU_WINDOW_SIZE_X - (TEAMMENU_WINDOW_TEXT_X * 2), TEAMMENU_WINDOW_TEXT_SIZE_Y);
	m_pScrollPanel->setParent(m_pTeamWindow);
	m_pScrollPanel->setScrollBarVisible(false, false);

	// Create the Map Briefing panel
	m_pBriefing = new TextPanel("", 0, 0, TEAMMENU_WINDOW_SIZE_X - TEAMMENU_WINDOW_TEXT_X, TEAMMENU_WINDOW_TEXT_SIZE_Y);
	m_pBriefing->setParent(m_pScrollPanel->getClient());
	m_pBriefing->setFont(pSchemes->getFont(hTeamWindowText));
	pSchemes->getFgColor(hTeamWindowText, r, g, b, a);
	m_pBriefing->setFgColor(r, g, b, a);
	pSchemes->getBgColor(hTeamWindowText, r, g, b, a);
	m_pBriefing->setBgColor(r, g, b, a);

	m_pBriefing->setText(gHUD.m_TextMessage.BufferedLocaliseTextString("#Map_Description_not_available"));

	// Team Menu buttons
	for(int i = 1; i <= 5; i++)
	{
		char sz[256];

		int iYPos = TEAMMENU_TOPLEFT_BUTTON_Y + ((TEAMMENU_BUTTON_SIZE_Y + TEAMMENU_BUTTON_SPACER_Y) * i);

		// Team button
		m_pButtons[i] = new CommandButton("", TEAMMENU_TOPLEFT_BUTTON_X, iYPos, TEAMMENU_BUTTON_SIZE_X, TEAMMENU_BUTTON_SIZE_Y, true);
		m_pButtons[i]->setParent(this);
		m_pButtons[i]->setContentAlignment(vgui::Label::a_west);
		m_pButtons[i]->setVisible(false);

		// AutoAssign button uses special case
		if(i == 5)
		{
			m_pButtons[5]->setBoundKey('5');
			m_pButtons[5]->setText(gHUD.m_TextMessage.BufferedLocaliseTextString("#Team_AutoAssign"));
			m_pButtons[5]->setVisible(true);
		}

		// Create the Signals
		sprintf(sz, "jointeam %d", i);
		m_pButtons[i]->addActionSignal(new CMenuHandler_StringCommandWatch(sz, true));
		m_pButtons[i]->addInputSignal(new CHandler_MenuButtonOver(this, i));

		// Create the Team Info panel
		m_pTeamInfoPanel[i] = new TextPanel("", TEAMMENU_WINDOW_INFO_X, TEAMMENU_WINDOW_INFO_Y, TEAMMENU_WINDOW_SIZE_X - TEAMMENU_WINDOW_INFO_X, TEAMMENU_WINDOW_SIZE_X - TEAMMENU_WINDOW_INFO_Y);
		m_pTeamInfoPanel[i]->setParent(m_pTeamWindow);
		m_pTeamInfoPanel[i]->setFont(pSchemes->getFont(hTeamInfoText));
		m_pTeamInfoPanel[i]->setFgColor(iTeamColors[i % iNumberOfTeamColors][0],
		                                iTeamColors[i % iNumberOfTeamColors][1],
		                                iTeamColors[i % iNumberOfTeamColors][2],
		                                0);
		m_pTeamInfoPanel[i]->setBgColor(0, 0, 0, 255);
	}

	// Create the Cancel button
	m_pCancelButton = new CommandButton(CHudTextMessage::BufferedLocaliseTextString("#Menu_Cancel"), TEAMMENU_TOPLEFT_BUTTON_X, 0, TEAMMENU_BUTTON_SIZE_X, TEAMMENU_BUTTON_SIZE_Y);
	m_pCancelButton->setParent(this);
	m_pCancelButton->addActionSignal(new CMenuHandler_TextWindow(HIDE_TEXTWINDOW));

	// Create the Spectate button
	m_pSpectateButton = new SpectateButton(CHudTextMessage::BufferedLocaliseTextString("#Menu_Spectate"), TEAMMENU_TOPLEFT_BUTTON_X, 0, TEAMMENU_BUTTON_SIZE_X, TEAMMENU_BUTTON_SIZE_Y, true);
	m_pSpectateButton->setParent(this);
	m_pSpectateButton->addActionSignal(new CMenuHandler_StringCommand("spectate", true));
	m_pSpectateButton->setBoundKey('6');
	m_pSpectateButton->addInputSignal(new CHandler_MenuButtonOver(this, 6));

	Initialize();
}
开发者ID:Sh1ft0x0EF,项目名称:HLSDKRevamp,代码行数:101,代码来源:vgui_teammenu.cpp


示例9: ScriptedInstance

instance_gruuls_lair::instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap),
    m_uiCouncilMembersDied(0)
{
    Initialize();
}
开发者ID:AngelX,项目名称:scriptdev2,代码行数:5,代码来源:instance_gruuls_lair.cpp


示例10: AP4_SUCCEEDED

/*----------------------------------------------------------------------
|   AP4_Processor::Process
+---------------------------------------------------------------------*/
AP4_Result
AP4_Processor::Process(AP4_ByteStream&   input, 
                       AP4_ByteStream&   output,
                       ProgressListener* listener,
                       AP4_AtomFactory&  atom_factory)
{
    // read all atoms.
    // keep all atoms except [mdat]
    // keep a ref to [moov]
    // put [moof] atoms in a separate list
    AP4_AtomParent              top_level;
    AP4_MoovAtom*               moov = NULL;
    AP4_ContainerAtom*          mfra = NULL;
    AP4_List<AP4_MoofLocator>   moofs;
    AP4_UI64                    stream_offset = 0;
    for (AP4_Atom* atom = NULL;
        AP4_SUCCEEDED(atom_factory.CreateAtomFromStream(input, atom));
        input.Tell(stream_offset)) {
        if (atom->GetType() == AP4_ATOM_TYPE_MDAT) {
            continue;
        } else if (atom->GetType() == AP4_ATOM_TYPE_MOOV) {
            moov = AP4_DYNAMIC_CAST(AP4_MoovAtom, atom);
        } else if (atom->GetType() == AP4_ATOM_TYPE_MOOF) {
            AP4_ContainerAtom* moof = AP4_DYNAMIC_CAST(AP4_ContainerAtom, atom);
            if (moof) {
                moofs.Add(new AP4_MoofLocator(moof, stream_offset));
            }
            continue;
        } else if (atom->GetType() == AP4_ATOM_TYPE_MFRA) {
            mfra = AP4_DYNAMIC_CAST(AP4_ContainerAtom, atom);
            continue;
        }
        top_level.AddChild(atom);
    }

    // initialize the processor
    AP4_Result result = Initialize(top_level, input);
    if (AP4_FAILED(result)) return result;

    // process the tracks if we have a moov atom
    AP4_Array<AP4_SampleLocator> locators;
    AP4_Cardinal                 track_count       = 0;
    AP4_List<AP4_TrakAtom>*      trak_atoms        = NULL;
    AP4_LargeSize                mdat_payload_size = 0;
    TrackHandler**               handlers          = NULL;
    AP4_SampleCursor*            cursors           = NULL;
    if (moov) {
        // build an array of track sample locators
        trak_atoms = &moov->GetTrakAtoms();
        track_count = trak_atoms->ItemCount();
        cursors = new AP4_SampleCursor[track_count];
        handlers = new TrackHandler*[track_count];
        for (AP4_Ordinal i=0; i<track_count; i++) {
            handlers[i] = NULL;
        }
        
        unsigned int index = 0;
        for (AP4_List<AP4_TrakAtom>::Item* item = trak_atoms->FirstItem(); item; item=item->GetNext()) {
            AP4_TrakAtom* trak = item->GetData();

            // find the stsd atom
            AP4_ContainerAtom* stbl = AP4_DYNAMIC_CAST(AP4_ContainerAtom, trak->FindChild("mdia/minf/stbl"));
            if (stbl == NULL) continue;
            
            // see if there's an external data source for this track
            AP4_ByteStream* trak_data_stream = &input;
            for (AP4_List<ExternalTrackData>::Item* ditem = m_ExternalTrackData.FirstItem(); ditem; ditem=ditem->GetNext()) {
                ExternalTrackData* tdata = ditem->GetData();
                if (tdata->m_TrackId == trak->GetId()) {
                    trak_data_stream = tdata->m_MediaData;
                    break;
                }
            }

            // create the track handler    
            handlers[index] = CreateTrackHandler(trak);
            cursors[index].m_Locator.m_TrakIndex   = index;
            cursors[index].m_Locator.m_SampleTable = new AP4_AtomSampleTable(stbl, *trak_data_stream);
            cursors[index].m_Locator.m_SampleIndex = 0;
            cursors[index].m_Locator.m_ChunkIndex  = 0;
            if (cursors[index].m_Locator.m_SampleTable->GetSampleCount()) {
                cursors[index].m_Locator.m_SampleTable->GetSample(0, cursors[index].m_Locator.m_Sample);
            } else {
                cursors[index].m_EndReached = true;
            }

            index++;            
        }

        // figure out the layout of the chunks
        for (;;) {
            // see which is the next sample to write
            AP4_UI64 min_offset = (AP4_UI64)(-1);
            int cursor = -1;
            for (unsigned int i=0; i<track_count; i++) {
                if (!cursors[i].m_EndReached &&
                    cursors[i].m_Locator.m_Sample.GetOffset() <= min_offset) {
//.........这里部分代码省略.........
开发者ID:danelledeano,项目名称:VTech-InnoTab,代码行数:101,代码来源:Ap4Processor.cpp


示例11: ScriptedInstance

instance_the_eye::instance_the_eye(Map* pMap) : ScriptedInstance(pMap),
    m_uiKaelthasEventPhase(0)
{
    Initialize();
}
开发者ID:AngelX,项目名称:scriptdev2,代码行数:5,代码来源:instance_the_eye.cpp


示例12: m_pMap

Unit::Unit(bool bPlayer /*= false*/) 
	: m_pMap(nullptr), m_pRegion(nullptr), m_sRegionX(0), m_sRegionZ(0), m_bPlayer(bPlayer)
{
	Initialize();
}
开发者ID:Rizoo,项目名称:snoxd-koserver,代码行数:5,代码来源:Unit.cpp


示例13: boss_CrushtoAI

 boss_CrushtoAI(Creature* creature) : ScriptedAI(creature)
 {
     Initialize();
 }
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:4,代码来源:boss_Crushto.cpp


示例14: instance_scarlet_monastery

 instance_scarlet_monastery(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
开发者ID:LORDofDOOM,项目名称:MMOTBC,代码行数:1,代码来源:instance_scarlet_monastery.cpp


示例15: boss_shirrak_the_dead_watcherAI

 boss_shirrak_the_dead_watcherAI(Creature* creature) : ScriptedAI(creature)
 {
     Initialize();
 }
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:4,代码来源:boss_shirrak_the_dead_watcher.cpp


示例16: Initialize

//恢复主业务线程
int32_t CFrameMainThread::Resume()
{
	return Initialize();
}
开发者ID:brianserv,项目名称:fastframe,代码行数:5,代码来源:frame_mainthread.cpp


示例17: Reset

 void Reset() override
 {
     Initialize();
 }
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:4,代码来源:boss_shirrak_the_dead_watcher.cpp


示例18: Initialize

ods_formula_node::ods_formula_node()

{
    Initialize();
}
开发者ID:garnertb,项目名称:gdal,代码行数:5,代码来源:ods_formula_node.cpp


示例19: Initialize

void RandomMovementGenerator<Creature>::Reset(Creature &creature)
{
    Initialize(creature);
}
开发者ID:xXNembiXx,项目名称:mangos_335,代码行数:4,代码来源:RandomMovementGenerator.cpp


示例20: npc_corporal_keeshanAI

 npc_corporal_keeshanAI(Creature* creature) : npc_escortAI(creature)
 {
     Initialize();
 }
开发者ID:AllThing,项目名称:TrinityCore,代码行数:4,代码来源:zone_redridge_mountains.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ InitializeBuffers函数代码示例发布时间:2022-05-30
下一篇:
C++ Initialise函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap