您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DeInit函数代码示例

51自学网 2021-06-01 20:25:35
  C++
这篇教程C++ DeInit函数代码示例写得很实用,希望能帮到您。

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

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

示例1: LOG_ERROR

OMX_ERRORTYPE TextSource::Init(){    CPresult ret = 0;    ret = mPipe->Open(&mHandle, mUrl, CP_AccessRead);    if(ret != 0) {        LOG_ERROR("Can't open content: %s/n", mUrl);        return OMX_ErrorUndefined;    }    mBuffer = (OMX_U8*)FSL_MALLOC(mBufferSize);    if(mBuffer == NULL) {        DeInit();        return OMX_ErrorInsufficientResources;    }    mCache = (OMX_U8*)FSL_MALLOC(mCacheSize);    if(mCache == NULL) {        DeInit();        return OMX_ErrorInsufficientResources;    }    mCacheRead = mCacheFill = 0;    mOffset = 0;    return OMX_ErrorNone;}
开发者ID:primiano,项目名称:udoo_external_fsl_imx_omx,代码行数:25,


示例2: WinProc

LRESULT CALLBACK WinProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam){    LONG    lRet = 0;     PAINTSTRUCT    ps;    switch (uMsg)	{     case WM_SIZE:										// If the window is resized		if(!g_bFullScreen)								// Do this only if we are NOT in full screen		{			SizeOpenGLScreen(LOWORD(lParam),HIWORD(lParam));// LoWord=Width, HiWord=Height			GetClientRect(hWnd, &g_rRect);					// Get the window rectangle		}        break;  	case WM_PAINT:										// If we need to repaint the scene		BeginPaint(hWnd, &ps);							// Init the paint struct				EndPaint(hWnd, &ps);							// EndPaint, Clean up		break;	case WM_KEYDOWN:		if(wParam == VK_ESCAPE)	DeInit();				// Quit if we pressed ESCAPE		break;     case WM_DESTROY:									// If the window is destroyed        DeInit();										// Release memory and restore settings        break;          default:											// Return by default        lRet = DefWindowProc (hWnd, uMsg, wParam, lParam);         break;     }      return lRet;										// Return by default}
开发者ID:JasonLee12345,项目名称:tutorials,代码行数:35,


示例3: DeInit

/***  @brief*    Initializes the window connection*/void WindowConnection::Initialize(const DisplayMode *pDisplayMode, bool bFullscreen){    // De-init window    DeInit();    // Display mode information given?    if (pDisplayMode) {        // Just copy over the given information        m_sDisplayMode = *pDisplayMode;    } else {        // Use default settings        m_sDisplayMode.vSize      = m_pWidget->GetSize();        m_sDisplayMode.nColorBits = 32;        m_sDisplayMode.nFrequency = 60;    }    // Initialize renderer surface handler    InitWidget(bFullscreen);    // Emit the initial events so other components can set their proper initial states    if (bFullscreen)        OnFullscreenMode();    else        OnDisplayMode();}
开发者ID:ByeDream,项目名称:pixellight,代码行数:29,


示例4: PreInit

void CService::ServiceMainMember(DWORD argc, LPTSTR* argv, LPHANDLER_FUNCTION pf, LPTHREAD_START_ROUTINE pfnWTP){    DWORD dwErr = 0;   __try    {        PreInit();        SetupHandlerInside(pf);        LaunchWatcherThread(pfnWTP);        SetStatus(SERVICE_START_PENDING, 1, kDefaultWaitTime );        if ( NTService::InitializeService( _theService, _params, false ) == 0 )        {            SetStatus( SERVICE_RUNNING, 0, 0, SERVICE_ACCEPT_STOP );            _theService->start();        }        else        {            CERR << NTEXT("Error initializing service") << std::endl;        }    }   __except(dwErr = GetExceptionCode(), EXCEPTION_EXECUTE_HANDLER)   {      if(m_hServiceStatus)         SetStatus(SERVICE_STOPPED, 0, 0, 0, dwErr, 0);   }   DeInit();   SetStatus(SERVICE_STOPPED, 0, 0, 0, dwErr, 0);}
开发者ID:CSanchezAustin,项目名称:cslib,代码行数:29,


示例5: DeInit

/***************************************************************************//*** 函数名称:	SetAttribute* 功能描述:	设置输入输出图片属性以及Scale算法。* 参    数:	srcFormat	>> 源图像格式;* 参    数:	dstFormat	>> 目标图像格式;* 参    数:	enAlogrithm	>> Scale算法;* 返 回 值:	* 其它说明:	* 修改日期		修改人			修改内容* ------------------------------------------------------------------------------* 2011-10-28	Cloud	      	创建*******************************************************************************/void CFFScale::SetAttribute(PicFormat srcFormat, PicFormat dstFormat, SwsAlogrithm enAlogrithm){	m_srcFormat = srcFormat;	m_dstFormat = dstFormat;	m_enAlogrithm = enAlogrithm;	DeInit();}
开发者ID:Lamobo,项目名称:Lamobo-D1,代码行数:19,


示例6: SetCurrentOperation

VError DB4DJournalParser::SetEndOfJournal( uLONG8 inOperation ){	VError error = VE_OK;	if ( fFileStream )	{		CDB4DJournalData *journalData = NULL;		error = SetCurrentOperation( inOperation, &journalData );		if ( journalData )			journalData->Release();		if ( error == VE_OK )		{			sLONG8 filePos = fFileStream->GetPos();			error = DeInit();			if ( error == VE_OK )			{				VFileDesc *fileDesc = NULL;				error = fLogFile->Open( FA_READ_WRITE, &fileDesc );				if ( error == VE_OK )				{					error = fileDesc->SetSize( filePos );					delete fileDesc;				}				if ( error == VE_OK )					fTotalOperationCount = fCurrentOperation;			}		}	}	else	{		error = VE_UNIMPLEMENTED; // not initialized	}	return error;}
开发者ID:sanyaade-iot,项目名称:core-Components,代码行数:33,


示例7: MainLoop

WPARAM MainLoop(){	MSG msg;	while(1)											// Do our infinate loop	{													// Check if there was a message		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))         { 			if(msg.message == WM_QUIT)					// If the message wasnt to quit				break;            TranslateMessage(&msg);						// Find out what the message does            DispatchMessage(&msg);						// Execute the message        }		else											// if there wasn't a message		{ /////// * /////////// * /////////// * NEW * /////// * /////////// * /////////// *			g_Camera.Update();							// Update the camera data			/////// * /////////// * /////////// * NEW * /////// * /////////// * /////////// *			RenderScene();								// Update the screen every frame (Not good in a game)        } 	}	DeInit();											// Clean up and free all allocated memory	return(msg.wParam);									// Return from the program}
开发者ID:twinklingstar20,项目名称:Programming-Tutorials,代码行数:28,


示例8: WndProc

// Here is the WndProc that handles all the messages															LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam){	// Check which message was passed in    switch (iMsg)											    {		// This message is sent when the window is created (CreateWindow())		case WM_CREATE:			// Create the double buffer and load the bitmaps				Init(hwnd);													break;				case WM_RBUTTONDOWN:			// By pressing the right mouse button you can switch animations			SetSpriteState(&gMonster, ++gMonster.state % 4);			break;		// This message is sent when the window is destroyed		case WM_DESTROY:												// Free all the data and set everything back to normal, then post the quit message			DeInit();													break;					}														// Process/handle the default messages	return DefWindowProc (hwnd, iMsg, wParam, lParam);																	}
开发者ID:Allenjonesing,项目名称:tutorials,代码行数:30,


示例9: MainLoop

WPARAM MainLoop(){    MSG msg;    while(1)											// Do our infinite loop    {        // Check if there was a message        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))        {            if(msg.message == WM_QUIT)					// If the message wasn't to quit                break;            TranslateMessage(&msg);						// Find out what the message does            DispatchMessage(&msg);						// Execute the message        }        else											// If there wasn't a message        {            if(AnimateNextFrame(60))					// Make sure we only render 60 frames per second            {                RenderScene();							// Render the scene            }        }    }    DeInit();											// Clean up and free all allocated memory    return(msg.wParam);									// Return from the program}
开发者ID:jiangguang5201314,项目名称:ZNginx,代码行数:27,


示例10: OBJECTTEMPLATE

CMeshObject::CMeshObject(IHashString *parentName, IHashString *name) : 	OBJECTTEMPLATE( CRenderManager, CMeshObject, IMeshObject, parentName, name ){	//Not sure if we want to add to hierarchy	//AddToHierarchy();	DeInit();}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:7,


示例11: AfxEnableControlContainer

BOOL CYTGetApp::InitInstance(){	AfxEnableControlContainer();	// Standard initialization	// If you are not using these features and wish to reduce the size	//  of your final executable, you should remove from the following	//  the specific initialization routines you do not need.#ifdef _AFXDLL	Enable3dControls();			// Call this when using MFC in a shared DLL#else	Enable3dControlsStatic();	// Call this when linking to MFC statically#endif	Init();	CMainDlg dlg;	m_pMainWnd = &dlg;	int nResponse = dlg.DoModal();	if (nResponse == IDOK)	{		// TODO: Place code here to handle when the dialog is		//  dismissed with OK	}	else if (nResponse == IDCANCEL)	{		// TODO: Place code here to handle when the dialog is		//  dismissed with Cancel	}	DeInit();	// Since the dialog has been closed, return FALSE so that we exit the	//  application, rather than start the application's message pump.	return FALSE;}
开发者ID:killbug2004,项目名称:cosps,代码行数:34,


示例12: MainLoop

WPARAM MainLoop(){	MSG msg;	while(1)											// Do our infinite loop	{													// Check if there was a message		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 		{ 			if(msg.message == WM_QUIT)					// If the message wasn't to quit				break;			TranslateMessage(&msg);						// Find out what the message does			DispatchMessage(&msg);						// Execute the message		}		else											// if there wasn't a message		{ 					if(AnimateNextFrame(60))					// Make sure we only animate 60 FPS			{				g_Camera.Update();						// Update the camera information				RenderScene();							// Render the scene every frame			}			else			{				Sleep(1);								// Let other processes work			}		} 	}	DeInit();											// Clean up and free all allocated memory	return(msg.wParam);									// Return from the program}
开发者ID:88er,项目名称:tutorials,代码行数:31,


示例13: MainLoop

WPARAM MainLoop(){	MSG msg;	// This is where we load our accelerators for keyboard shortcuts	HACCEL hAccelTable = LoadAccelerators(g_hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR1));	while(1)											// Do our infinite loop	{													// Check if there was a message		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))         { 			if(msg.message == WM_QUIT)					// If the message wasn't to quit				break;			// Check if there was keyboard command - if not, process messages like normal			if(!TranslateAccelerator(g_hWnd, hAccelTable, &msg))			{				TranslateMessage(&msg);					// Find out what the message does				DispatchMessage(&msg);					// Execute the message			}			RenderScene();								// Since no animation, only render when the user does something        } 	}		DeInit();											// Clean up and free all allocated memory	return(msg.wParam);									// Return from the program}
开发者ID:Allenjonesing,项目名称:tutorials,代码行数:29,


示例14: DeInit

void Replay::Init(bool rec){  DeInit();  is_recorder = rec;  replay_state = (rec) ? PAUSED_RECORD : PAUSED_PLAY;}
开发者ID:fluxer,项目名称:warmux,代码行数:7,


示例15: MainLoop

WPARAM MainLoop(){	MSG msg;	while(1)											// Do our infinite loop	{													// Check if there was a message		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))         { 			if(msg.message == WM_QUIT)					// If the message wasn't to quit				break;            TranslateMessage(&msg);						// Find out what the message does            DispatchMessage(&msg);						// Execute the message        }		else											// if there wasn't a message		{ 			// Render the scene every frame to update the rotating cube			RenderScene();								       } 	}	DestroyFont();										// This frees up our font display list										DeInit();											// Release memory and restore settings	return(msg.wParam);									// Return from the program}
开发者ID:Allenjonesing,项目名称:tutorials,代码行数:25,


示例16: DeInit

void GameState::Unload(void){	// THis needs to go first	DeInit();	backdrop.Free();	terrainMesh.Destroy();	levelUp.Unload();	/*	if (castleDoorLight)		lightSourceManager->ReleaseLightSource(castleDoorLight);	castleDoorLight=0;	*/	centeredMessage.Unload();	bottomMessage.Unload();	for (int i=0; i < NUMBER_OF_PERKS_TO_DRAW; i++)		perkWidgets[i].Unload();	userChatMessageInput.Unload();	chatMessageContainer.Unload();	lightedSphere.Unload();	// In case they resize the screen in a multiplayer game don't let them keep playing with new stats	rakClient->Disconnect();	rakServer->Disconnect();}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:26,


示例17: DeInit

int CGameRound::Init(CTable *table){  if (table == NULL)  	return 0;  DeInit();    m_Table = table;    m_AllPhases[GAME_PHASE_PRESTART] = new CPreStartPhase(this);  if (m_AllPhases[GAME_PHASE_PRESTART] == NULL)  	return 0;  m_AllPhases[GAME_PHASE_JUDGE] = new CJudgePhase(this);  if (m_AllPhases[GAME_PHASE_JUDGE] == NULL)  	return 0;  m_AllPhases[GAME_PHASE_DRAWCARD] = new CDrawCardPhase(this);  if (m_AllPhases[GAME_PHASE_DRAWCARD] == NULL)  	return 0;  m_AllPhases[GAME_PHASE_OUTCARD] = new COutCardPhase(this);  if (m_AllPhases[GAME_PHASE_OUTCARD] == NULL)  	return 0;  m_AllPhases[GAME_PHASE_THROWCARD] = new CThrowCardPhase(this);  if (m_AllPhases[GAME_PHASE_THROWCARD] == NULL)  	return 0;  m_AllPhases[GAME_PHASE_AFTER_THROWCARD] = new CAfterThrowCardPhase(this);  if (m_AllPhases[GAME_PHASE_AFTER_THROWCARD] == NULL)  	return 0;  m_CurrentPhase = m_AllPhases[GAME_PHASE_PRESTART];  return 1;}
开发者ID:albertww,项目名称:myonepiece,代码行数:31,


示例18: buf

Replay::Replay()  : buf(NULL)  , bufsize(0)  , is_recorder(true){  DeInit();}
开发者ID:fluxer,项目名称:warmux,代码行数:7,


示例19: DeInit

COceanRenderObject::~COceanRenderObject(){	DeInit();	if (m_bAddToHierarchy)	{		RemoveFromHierarchy();	}}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:8,


示例20: DeInit

void Base_Ocean::Init(float worldsize, float gridsize){	DeInit();	World_Size = worldsize;	Grid_Size = gridsize;	size_t count = static_cast<size_t>(((World_Size/Grid_Size)/8)*(World_Size/Grid_Size));	Ocean_Grid_bits.resize(count);	memset(&Ocean_Grid_bits[0], 0, count);}
开发者ID:LazyNarwhal,项目名称:Destination_Toolkit,代码行数:8,


示例21: DeInit

//[-------------------------------------------------------]//[ Private virtual PLRenderer::Surface functions         ]//[-------------------------------------------------------]bool SurfaceTextureBuffer::Init(){	// First, de-initialize the old stuff	DeInit();	// Can we use a nice frame buffer object?	return CreateFBO();}
开发者ID:ByeDream,项目名称:pixellight,代码行数:11,


示例22: DeInit

/** * Deconstructor *  */cAllwinnerDevice::~cAllwinnerDevice(){    DeInit();    //delete m_omx;    //delete m_audio;    delete m_mutex;}// end of method
开发者ID:rofehr,项目名称:omxhddevice,代码行数:12,


示例23: DeInit

CPickingPhysicsObject::~CPickingPhysicsObject(){	DeInit();	if( m_bAddToHierarchy )	{		RemoveFromHierarchy();	}}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:9,


示例24: DeInit

CTriggerPhysicsObject::~CTriggerPhysicsObject(){	DeInit();	if( m_bAddToHierarchy )	{		RemoveFromHierarchy();	}}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:9,


示例25: DeInit

bool CDX9TextureObject::MakeBlankTexture( UINT sizex, UINT sizey, UINT colordepth, IHashString * hformat, UINT mips ){	DeInit();	LPDIRECT3DDEVICE9 pDevice;	if( !m_Renderer )	{		return false;	}	pDevice = (LPDIRECT3DDEVICE9)m_Renderer->GetAPIDevice();	if( !pDevice )	{		return false;	}	UINT numMips = mips;	CDX9Renderer * crend = dynamic_cast<CDX9Renderer*>(m_Renderer);	D3DFORMAT format = D3DFMT_A8R8G8B8;	if( hformat )	{		format = EEDX9FormatFromString( hformat );		if( format == D3DFMT_UNKNOWN )		{			format = D3DFMT_A8R8G8B8;		}					m_Compressed = EEDX9IsCompressedFormat( format );	}	else		format = EEDX9FormatFromColorBits( colordepth );	//create new texture		LPDIRECT3DTEXTURE9 temptex;	//TODO: more control over texture creation?	if(FAILED(pDevice->CreateTexture( sizex, //width									 sizey, //height									numMips, //number of mips									0,	//usage - 0 unless for render targets									format,									D3DPOOL_MANAGED, //TODO: managed vs. Unmanaged! unmanaged you can't lock!																	&temptex,									NULL)))		{			return false;		}			if( !temptex )	{		return false;	}		m_Texture = temptex;	m_Height = sizey;	m_Width = sizex;	m_ColorDepth = colordepth;	m_bRenderTarget = false;	return true;}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:56,


示例26: DeInit

CDDACodec::~CDDACodec(){  DeInit();  if (m_Buffer)  {    delete[] m_Buffer;    m_Buffer = NULL;  }}
开发者ID:Foozle303,项目名称:xbmc,代码行数:10,


示例27: DeInit

CLameDecoder::~CLameDecoder(){	if(m_pDebug != NULL)	{		delete m_pDebug;		m_pDebug = NULL;	}	DeInit();}
开发者ID:killbug2004,项目名称:cosps,代码行数:10,



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


C++ Deactivate函数代码示例
C++ Dbprintf函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。