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

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

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

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

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

示例1: DeleteRelationships

void CSovereign::InitRelationships (void)//	InitRelationships////	Initialize relationships from XML element	{	int i;	DeleteRelationships();	if (m_pInitialRelationships)		{		for (i = 0; i < m_pInitialRelationships->GetContentElementCount(); i++)			{			CXMLElement *pRelDesc = m_pInitialRelationships->GetContentElement(i);			CSovereign *pTarget = g_pUniverse->FindSovereign(pRelDesc->GetAttributeInteger(SOVEREIGN_ATTRIB));			if (pTarget)				{				CString sDisposition = pRelDesc->GetAttribute(DISPOSITION_ATTRIB);				if (strEquals(sDisposition, DISP_FRIEND))					SetDispositionTowards(pTarget, dispFriend);				else if (strEquals(sDisposition, DISP_NEUTRAL))					SetDispositionTowards(pTarget, dispNeutral);				else if (strEquals(sDisposition, DISP_ENEMY))					SetDispositionTowards(pTarget, dispEnemy);				}			}		}	}
开发者ID:alanhorizon,项目名称:Transport,代码行数:30,


示例2: if

ALERROR CDeviceClass::ParseLinkedFireOptions (SDesignLoadCtx &Ctx, const CString &sDesc, DWORD *retdwOptions)//	ParseLinkedFireOptions////	Parses a linked-fire options string.	{	DWORD dwOptions = 0;	if (sDesc.IsBlank())		;	else if (strEquals(sDesc, LINKED_FIRE_ALWAYS))		dwOptions |= CDeviceClass::lkfAlways;	else if (strEquals(sDesc, LINKED_FIRE_TARGET))		dwOptions |= CDeviceClass::lkfTargetInRange;	else if (strEquals(sDesc, LINKED_FIRE_ENEMY))		dwOptions |= CDeviceClass::lkfEnemyInRange;	else		{		Ctx.sError = strPatternSubst(CONSTLIT("Invalid linkedFire option: %s"), sDesc);		return ERR_FAIL;		}	*retdwOptions = dwOptions;	return NOERROR;	}
开发者ID:bmer,项目名称:Mammoth,代码行数:27,


示例3: if

BeamTypes CBeamEffectCreator::ParseBeamType (const CString &sValue)//	ParseBeamType////	Parses the beam type parameter	{	if (strEquals(sValue, BEAM_TYPE_LASER))		return beamLaser;	else if (strEquals(sValue, BEAM_TYPE_LIGHTNING))		return beamLightning;	else if (strEquals(sValue, BEAM_TYPE_LIGHTNING_BOLT))		return beamLightningBolt;	else if (strEquals(sValue, BEAM_TYPE_HEAVY_BLASTER))		return beamHeavyBlaster;	else if (strEquals(sValue, BEAM_TYPE_GREEN_PARTICLE))		return beamGreenParticle;	else if (strEquals(sValue, BEAM_TYPE_BLUE_PARTICLE))		return beamBlueParticle;	else if (strEquals(sValue, BEAM_TYPE_BLASTER))		return beamBlaster;	else if (strEquals(sValue, BEAM_TYPE_STAR_BLASTER))		return beamStarBlaster;	else if (strEquals(sValue, BEAM_TYPE_GREEN_LIGHTNING))		return beamGreenLightning;	else if (strEquals(sValue, BEAM_TYPE_PARTICLE))		return beamParticle;	else		return beamUnknown;	}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:30,


示例4: switch

void CGameSettings::SetValue (int iOption, const CString &sValue, bool bSetSettings)//	SetValue////	Sets the boolean, integer, or string value of the option	{	switch (g_OptionData[iOption].iType)		{		case optionBoolean:			m_Options[iOption].bValue = (strEquals(sValue, CONSTLIT("true")) || strEquals(sValue, CONSTLIT("on")) || strEquals(sValue, CONSTLIT("yes")));			break;		case optionInteger:			m_Options[iOption].iValue = strToInt(sValue, 0);			break;		case optionString:			m_Options[iOption].sValue = sValue;			break;		default:			ASSERT(false);		}	//	Set the settings value, if appropriate	if (bSetSettings)		m_Options[iOption].sSettingsValue = sValue;	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:30,


