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

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

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

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

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

示例1: Connect

int CIpSocket::Connect( const t_string &x_sAddress, unsigned int x_uPort ){	if ( !x_sAddress.length() )        return 0;	// Punt if not initialized	if ( !IsInitialized() )		return 0;	CIpAddress addr;    // Were we passed a URL?    if ( !x_uPort && addr.LookupUri( x_sAddress ) )		return Connect( addr );	// Lookup the host address    if ( addr.LookupHost( x_sAddress, x_uPort ) )		return Connect( addr );	return 0;}
开发者ID:AmberSandDan,项目名称:htmapp,代码行数:21,


示例2: SetupRegion

logical pc_ADK_Field :: SetupRegion ( ){  PropertyHandle        *pfc = GetParentProperty();  PropertyHandle        *my_class  = pfc->GPH("class");  PropertyHandle        *member;  logical                coll_opt;  char                  *type;  char                  *propnames = NULL;  logical                term = NO;BEGINSEQ  if ( IsInitialized() )                             LEAVESEQ    propnames = strdup(GPH("sys_ident")->GetString());  if ( !my_class->Get(FIRST_INSTANCE) )              ERROR  pc_ADK_Class   structure(*my_class);    if ( member = structure.GetMember(propnames) )    coll_opt = pc0_SDB_Member(member).IsMultipleRef() ? YES : NO;  else  {    pc_ADK_Class  all_class(GetObjectHandle(),PI_Read);      PropertyHandle phpropnames(propnames);    if ( all_class.Get(phpropnames) )    {      type     = "DRT_Extent";      coll_opt = YES;    }  }  *GPH("auto_open") = YES;  SetupDataSource(propnames,type,coll_opt);  SetupTitle(propnames);RECOVER  term = YES;ENDSEQ  if ( propnames )    free(propnames);  return(term);}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:40,


示例3: GetState

/*** Runs given function in script file and stores the retruned number or string.***/int LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, std::wstring& strValue){    auto L = GetState();    int type = LUA_TNIL;    if (IsInitialized())    {        // Push our table onto the stack        lua_rawgeti(L, LUA_GLOBALSINDEX, m_Ref);        // Push the function onto the stack        lua_getfield(L, -1, funcName);        if (lua_pcall(L, 0, 1, 0))        {            LuaManager::ReportErrors(m_File);            lua_pop(L, 1);        }        else        {            type = lua_type(L, -1);            if (type == LUA_TNUMBER)            {                numValue = lua_tonumber(L, -1);            }            else if (type == LUA_TSTRING)            {                size_t strLen = 0;                const char* str = lua_tolstring(L, -1, &strLen);                strValue = m_Unicode ?                           StringUtil::WidenUTF8(str, (int)strLen) : StringUtil::Widen(str, (int)strLen);                numValue = strtod(str, nullptr);            }            lua_pop(L, 2);        }    }    return type;}
开发者ID:jithuin,项目名称:infogeezer,代码行数:44,


示例4: RegisterComponentCreator

// ---------------------------------------------------------------------------// VComponentManager::RegisterComponentCreator						[static]// ---------------------------------------------------------------------------// Install a component creator function. If a library based creator exists,// the new one will overwrite it.//VError VComponentManager::RegisterComponentCreator(CType inType, CreateComponentProcPtr inProcPtr, Boolean inOverwritePrevious){	if (!IsInitialized()) return VE_COMP_UNITIALISED;		VError	error = VE_OK;		sAccessingTypes->Lock();	sAccessingChecked->Lock();		// Make sure the proc isn't allready installed	sLONG	index = sComponentTypes->FindPos(inType);	if (index > 0 && !inOverwritePrevious && sComponentProcs->GetNth(index) == inProcPtr)	{		error = VE_COMP_ALLREADY_REGISTRED;	}		if (error == VE_OK)	{		if (index > 0)		{			// Replace old one			sComponentProcs->SetNth(inProcPtr, index);		}		else		{			// Add new one at end of list			sComponentProcs->AddTail(inProcPtr);			sComponentTypes->AddTail(inType);			sComponentLibraries->AddTail(NULL);					// Reset checking for unavailable components			ResetComponentRequirements(inType, false);		}	}		sAccessingChecked->Unlock();	sAccessingTypes->Unlock();			return error;}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:46,


示例5: NS_ABORT_IF_FALSE

nsresultOmnijar::GetURIString(Type aType, nsACString& aResult){  NS_ABORT_IF_FALSE(IsInitialized(), "Omnijar not initialized");  aResult.Truncate();  // Return an empty string for APP in the unified case.  if ((aType == APP) && sIsUnified) {    return NS_OK;  }  nsAutoCString omniJarSpec;  if (sPath[aType]) {    nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec);    if (NS_WARN_IF(NS_FAILED(rv))) {      return rv;    }    aResult = "jar:";    if (sIsNested[aType]) {      aResult += "jar:";    }    aResult += omniJarSpec;    aResult += "!";    if (sIsNested[aType]) {      aResult += "/" NS_STRINGIFY(OMNIJAR_NAME) "!";    }  } else {    nsCOMPtr<nsIFile> dir;    nsDirectoryService::gService->Get(SPROP(aType), NS_GET_IID(nsIFile),                                      getter_AddRefs(dir));    nsresult rv = NS_GetURLSpecFromActualFile(dir, aResult);    if (NS_WARN_IF(NS_FAILED(rv))) {      return rv;    }  }  aResult += "/";  return NS_OK;}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:40,


示例6: Serialize

	//! serializes the entity to/from a PropertyStream	void ParticleGenerator::Serialize(PropertyStream& stream)	{		super::Serialize(stream);				bool bMaxParticlesChanged = stream.Serialize(PT_UInt, "MaxParticles", &m_MaxParticles);		stream.Serialize(PT_Int, "ParticlesPerSecond", &m_ParticlesPerSecond);		stream.Serialize(PT_Range, "ParticleLife", &m_rParticleLife);		stream.Serialize(PT_Range, "ParticleSpeed", &m_rParticleInitialSpeed);		bool bParticleSizeChanged = stream.Serialize(PT_Float, "ParticleSize", &m_fParticleSize);		stream.Serialize(PT_Vec3, "Direction", &m_vDirection);		stream.Serialize(PT_Vec3, "Gravity", &m_vGravity);		stream.Serialize(PT_AABBox3D, "EmitBox", &m_EmitBox);		stream.Serialize(PT_AABBox3D, "BoundingBox", &m_BoundingBox);		stream.Serialize(PT_UInt, "PoolSize", &m_PoolSize);		if(stream.Serialize(PT_Float, "ActiveTime", &m_fActiveTime))		{			m_bActive = true;		}		stream.Serialize(PT_Bool, "Explosive", &m_bExplosive);		bool bApplyWorldTransformChanged = stream.Serialize(PT_Bool, "ApplyWorldTransform", &m_bApplyWorldTransform);						if(IsInitialized())		{			VertexBuffer* pVertexBuffer = GetComponent<GraphicComponent>()->GetVertexBuffer();			bool bPointSprite = GraphicExtensionHandler::Instance()->HasExtension(GraphicExtensionHandler::E_PointSprite);			if(bMaxParticlesChanged)			{				u32 numVertices = bPointSprite ? m_MaxParticles : m_MaxParticles*6;				pVertexBuffer->SetVertices(snew Vertex3D[numVertices], numVertices);			}			if(bParticleSizeChanged && bPointSprite)			{				static_cast<PointSpriteStateSetter*>(pVertexBuffer->GetRenderStateSetter())->SetPointSize(m_fParticleSize);			}			if(bApplyWorldTransformChanged)			{				pVertexBuffer->SetApplyWorldTransforms(m_bApplyWorldTransform);			}		}	}	
开发者ID:aminere,项目名称:VLADHeavyStrikePublic,代码行数:41,


示例7: AfxMessageBox

TextVisitor::TextVisitor(LPCTSTR fileName){	m_topLevel = 0;	m_lastNoteNr = 0;	m_initOk = TRUE;	m_buffer = NULL;	m_connents = "";	if(!m_outFile.Open(fileName, CFile::modeCreate | CFile::modeWrite)){		m_initOk = FALSE;		AfxMessageBox(IDS_OPEN_ERR);	}	if(IsInitialized()){		for(int i = 0; i < 40; i++){			m_separator += _T("-");		}		m_separator += NL;		CString title;		AfxGetApp()->m_pMainWnd->GetWindowText(title);		WriteTextLn(title + _T(" generated on ") + XMLDoc::GetTimeString());		WriteTextLn(CString(_T("")));	}}
开发者ID:madebits,项目名称:cpp-mfc-vnotes,代码行数:22,


示例8: TermLevel

// ----------------------------------------------------------------------- //////	ROUTINE:	CMusic::TermMusicLevel////	PURPOSE:	Terminate Music for Current Game Level//// ----------------------------------------------------------------------- //void CMusic::TermLevel(){	// make sure mgrs are initialized	if (!IsInitialized()) return;	if (m_pMusicMgr == NULL) return;	// make sure directmusic mgr was available	if (m_pMusicMgr != NULL)	{		// initialize the music mgr		m_pMusicMgr->TermLevel();	}	{ // BL 09/26/00		// clear the state		m_State.Clear();	}	// set level initialized flag	m_bLevelInitialized = FALSE;}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:29,


示例9: RemoveAudioChannelLayout

//_____________________________________________________________________________//OSStatus 	AUPannerBase::SetAudioChannelLayout(		AudioUnitScope 				inScope, 														AudioUnitElement 			inElement,														const AudioChannelLayout *	inLayout){	if (!inLayout)		return RemoveAudioChannelLayout(inScope, inElement);	if (!ChannelLayoutTagIsSupported(inScope, inElement, inLayout->mChannelLayoutTag))		return kAudioUnitErr_FormatNotSupported;		CAAudioChannelLayout* caacl = NULL;	UInt32 currentChannels;	switch (inScope) 	{		case kAudioUnitScope_Input:			caacl = &mInputLayout;			currentChannels = GetNumberOfInputChannels();			break;		case kAudioUnitScope_Output:			caacl = &mOutputLayout;			currentChannels = GetNumberOfOutputChannels();			break;		default:			return kAudioUnitErr_InvalidScope;	}		if (inElement != 0)		return kAudioUnitErr_InvalidElement;	UInt32 numChannelsInLayout = CAAudioChannelLayout::NumberChannels(*inLayout);	if (currentChannels != numChannelsInLayout)		return kAudioUnitErr_InvalidPropertyValue;		*caacl = inLayout;	if (IsInitialized())		UpdateBypassMatrix();			return noErr;}
开发者ID:0xJoker,项目名称:apple-ios-samples,代码行数:41,


示例10: Listen

int CIpSocket::Listen( unsigned int x_uMaxConnections ){	// Punt if not initialized	if ( !IsInitialized() )		return 0;	// Must have socket	if ( !IsSocket() )	{	m_uConnectState |= eCsError;		return 0;	} // end if	// Valid number of connections?	if ( x_uMaxConnections == 0 )		x_uMaxConnections = 16;//		x_uMaxConnections = SOMAXCONN;	// Start the socket listening	int nRet = listen( (SOCKET)m_hSocket, (int)( x_uMaxConnections ? x_uMaxConnections : SOMAXCONN ) );	// Save the last error code	m_uLastError = WSAGetLastError();	if ( WSAEWOULDBLOCK == m_uLastError )		m_uLastError = 0, nRet = 0;	// Error?	if ( c_SocketError == (t_SOCKET)nRet )	{	m_uConnectState |= eCsError;		return 0;	} // end if	// We're trying to connect	m_lActivity++;	m_uConnectState |= eCsConnecting;	// Return the result	return 1;}
开发者ID:summit4you,项目名称:QThybrid,代码行数:38,


示例11: UnRegisterComponentCreator

// ---------------------------------------------------------------------------// VComponentManager::UnRegisterComponentCreator					[static]// ---------------------------------------------------------------------------// Remove a component creator function. If a library based creator exists,// it will become the defaut one.//VError VComponentManager::UnRegisterComponentCreator(CType inType, CreateComponentProcPtr inProcPtr){	if (!IsInitialized()) return VE_COMP_UNITIALISED;		VError	error = VE_COMP_LIBRARY_NOT_FOUND;		sAccessingTypes->Lock();	sAccessingChecked->Lock();		// Make sure the proc is installed	sLONG	index = sComponentTypes->FindPos(inType);	if (index > 0 && sComponentProcs->GetNth(index) == inProcPtr)	{		VLibrary*	library = sComponentLibraries->GetNth(index);				if (library == NULL)		{			sComponentLibraries->DeleteNth(index);			sComponentProcs->DeleteNth(index);			sComponentTypes->DeleteNth(index);					// Reset checking for available components			ResetComponentRequirements(inType, true);		}		else		{			library->Release();			sComponentProcs->SetNth(NULL, index);		}				error = VE_OK;	}		sAccessingChecked->Unlock();	sAccessingTypes->Unlock();		return error;}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:44,


示例12: Init

// ----------------------------------------------------------------------- //////	ROUTINE:	CMusic::Init////	PURPOSE:	Initialize the music//// ----------------------------------------------------------------------- //LTBOOL CMusic::Init( ILTClient *pClientDE){	// make sure we are not already initialized    if (IsInitialized()) return LTTRUE;	m_pClientDE = pClientDE;	m_bMusicEnabled = TRUE;	m_bLevelInitialized = FALSE;	m_pMusicMgr = NULL;	// get the musicenable console var    HCONSOLEVAR hVar = g_pLTClient->GetConsoleVar("disablemusic");	if (hVar)	{		// check if music is disabled        if (((int)g_pLTClient->GetVarValueFloat(hVar)) != 0)		{			m_bMusicEnabled = FALSE;		}	}	// if music is enabled	if (MusicEnabled())	{		// get a pointer to the music mgr        m_pMusicMgr = g_pLTClient->GetDirectMusicMgr();		// make sure directmusic mgr was available		if (m_pMusicMgr != NULL)		{			// initialize the music mgr			m_pMusicMgr->Init();		}	}    return LTTRUE;}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:45,


示例13: switch

void SerialPortC::SetSpeed(PortSpeedE NewSpeed)	{	Speed = NewSpeed;	int rs_Baud;	switch (NewSpeed)		{		default: assert(FALSE);		case PS_300:	{ rs_Baud = 2; break; }		case PS_600:	{ rs_Baud = 3; break; }		case PS_1200:	{ rs_Baud = 4; break; }		case PS_2400:	{ rs_Baud = 5; break; }		case PS_4800:	{ rs_Baud = 6; break; }		case PS_9600:	{ rs_Baud = 7; break; }		case PS_19200:	{ rs_Baud = 8; break; }		case PS_38400:	{ rs_Baud = 9; break; }		case PS_57600:	{ rs_Baud = 10; break; }		case PS_115200: { rs_Baud = 11; break; }		}	// disable interrupts for baud change	if (IsInitialized())		{		Deinit();		}	assert(initrs);	(*initrs)((cfg.mdata - 1), rs_Baud, 0, 0, 3, cfg.checkCTS);	SetInitialized();	if (cfg.baudPause)		{		pause(cfg.baudPause);		}	}
开发者ID:dylancarlson,项目名称:citplus,代码行数:38,


示例14: Flush

OMX_ERRORTYPE COMXCoreTunel::Flush(){  if(!m_DllOMXOpen || !m_src_component || !m_dst_component || !m_tunnel_set || !IsInitialized())    return OMX_ErrorUndefined;  Lock();  OMX_ERRORTYPE omx_err = OMX_ErrorNone;  if(m_src_component->GetComponent())  {    omx_err = m_src_component->SendCommand(OMX_CommandFlush, m_src_port, NULL);    if(omx_err != OMX_ErrorNone && omx_err != OMX_ErrorSameState)    {      CLog::Log(LOGERROR, "COMXCoreTunel::Flush - Error flush  port %d on component %s omx_err(0x%08x)",           m_src_port, m_src_component->GetName().c_str(), (int)omx_err);    }  }  if(m_dst_component->GetComponent())  {    omx_err = m_dst_component->SendCommand(OMX_CommandFlush, m_dst_port, NULL);    if(omx_err != OMX_ErrorNone && omx_err != OMX_ErrorSameState)    {      CLog::Log(LOGERROR, "COMXCoreTunel::Flush - Error flush port %d on component %s omx_err(0x%08x)",           m_dst_port, m_dst_component->GetName().c_str(), (int)omx_err);    }  }  if(m_src_component->GetComponent())    omx_err = m_src_component->WaitForCommand(OMX_CommandFlush, m_src_port);  if(m_dst_component->GetComponent())    omx_err = m_dst_component->WaitForCommand(OMX_CommandFlush, m_dst_port);  UnLock();  return OMX_ErrorNone;}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:plex-home-theatre,代码行数:38,


示例15: event_level

Eluna::Eluna() :event_level(0),push_counter(0),enabled(false),L(NULL),eventMgr(NULL),ServerEventBindings(NULL),PlayerEventBindings(NULL),GuildEventBindings(NULL),GroupEventBindings(NULL),VehicleEventBindings(NULL),BGEventBindings(NULL),PacketEventBindings(NULL),CreatureEventBindings(NULL),CreatureGossipBindings(NULL),GameObjectEventBindings(NULL),GameObjectGossipBindings(NULL),ItemEventBindings(NULL),ItemGossipBindings(NULL),PlayerGossipBindings(NULL),MapEventBindings(NULL),InstanceEventBindings(NULL),CreatureUniqueBindings(NULL){    ASSERT(IsInitialized());    OpenLua();    // Replace this with map insert if making multithread version    // Set event manager. Must be after setting sEluna    // on multithread have a map of state pointers and here insert this pointer to the map and then save a pointer of that pointer to the EventMgr    eventMgr = new EventMgr(&Eluna::GEluna);}
开发者ID:AlexShiLucky,项目名称:Eluna,代码行数:38,


示例16: ChannelData

int LMEConnection::ChannelData(UINT32 recipientChannel,			       UINT32 len, unsigned char *buffer){	if (!IsInitialized()) {		PRINT("State: not connected to HECI./n");		return false;	}	APF_CHANNEL_DATA_MESSAGE *message;	if (len > _heci.GetBufferSize() - sizeof(APF_CHANNEL_DATA_MESSAGE)) {		return -1;	}	message = (APF_CHANNEL_DATA_MESSAGE *)_txBuffer;	message->MessageType = APF_CHANNEL_DATA;	message->RecipientChannel = htonl(recipientChannel);	message->DataLength = htonl(len);	memcpy(message->Data, buffer, len);	PRINT("Sending %d bytes to recipient channel %d./n", len, recipientChannel);	return _sendMessage((unsigned char *)message, sizeof(APF_CHANNEL_DATA_MESSAGE) + len);}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:23,


示例17: OP_ASSERT

OP_STATUS OpHashTable::Remove(const void* key, void** data){	OP_ASSERT(data != NULL);	*data = NULL;	if (!IsInitialized())	{		return OpStatus::ERR;	}	if (nr_of_elements <= minimumNrOfElements[hash_size_index] && hash_size_index > 0 && minimumNrOfElements[hash_size_index - 1] >= minimum_nr_of_elements)	{		OP_STATUS ret_val = Rehash(hash_size_index - 1);		if (OpStatus::IsSuccess(ret_val))		{				hash_size_index--;		}	}	RETURN_IF_ERROR(hash_backend.Remove(key, data)); // Never returns ERR_NO_MEMORY.	nr_of_elements--;	return OpStatus::OK;}
开发者ID:prestocore,项目名称:browser,代码行数:23,


示例18: RetainComponent

CComponent* VComponentManager::RetainComponent(CRef inRef){	if (!IsInitialized()) return NULL;		CComponent*	component = NULL;	VArrayIteratorOf<CComponent*>	iterator(*sComponentInstances);		sAccessingInstances->Lock();		// Iterate through instances	while ((component = iterator.Next()) != NULL)	{		if (component->GetComponentRef() == inRef)		{			component->Retain();			break;		}	}		sAccessingInstances->Unlock();		return component;}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:23,


示例19: Initialize

// -------------------------------------// Initialization functions//QTTrack::ErrorCode QTTrack::Initialize(void){    // Temporary vars    QTFile::AtomTOCEntry    *tempTOCEntry;    //    // Don't initialize more than once.    if( IsInitialized() )        return errNoError;    //    // Make sure that we were able to read in our track header atom.    if( fTrackHeaderAtom == NULL )        return errInvalidQuickTimeFile;    //    // See if this track has a name and load it in.    if( fFile->FindTOCEntry(":udta:name", &tempTOCEntry, &fTOCEntry) ) {        fTrackName = NEW char[ (SInt32) (tempTOCEntry->AtomDataLength + 1) ];        if( fTrackName != NULL )            fFile->Read(tempTOCEntry->AtomDataPos, fTrackName, (UInt32) tempTOCEntry->AtomDataLength);    }
开发者ID:248668342,项目名称:ffmpeg-windows,代码行数:26,


示例20: switch

/*! @method SetProperty */OSStatus			AUPannerBase::SetProperty(AudioUnitPropertyID 		inID,										AudioUnitScope 				inScope,										AudioUnitElement 			inElement,										const void *				inData,										UInt32 						inDataSize){	switch (inID) 	{		case kAudioUnitProperty_BypassEffect:				if (inDataSize < sizeof(UInt32))					return kAudioUnitErr_InvalidPropertyValue;				bool tempNewSetting = *((UInt32*)inData) != 0;					// we're changing the state of bypass				if (tempNewSetting != IsBypassEffect()) 				{					if (!tempNewSetting && IsBypassEffect() && IsInitialized()) // turning bypass off and we're initialized						Reset(0, 0);					SetBypassEffect (tempNewSetting);				}				return noErr;	}    return AUBase::SetProperty(inID, inScope, inElement, inData, inDataSize);}
开发者ID:0xJoker,项目名称:apple-ios-samples,代码行数:24,


示例21: Create

BOOL CWinSocket::Create( int af, int type, int protocol ){_STT();	// Punt if not initialized	if ( !IsInitialized() ) { TRACE( "CWinSocket: Error - Call InitSockets()" ); return FALSE; }	// Close any open socket	Destroy();	// Create a scocket	m_hSocket = socket( af, type, protocol );		// Save the last error code	m_uLastError = WSAGetLastError();	// Create the event handle	CreateEventHandle();	// Capture all events	EventSelect();	return IsSocket();}
开发者ID:aminsyed,项目名称:rulib,代码行数:23,


示例22: return

int Ifpack2_SparseContainer<T>::Compute(const Tpetra_RowMatrix& Matrix_in){    IsComputed_ = false;    if (!IsInitialized()) {        IFPACK2_CHK_ERR(Initialize());    }    // extract the submatrices    IFPACK2_CHK_ERR(Extract(Matrix_in));    // initialize the inverse operator    IFPACK2_CHK_ERR(Inverse_->Initialize());    // compute the inverse operator    IFPACK2_CHK_ERR(Inverse_->Compute());    Label_ = "Ifpack2_SparseContainer";    IsComputed_ = true;    return(0);}
开发者ID:haripandey,项目名称:trilinos,代码行数:23,


示例23:

	//! serializes the entity to/from a PropertyStream	void ParticleGenerator2D::Serialize(PropertyStream& stream)	{		super::Serialize(stream);				bool bMaxParticlesChanged = stream.Serialize(PT_UInt, "MaxParticles", &m_MaxParticles);		stream.Serialize(PT_Int, "ParticlesPerSecond", &m_ParticlesPerSecond);		stream.Serialize(PT_Range, "ParticleLife", &m_rParticleLife);		stream.Serialize(PT_Range, "ParticleSpeed", &m_rParticleInitialSpeed);		bool bParticleSizeChanged = stream.Serialize(PT_Float, "ParticleSize", &m_fParticleSize);		stream.Serialize(PT_Vec2, "Direction", &m_vDirection);		stream.Serialize(PT_Vec2, "Gravity", &m_vGravity);		stream.Serialize(PT_UInt, "PoolSize", &m_PoolSize);		bool bApplyWorldTransformChanged = stream.Serialize(PT_Bool, "ApplyWorldTransform", &m_bApplyWorldTransform);				if(stream.Serialize(PT_Float, "ActiveTime", &m_fActiveTime))		{			m_bActive = true;		}		stream.Serialize(PT_Bool, "Explosive", &m_bExplosive);						if(IsInitialized())		{			VertexBuffer* pVertexBuffer = GetComponent<GraphicComponent>()->GetVertexBuffer();			if(bMaxParticlesChanged)			{				pVertexBuffer->SetVertices(snew Vertex3D[m_MaxParticles], m_MaxParticles);			}			if(bParticleSizeChanged)			{				static_cast<PointSpriteStateSetter*>(pVertexBuffer->GetRenderStateSetter())->SetPointSize(m_fParticleSize);			}			if(bApplyWorldTransformChanged)			{				pVertexBuffer->SetApplyWorldTransforms(m_bApplyWorldTransform);			}		}	}	
开发者ID:aminere,项目名称:VLADHeavyStrikePublic,代码行数:38,


示例24: Play

// ----------------------------------------------------------------------- //////	ROUTINE:	CMusic::Play////	PURPOSE:	Begin playing music//// ----------------------------------------------------------------------- //// Begin playing musicvoid CMusic::Play(int32 nIntensity /* = -1 */, int32 nStart /* = LTDMEnactDefault */){	// make sure mgrs are initialized	if (!IsInitialized()) return;	if (!IsLevelInitialized()) return;	if (m_pMusicMgr == NULL) return;	if ( !m_bPlaying )	{		m_pMusicMgr->Play();	}	m_State.bPlaying = LTTRUE;	m_bPlaying = LTTRUE;	if ( nIntensity == -1 )	{		m_pMusicMgr->ChangeIntensity(m_State.nIntensity, m_State.nIntensityEnact);	}	else	{		m_pMusicMgr->ChangeIntensity(nIntensity, (LTDMEnactTypes)nStart);	}}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:32,


示例25: IsNeedCollect

//----------------------------------------------------------------------------------------------bool CActor::IsNeedCollect(){	if (!IsInitialized() || !bMarkerDeleteFlag){ // do not check not fully initialized objects		return false;	}	if (IsPendingToDelete()) // need to be deleted	{		return true;	}	else	{		TVecActorChildIterator IterActor = m_ChildNodes.begin();		while (IterActor != m_ChildNodes.end())		{			if ((*IterActor)->IsNeedCollect()) // found pending to delete child object			{				return true;						}			++IterActor;		}	}	return false;}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:25,


示例26: SetMatrixElement

int Ifpack2_SparseContainer<T>::SetMatrixElement(const int row, const int col, const double value){    if (!IsInitialized())        IFPACK2_CHK_ERR(-3); // problem not shaped yet    if ((row < 0) || (row >= NumRows())) {        IFPACK2_CHK_ERR(-2); // not in range    }    if ((col < 0) || (col >= NumRows())) {        IFPACK2_CHK_ERR(-2); // not in range    }    int ierr = Matrix_->InsertGlobalValues((int)row,1,(double*)&value,(int*)&col);    if (ierr < 0) {        ierr = Matrix_->SumIntoGlobalValues((int)row,1,(double*)&value,(int*)&col);        if (ierr < 0)            IFPACK2_CHK_ERR(-1);    }    return(0);}
开发者ID:haripandey,项目名称:trilinos,代码行数:24,


示例27: Bind

BOOL CWinSocket::Bind(UINT uPort){_STT();	// Punt if not initialized	if ( !IsInitialized() ) { TRACE( "CWinSocket: Error - Call InitSockets()" ); return FALSE; }	// Create socket if there is none	if ( !IsSocket() && !Create() ) 	{	Destroy(); return FALSE; }	sockaddr_in sai;	ZeroMemory( &sai, sizeof( sai ) );	sai.sin_family = PF_INET;	sai.sin_port = htons( (WORD)uPort );	// Attempt to bind the socket	int nRet = bind( m_hSocket, (sockaddr*)&sai, sizeof( sockaddr_in ) );	// Save the last error code	m_uLastError = WSAGetLastError();	return !nRet;}
开发者ID:aminsyed,项目名称:rulib,代码行数:24,


示例28: Bind

int CIpSocket::Bind( unsigned int x_uPort ){	// Punt if not initialized	if ( !IsInitialized() )		return 0;	// Create socket if there is none	if ( !IsSocket() && !Create() )	{	Destroy();		m_uConnectState |= eCsError;		return 0;	} // end if	sockaddr_in sai;	ZeroMemory( &sai, sizeof( sai ) );	sai.sin_family = PF_INET;	sai.sin_port = htons( (WORD)x_uPort );	// Attempt to bind the socket	int nRet = bind( (SOCKET)m_hSocket, (sockaddr*)&sai, sizeof( sockaddr_in ) );	// Save the last error code	m_uLastError = WSAGetLastError();	if ( WSAEWOULDBLOCK == m_uLastError )		m_uLastError = 0, nRet = 0;	// Grab the address	CIpSocket_GetAddressInfo( &m_addrLocal, &sai );	if ( nRet )	{	m_uConnectState |= eCsError;		return 0;	} // end if	return 1;}
开发者ID:summit4you,项目名称:QThybrid,代码行数:36,


示例29: RestoreMusicState

LTBOOL CMusic::RestoreMusicState(const CMusicState & newState){    if (!IsInitialized()) return LTFALSE;	// See if the new state is valid...	if (!strlen(newState.szDirectory) || !strlen(newState.szControlFile))	{		return LTFALSE;	}	// See if anything has changed...	if ((stricmp(m_State.szDirectory, newState.szDirectory) != 0) ||		(stricmp(m_State.szControlFile, newState.szControlFile) != 0))	{		if (!InitLevel((char*)newState.szDirectory, (char*)newState.szControlFile))		{            return LTFALSE;		}	}    return LTTRUE;}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:24,



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


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