示例5: WriteModuleImages

ALERROR WriteModuleImages (CXMLElement *pModule, const CString &sFolder, CSymbolTable &Resources, CDataFile &Out)	{	ALERROR error;	int i;	for (i = 0; i < pModule->GetContentElementCount(); i++)		{		CXMLElement *pItem = pModule->GetContentElement(i);		if (strEquals(pItem->GetTag(), TAG_IMAGES))			{			CString sSubFolder = pathAddComponent(sFolder, pItem->GetAttribute(ATTRIB_FOLDER));			if (error = WriteModuleImages(pItem, sSubFolder, Resources, Out))				return error;			}		else if (strEquals(pItem->GetTag(), TAG_IMAGE))			{			CString sFilename = pItem->GetAttribute(ATTRIB_BITMAP);			if (!sFilename.IsBlank())				{				if (error = WriteResource(sFilename, sFolder, Resources, Out))					continue;				}			sFilename = pItem->GetAttribute(ATTRIB_BITMASK);			if (!sFilename.IsBlank())				{				if (error = WriteResource(sFilename, sFolder, Resources, Out))					continue;				}			}		}	return NOERROR;	}
开发者ID:alanhorizon,项目名称:Transport,代码行数:35,


示例6: SetMusicOption

void CTranscendenceWnd::OnCommandIntro (const CString &sCmd, void *pData)//	OnCommandIntro////	Handle commands from Reanimator, etc.	{	if (strEquals(sCmd, CMD_TOGGLE_MUSIC))		{		m_pTC->SetOptionBoolean(CGameSettings::noMusic, !m_pTC->GetOptionBoolean(CGameSettings::noMusic));		SetMusicOption();		}	else if (strEquals(sCmd, CMD_TOGGLE_DEBUG))		{		m_pTC->GetModel().SetDebugMode(!m_pTC->GetModel().GetDebugMode());		SetDebugOption();		}	else if (strEquals(sCmd, CMD_OPEN_NEWS))		{		if (!m_sNewsURL.IsBlank())			sysOpenURL(m_sNewsURL);		}	}
开发者ID:AvanWolf,项目名称:Transcendence,代码行数:25,


示例7: WriteSubModules

ALERROR WriteSubModules (CTDBCompiler &Ctx, 						 CXMLElement *pModule,						 const CString &sFolder, 						 CDataFile &Out)	{	int i, j;	for (i = 0; i < pModule->GetContentElementCount(); i++)		{		CXMLElement *pItem = pModule->GetContentElement(i);		if (strEquals(pItem->GetTag(), TAG_MODULES))			{			for (j = 0; j < pItem->GetContentElementCount(); j++)				{				CXMLElement *pDesc = pItem->GetContentElement(j);				CString sFilename = pDesc->GetAttribute(ATTRIB_FILENAME);				if (WriteModule(Ctx, sFilename, sFolder, Out) != NOERROR)					continue;				}			}		else if (strEquals(pItem->GetTag(), TAG_MODULE))			{			CString sFilename = pItem->GetAttribute(ATTRIB_FILENAME);			if (WriteModule(Ctx, sFilename, sFolder, Out) != NOERROR)				continue;			}		}	return NOERROR;	}
开发者ID:Arkheias,项目名称:Transcendence,代码行数:32,


示例8: StopPerformance

ALERROR CLoginSession::OnCommand (const CString &sCmd, void *pData)//	OnCommand////	Handle a command	{	if (strEquals(sCmd, CMD_ALL_TASKS_DONE))		{		StopPerformance(ID_CTRL_WAIT);		ShowInitialDlg();		}	else if (strEquals(sCmd, CMD_CANCEL))		CmdCancel();	else if (strEquals(sCmd, CMD_REGISTER))		CmdRegister();	else if (strEquals(sCmd, CMD_REGISTER_COMPLETE))		CmdRegisterComplete((CRegisterUserTask *)pData);	else if (strEquals(sCmd, CMD_SIGN_IN))		CmdSignIn();	else if (strEquals(sCmd, CMD_SIGN_IN_COMPLETE))		CmdSignInComplete((CSignInUserTask *)pData);	else if (strEquals(sCmd, CMD_SWITCH_TO_LOGIN))		{		StopPerformance(ID_DLG_REGISTER);		const CVisualPalette &VI = m_HI.GetVisuals();		IAnimatron *pDlg;		CreateDlgSignIn(VI, &pDlg);		m_iCurrent = dlgSignIn;		StartPerformance(pDlg, ID_DLG_SIGN_IN, CReanimator::SPR_FLAG_DELETE_WHEN_DONE);		}	else if (strEquals(sCmd, CMD_SWITCH_TO_REGISTER))		{		StopPerformance(ID_DLG_SIGN_IN);		const CVisualPalette &VI = m_HI.GetVisuals();		IAnimatron *pDlg;		CreateDlgRegister(VI, &pDlg);		m_iCurrent = dlgRegister;		StartPerformance(pDlg, ID_DLG_REGISTER, CReanimator::SPR_FLAG_DELETE_WHEN_DONE);		}	else if (strEquals(sCmd, CMD_PASSWORD_RESET))		CmdPasswordReset();	else if (strEquals(sCmd, CMD_TOS))		sysOpenURL(CONSTLIT("http://www.kronosaur.com/legal/TermsofService.html"));	return NOERROR;	}
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:60,


示例9: WriteModuleSounds

ALERROR WriteModuleSounds (CTDBCompiler &Ctx, CXMLElement *pModule, const CString &sFolder, CDataFile &Out)	{	ALERROR error;	int i;	for (i = 0; i < pModule->GetContentElementCount(); i++)		{		CXMLElement *pItem = pModule->GetContentElement(i);		if (strEquals(pItem->GetTag(), TAG_SOUNDS))			{			CString sSubFolder = pathAddComponent(sFolder, pItem->GetAttribute(ATTRIB_FOLDER));			if (error = WriteModuleSounds(Ctx, pItem, sSubFolder, Out))				return error;			}		else if (strEquals(pItem->GetTag(), TAG_SOUND))			{			CString sFilename = pItem->GetAttribute(ATTRIB_FILENAME);			if (error = WriteResource(Ctx, sFilename, sFolder, false, Out))				continue;			}		}	return NOERROR;	}
开发者ID:Arkheias,项目名称:Transcendence,代码行数:25,


示例10: if

ALERROR CFlareEffectCreator::OnEffectCreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, const CString &sUNID)//	OnEffectCreateFromXML////	Initializes from XML{    CString sStyle = pDesc->GetAttribute(STYLE_ATTRIB);    if (strEquals(sStyle, STYLE_FADING_BLAST))        m_iStyle = styleFadingBlast;    else if (strEquals(sStyle, STYLE_FLICKER))        m_iStyle = styleFlicker;    else if (sStyle.IsBlank() || strEquals(sStyle, STYLE_PLAIN))        m_iStyle = stylePlain;    else    {        Ctx.sError = strPatternSubst(CONSTLIT("Invalid Flare style: %s"), sStyle);        return ERR_FAIL;    }    m_iRadius = pDesc->GetAttributeIntegerBounded(RADIUS_ATTRIB, 0, -1, 100);    m_iLifetime = pDesc->GetAttributeIntegerBounded(LIFETIME_ATTRIB, 0, -1, 1);    m_rgbPrimaryColor = ::LoadRGBColor(pDesc->GetAttribute(PRIMARY_COLOR_ATTRIB));    CString sAttrib;    if (pDesc->FindAttribute(SECONDARY_COLOR_ATTRIB, &sAttrib))        m_rgbSecondaryColor = ::LoadRGBColor(sAttrib);    else        m_rgbSecondaryColor = m_rgbPrimaryColor;    return NOERROR;}
开发者ID:bmer,项目名称:Mammoth,代码行数:32,


示例11: if

bool CReactorClass::FindDataField (const ReactorDesc &Desc, const CString &sField, CString *retsValue)//	FindDataField////	Finds a data field for the reactor desc.	{	if (strEquals(sField, FIELD_POWER))		*retsValue = strFromInt(Desc.iMaxPower * 100);	else if (strEquals(sField, FIELD_FUEL_CRITERIA))		{		if (Desc.pFuelCriteria)			*retsValue = CItem::GenerateCriteria(*Desc.pFuelCriteria);		else			*retsValue = strPatternSubst(CONSTLIT("f L:%d-%d;"), Desc.iMinFuelLevel, Desc.iMaxFuelLevel);		}	else if (strEquals(sField, FIELD_FUEL_EFFICIENCY))		*retsValue = strFromInt(Desc.iPowerPerFuelUnit);	else if (strEquals(sField, FIELD_FUEL_CAPACITY))		*retsValue = strFromInt(Desc.iMaxFuel / FUEL_UNITS_PER_STD_ROD);	else		return false;	return true;	}
开发者ID:bmer,项目名称:Mammoth,代码行数:25,


示例12: XSECException

void XKMSRecoverRequestImpl::load(void) {	if (m_msg.mp_messageAbstractTypeElement == NULL) {		// Attempt to load an empty element		throw XSECException(XSECException::XKMSError,			"XKMSRecoverRequest::load - called on empty DOM");	}	if (!strEquals(getXKMSLocalName(m_msg.mp_messageAbstractTypeElement), 									XKMSConstants::s_tagRecoverRequest)) {			throw XSECException(XSECException::XKMSError,			"XKMSRecoverRequest::load - called on incorrect node");		}	// Load the base message	m_request.load();	// Now check for any RecoverKeyBinding elements	DOMElement * tmpElt = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);	while (tmpElt != NULL && !strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagRecoverKeyBinding)) {		tmpElt = findNextElementChild(tmpElt);	}	if (tmpElt != NULL) {		XSECnew(mp_recoverKeyBinding, XKMSRecoverKeyBindingImpl(m_msg.mp_env, tmpElt));		mp_recoverKeyBinding->load();		tmpElt = findNextElementChild(tmpElt);	}	else {		throw XSECException(XSECException::ExpectedXKMSChildNotFound,			"XKMSRecoverRequest::load - Expected RecoverKeyBinding node");		}	// Authentication Element 	if (tmpElt != NULL && strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagAuthentication)) {		XSECnew(mp_authentication, XKMSAuthenticationImpl(m_msg.mp_env, tmpElt));		mp_authentication->load(mp_recoverKeyBinding->getId());	}	else {		throw XSECException(XSECException::ExpectedXKMSChildNotFound,			"XKMSRecoverRequest::load - Expected Authentication node");		}}
开发者ID:okean,项目名称:cpputils,代码行数:58,


示例13: START_TEST

END_TESTSTART_TEST(test_strEquals){    fail_unless(!strEquals("foo", "bar"), NULL);    fail_unless(!strEquals("foo", NULL), NULL);    fail_unless(strEquals("foo", "foo"), NULL);    fail_unless(!strEquals("foo", "Foo"), NULL);}
开发者ID:kayahr,项目名称:kaytils,代码行数:9,


示例14: if

void CAeonView::CreateSecondaryData (const CTableDimensions &PrimaryDims, const CRowKey &PrimaryKey, CDatum dFullData, SEQUENCENUMBER RowID, CDatum *retdData)//	CreateSecondaryData////	Creates the data for a secondary view row.	{	int i, j;	CComplexStruct *pData = new CComplexStruct;	//	If the list of columns is empty then we just add the primary key	if (m_Columns.GetCount() == 0)		pData->SetElement(FIELD_PRIMARY_KEY, PrimaryKey.AsDatum(PrimaryDims));	//	Otherwise we add all the fields listed in the columns array	else		{		for (i = 0; i < m_Columns.GetCount(); i++)			{			//	The special string "primaryKey" means that we insert the 			//	primary key as a special field.			if (strEquals(m_Columns[i], FIELD_PRIMARY_KEY))				pData->SetElement(FIELD_PRIMARY_KEY, PrimaryKey.AsDatum(PrimaryDims));			//	The special string "*" means that we insert all existing			//	fields.			else if (strEquals(m_Columns[i], STR_ALL_COLUMNS))				{				for (j = 0; j < dFullData.GetCount(); j++)					{					CDatum dKey = dFullData.GetKey(j);					CDatum dValue = dFullData.GetElement(j);					if (!dValue.IsNil())						pData->SetElement(dKey, dValue);					}				}			//	Add the field by name.			else				{				CDatum dColData = dFullData.GetElement(m_Columns[i]);				if (!dColData.IsNil())					pData->SetElement(m_Columns[i], dColData);				}			}		}	//	Done	*retdData = CDatum(pData);	}
开发者ID:kronosaur,项目名称:Hexarc,代码行数:57,


示例15: return

ICCItem *CDeviceClass::GetItemProperty (CItemCtx &Ctx, const CString &sName)//	GetItemProperty////	Returns the item property. Subclasses should call this if they do not//	understand the property.	{	CCodeChain &CC = g_pUniverse->GetCC();	//	Get the device	CInstalledDevice *pDevice = Ctx.GetDevice();	//	Get the property	if (strEquals(sName, PROPERTY_CAN_BE_DISABLED))		return (pDevice ? CC.CreateBool(pDevice->CanBeDisabled(Ctx)) : CC.CreateBool(CanBeDisabled(Ctx)));	else if (strEquals(sName, PROPERTY_ENABLED))		return (pDevice ? CC.CreateBool(pDevice->IsEnabled()) : CC.CreateNil());	else if (strEquals(sName, PROPERTY_POS))		{		if (pDevice == NULL)			return CC.CreateNil();		//	Create a list		ICCItem *pResult = CC.CreateLinkedList();		if (pResult->IsError())			return pResult;		CCLinkedList *pList = (CCLinkedList *)pResult;		//	List contains angle, radius, and optional z		pList->AppendInteger(CC, pDevice->GetPosAngle());		pList->AppendInteger(CC, pDevice->GetPosRadius());		if (pDevice->GetPosZ() != 0)			pList->AppendInteger(CC, pDevice->GetPosZ());		//	Done		return pResult;		}	else if (strEquals(sName, PROPERTY_SECONDARY))		return (pDevice ? CC.CreateBool(pDevice->IsSecondaryWeapon()) : CC.CreateNil());	else if (m_pItemType)		return CreateResultFromDataField(CC, m_pItemType->GetDataField(sName));	else		return CC.CreateNil();	}
开发者ID:bmer,项目名称:Mammoth,代码行数:56,


示例16: if

ALERROR CSovereign::OnCreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc)//	OnCreateFromXML////	Create from XML	{	int i;	//	Initialize	m_sName = pDesc->GetAttribute(CONSTLIT(g_NameAttrib));	//	Alignment	CString sAlignment = pDesc->GetAttribute(ALIGNMENT_ATTRIB);	if (strEquals(sAlignment, CONSTRUCTIVE_CHAOS_ALIGN))		m_iAlignment = alignConstructiveChaos;	else if (strEquals(sAlignment, CONSTRUCTIVE_ORDER_ALIGN))		m_iAlignment = alignConstructiveOrder;	else if (strEquals(sAlignment, NEUTRAL_ALIGN))		m_iAlignment = alignNeutral;	else if (strEquals(sAlignment, DESTRUCTIVE_ORDER_ALIGN))		m_iAlignment = alignDestructiveOrder;	else if (strEquals(sAlignment, DESTRUCTIVE_CHAOS_ALIGN))		m_iAlignment = alignDestructiveChaos;	else		return ERR_FAIL;	//	Load language	CXMLElement *pLanguage = pDesc->GetContentElementByTag(LANGUAGE_TAG);	if (pLanguage)		{		int iCount = pLanguage->GetContentElementCount();		for (i = 0; i < iCount; i++)			{			CXMLElement *pItem = pLanguage->GetContentElement(i);			CString *pText = new CString(pItem->GetAttribute(TEXT_ATTRIB));			DWORD dwID = pItem->GetAttributeInteger(ID_ATTRIB);			if (dwID != 0)				m_Language.AddEntry(dwID, pText);			}		}	//	Load relationships	m_pInitialRelationships = pDesc->GetContentElementByTag(RELATIONSHIPS_TAG);	if (m_pInitialRelationships)		m_pInitialRelationships = m_pInitialRelationships->OrphanCopy();	//	Done	return NOERROR;	}
开发者ID:alanhorizon,项目名称:Transport,代码行数:55,


示例17: OutputTable

void OutputTable (SItemTableCtx &Ctx, const SItemTypeList &ItemList)	{	int i, j;	if (ItemList.GetCount() == 0)		return;	//	Output each row	for (i = 0; i < ItemList.GetCount(); i++)		{		CItemType *pType = ItemList[i];		for (j = 0; j < Ctx.Cols.GetCount(); j++)			{			if (j != 0)				printf("/t");			const CString &sField = Ctx.Cols[j];			//	Get the field value			CString sValue;			CItem Item(pType, 1);			CItemCtx ItemCtx(Item);			CCodeChainCtx CCCtx;			ICCItem *pResult = Item.GetProperty(&CCCtx, ItemCtx, sField);			if (pResult->IsNil())				sValue = NULL_STR;			else				sValue = pResult->Print(&g_pUniverse->GetCC(), PRFLAG_NO_QUOTES | PRFLAG_ENCODE_FOR_DISPLAY);			pResult->Discard(&g_pUniverse->GetCC());			//	Format the value			if (strEquals(sField, FIELD_AVERAGE_DAMAGE) || strEquals(sField, FIELD_POWER_PER_SHOT))				printf("%.2f", strToInt(sValue, 0, NULL) / 1000.0);			else if (strEquals(sField, FIELD_POWER))				printf("%.1f", strToInt(sValue, 0, NULL) / 1000.0);			else if (strEquals(sField, FIELD_TOTAL_COUNT))				{				SDesignTypeInfo *pInfo = Ctx.TotalCount.GetAt(pType->GetUNID());				double rCount = (pInfo ? pInfo->rPerGameMeanCount : 0.0);				printf("%.2f", rCount);				}			else				printf(sValue.GetASCIIZPointer());			}		printf("/n");		}	}
开发者ID:bmer,项目名称:Transmuter,代码行数:55,


示例18: GenerateKeyEventStat

CString CPlayerGameStats::GetKeyEventStat (const CString &sStat, const CString &sNodeID, const CDesignTypeCriteria &Crit) const//	GetKeyEventStat////	Returns the given key event stat	{	int i;	//	Get the list of stats	TArray<SKeyEventStatsResult> List;	if (!GetMatchingKeyEvents(sNodeID, Crit, &List))		return NIL_VALUE;	if (strEquals(sStat, OBJS_DESTROYED_STAT))		{		//	Mark the events that we're interested in		for (i = 0; i < List.GetCount(); i++)			List[i].bMarked = ((List[i].pStats->iType == eventEnemyDestroyedByPlayer) 					|| (List[i].pStats->iType == eventFriendDestroyedByPlayer)					|| (List[i].pStats->iType == eventMajorDestroyed));		//	Done		return GenerateKeyEventStat(List);		}	else if (strEquals(sStat, ENEMY_OBJS_DESTROYED_STAT))		{		//	Mark the events that we're interested in		for (i = 0; i < List.GetCount(); i++)			List[i].bMarked = (List[i].pStats->iType == eventEnemyDestroyedByPlayer);		//	Done		return GenerateKeyEventStat(List);		}	else if (strEquals(sStat, FRIENDLY_OBJS_DESTROYED_STAT))		{		//	Mark the events that we're interested in		for (i = 0; i < List.GetCount(); i++)			List[i].bMarked = (List[i].pStats->iType == eventFriendDestroyedByPlayer);		//	Done		return GenerateKeyEventStat(List);		}	else		return NULL_STR;	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:53,


示例19: if

CSpaceObject *IDockScreenDisplay::EvalListSource (const CString &sString, CString *retsError)//	EvalListSource////	Returns the object from which we should display items	{	char *pPos = sString.GetPointer();	//	See if we need to evaluate	if (*pPos == '=')		{		CCodeChainCtx Ctx;		Ctx.SetScreen(this);		Ctx.SaveAndDefineSourceVar(m_pLocation);		Ctx.SaveAndDefineDataVar(m_pData);		ICCItem *pExp = Ctx.Link(sString, 1, NULL);		ICCItem *pResult = Ctx.Run(pExp);	//	LATER:Event		Ctx.Discard(pExp);		if (pResult->IsError())			{			*retsError = pResult->GetStringValue();			Ctx.Discard(pResult);			return NULL;			}		//	Convert to an object pointer		CSpaceObject *pSource;		if (strEquals(pResult->GetStringValue(), DATA_FROM_PLAYER))			pSource = m_pPlayer->GetShip();		else if (strEquals(pResult->GetStringValue(), DATA_FROM_STATION)				|| strEquals(pResult->GetStringValue(), DATA_FROM_SOURCE))			pSource = m_pLocation;		else			pSource = Ctx.AsSpaceObject(pResult);		Ctx.Discard(pResult);		return pSource;		}	//	Otherwise, compare to constants	else if (strEquals(sString, DATA_FROM_PLAYER))		return m_pPlayer->GetShip();	else		return m_pLocation;	}
开发者ID:AvanWolf,项目名称:Transcendence,代码行数:52,


示例20: strEquals

void CAniRichText::OnPropertyChanged (const CString &sName)//	OnPropertyChanged////	Property has changed	{	if (strEquals(sName, PROP_TEXT) 			|| strEquals(sName, PROP_SCALE) 			|| strEquals(sName, PROP_TEXT_ALIGN_HORZ)			|| strEquals(sName, PROP_TEXT_ALIGN_VERT))		m_bInvalid = true;	}
开发者ID:bmer,项目名称:Alchemy,代码行数:13,


示例21: strEquals

ALERROR CDesignCollection::LoadEntryFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, CDesignType **retpType)//	LoadEntryFromXML////	Load an entry into the collection	{	ALERROR error;	//	Load topology	if (strEquals(pDesc->GetTag(), STAR_SYSTEM_TOPOLOGY_TAG)			|| strEquals(pDesc->GetTag(), SYSTEM_TOPOLOGY_TAG))		{		if (Ctx.pExtension)			//	If we're in an extension (Adventure) then load into the extension			error = Ctx.pExtension->Topology.LoadFromXML(Ctx, pDesc, NULL_STR);		else			//	Otherwise, load into the base game			error = m_BaseTopology.LoadFromXML(Ctx, pDesc, NULL_STR);		if (error)			return error;		//	There is no type for topologies		if (retpType)			*retpType = NULL;		}	//	Load standard design elements	else		{		CDesignType *pEntry;		if (error = CDesignType::CreateFromXML(Ctx, pDesc, &pEntry))			return error;		if (error = AddEntry(Ctx, pEntry))			{			delete pEntry;			return error;			}		if (retpType)			*retpType = pEntry;		}	return NOERROR;	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:51,


示例22: strEquals

ALERROR CDesignCollection::LoadEntryFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc)//	LoadEntryFromXML////	Load an entry into the collection	{	ALERROR error;	//	Load topology	if (strEquals(pDesc->GetTag(), STAR_SYSTEM_TOPOLOGY_TAG)			|| strEquals(pDesc->GetTag(), SYSTEM_TOPOLOGY_TAG))		{		if (Ctx.pExtension)			//	If we're in an extension (Adventure) then load into the extension			error = Ctx.pExtension->Topology.LoadFromXML(Ctx, pDesc);		else			//	Otherwise, load into the base game			error = m_BaseTopology.LoadFromXML(Ctx, pDesc);		if (error)			return error;		}	//	Load standard design elements	else		{		CDesignType *pEntry;		try			{			if (error = CDesignType::CreateFromXML(Ctx, pDesc, &pEntry))				return error;			}		catch (...)			{			Ctx.sError = strPatternSubst(CONSTLIT("Crash loading: %x"), pDesc->GetAttributeInteger(CONSTLIT("UNID")));			return ERR_FAIL;			}		if (error = AddEntry(Ctx, pEntry))			{			delete pEntry;			return error;			}		}	return NOERROR;	}
开发者ID:alanhorizon,项目名称:Transport,代码行数:51,


示例23: CmdReadComplete

ALERROR CProfileSession::OnCommand (const CString &sCmd, void *pData)//	OnCommand////	Handle a command	{	if (strEquals(sCmd, CMD_READ_COMPLETE))		CmdReadComplete((CReadProfileTask *)pData);	else if (strEquals(sCmd, CMD_CLOSE_SESSION))		m_HI.ClosePopupSession();	return NOERROR;	}
开发者ID:AvanWolf,项目名称:Transcendence,代码行数:14,


示例24: Lock

void CEsperEngine::MsgEsperStartListener (const SArchonMessage &Msg)//	MsgEsperStartListener////	Esper.startListener {name} {port} [{protocol}]	{	CSmartLock Lock(m_cs);	//	If we're in shutdown, then ignore this message	if (m_bShutdown)		return;	//	Get some parameters	CString sName = Msg.dPayload.GetElement(0);	CString sProtocol = Msg.dPayload.GetElement(2);	//	Get the type from the protocol	CEsperConnection::ETypes iType;	if (sProtocol.IsEmpty() || strEquals(sProtocol, PROTOCOL_RAW))		iType = CEsperConnection::typeRawIn;	else if (strEquals(sProtocol, PROTOCOL_AMP1))		iType = CEsperConnection::typeAMP1In;	else if (strEquals(sProtocol, PROTOCOL_TLS))		iType = CEsperConnection::typeTLSIn;	else		{		SendMessageReplyError(MSG_ERROR_UNABLE_TO_COMPLY, strPattern(ERR_UNKNOWN_PROTOCOL, sProtocol), Msg);		return;		}	//	Make sure that we don't already have a listener with this name	if (sName.IsEmpty() || FindListener(sName))		{		SendMessageReplyError(MSG_ERROR_UNABLE_TO_COMPLY, 				(sName.IsEmpty() ? ERR_INVALID_LISTENER_NAME : ERR_DUPLICATE_LISTENER_NAME), 				Msg);		return;		}	//	Add a new thread (array takes ownership of the context)	CEsperListenerThread *pThread = new CEsperListenerThread(this, iType, Msg);	m_Listeners.Insert(pThread);	pThread->Start();	}
开发者ID:gmoromisato,项目名称:Hexarc,代码行数:50,


示例25: strEquals

bool XSECEnv::isRegisteredIdAttributeNameNS(const XMLCh * ns, const XMLCh * name) const {	int sz = (int) m_idAttributeNameList.size();	for (int i = 0; i < sz; ++i) {		if (m_idAttributeNameList[i]->m_useNamespace &&			strEquals(m_idAttributeNameList[i]->mp_namespace, ns) &&			strEquals(m_idAttributeNameList[i]->mp_name, name))			return true;	}	return false;}
开发者ID:okean,项目名称:cpputils,代码行数:14,


示例26: if

ALERROR ITopologyProcessor::CreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, const CString &sUNID, ITopologyProcessor **retpProc)//	CreateFromXML////	Creates a new processor based on the XML tag	{	ALERROR error;	ITopologyProcessor *pProc;	//	Create the approprate class	if (strEquals(pDesc->GetTag(), ATTRIBUTES_TAG))		pProc = new CApplySystemProc;	else if (strEquals(pDesc->GetTag(), CONQUER_NODES_TAG))		pProc = new CConquerNodesProc;	else if (strEquals(pDesc->GetTag(), DISTRIBUTE_NODES_TAG))		pProc = new CDistributeNodesProc;	else if (strEquals(pDesc->GetTag(), FILL_NODES_TAG))		pProc = new CFillNodesProc;	else if (strEquals(pDesc->GetTag(), GROUP_TAG))		pProc = new CGroupTopologyProc;	else if (strEquals(pDesc->GetTag(), LOCATE_NODES_TAG))		pProc = new CLocateNodesProc;	else if (strEquals(pDesc->GetTag(), PARTITION_NODES_TAG))		pProc = new CPartitionNodesProc;	else if (strEquals(pDesc->GetTag(), RANDOM_POINTS_TAG))		pProc = new CRandomPointsProc;	else if (strEquals(pDesc->GetTag(), SYSTEM_TAG))		pProc = new CApplySystemProc;	else if (strEquals(pDesc->GetTag(), TABLE_TAG))		pProc = new CTableTopologyProc;	else		{		Ctx.sError = strPatternSubst(CONSTLIT("Unknown topology processor element: <%s>"), pDesc->GetTag());		return ERR_FAIL;		}	//	Load it	if (error = pProc->InitFromXML(Ctx, pDesc, sUNID))		return error;	//	Done	*retpProc = pProc;	return NOERROR;	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:49,



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


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