这篇教程C++ CONSTLIT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CONSTLIT函数的典型用法代码示例。如果您正苦于以下问题:C++ CONSTLIT函数的具体用法?C++ CONSTLIT怎么用?C++ CONSTLIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CONSTLIT函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: strPatternSubstALERROR CEventHandler::InitFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc)// InitFromXML//// Load all handlers { int i; for (i = 0; i < pDesc->GetContentElementCount(); i++) { CXMLElement *pHandler = pDesc->GetContentElement(i); ICCItem *pCode = g_pUniverse->GetCC().Link(pHandler->GetContentText(0), 0, NULL); if (pCode->IsError()) { Ctx.sError = strPatternSubst("<%s> event: %s", pHandler->GetTag(), pCode->GetStringValue()); return ERR_FAIL; } // If this is an old extension, then make sure the code is not using the // gStation variable, because we no longer support it if (Ctx.pExtension && Ctx.pExtension->dwVersion < 2) { if (g_pUniverse->GetCC().HasIdentifier(pCode, CONSTLIT("gStation"))) { Ctx.sError = CONSTLIT("gStation variable has been deprecated--use gSource instead."); return ERR_FAIL; } } // Done m_Handlers.Insert(pHandler->GetTag(), pCode); } return NOERROR; }
开发者ID:Sdw195,项目名称:Transcendence,代码行数:38,
示例2: ifCString CDamageSource::GetDamageCauseNounPhrase (DWORD dwFlags)// GetDamageCauseNounPhrase//// Returns the name of the damage source { if (m_pSource) return m_pSource->GetDamageCauseNounPhrase(dwFlags); else if (!m_sSourceName.IsBlank()) return ::ComposeNounPhrase(m_sSourceName, 1, NULL_STR, m_dwSourceNameFlags, dwFlags); else return CONSTLIT("damage"); }
开发者ID:Sdw195,项目名称:Transcendence,代码行数:14,
示例3: CONSTLITALERROR CTransmuterController::OnBoot (char *pszCommandLine, SHIOptions *retOptions, CString *retsError)// OnBoot//// Controller must initialize all option values { CString sError; // Set our basic application settings retOptions->sAppName = CONSTLIT("Transmuter"); retOptions->sClassName = CONSTLIT("transmuter_class"); retOptions->sAppData = CONSTLIT("Kronosaur//Transmuter"); retOptions->hIcon = ::LoadIcon(NULL, MAKEINTRESOURCE(IDI_TRANSMUTER)); // Set our default directory CString sCurDir = pathGetExecutablePath(NULL); ::SetCurrentDirectory(sCurDir.GetASCIIZPointer()); return NOERROR; }
开发者ID:gmoromisato,项目名称:Transmuter,代码行数:23,
示例4: LoadDamageAdjALERROR CEnhancerClass::CreateFromXML (SDesignLoadCtx &Ctx, CXMLElement *pDesc, CItemType *pType, CDeviceClass **retpDevice)// CreateFromXML//// Load device data from XML { ALERROR error; CEnhancerClass *pDevice; pDevice = new CEnhancerClass; if (pDevice == NULL) return ERR_MEMORY; if (error = pDevice->InitDeviceFromXML(Ctx, pDesc, pType)) return error; // The old style is to have an array of damage adj; the new way is to just // have a single damage adj and a criteria int iDamageAdjCount; LoadDamageAdj(pDesc, DAMAGE_ADJ_ATTRIB, pDevice->m_iDamageAdjArray, &iDamageAdjCount); if (iDamageAdjCount) pDevice->m_bUseArray = true; else { pDevice->m_iDamageAdj = pDesc->GetAttributeInteger(HP_BONUS_ATTRIB); pDevice->m_bUseArray = false; } pDevice->m_iPowerUse = pDesc->GetAttributeInteger(POWER_USE_ATTRIB); pDevice->m_sEnhancementType = pDesc->GetAttribute(ENHANCEMENT_TYPE_ATTRIB); pDevice->m_iActivateAdj = pDesc->GetAttributeIntegerBounded(ACTIVATE_ADJ_ATTRIB, 1, -1, 100); pDevice->m_iMinActivateDelay = pDesc->GetAttributeIntegerBounded(MIN_ACTIVATE_DELAY_ATTRIB, 0, -1, 0); pDevice->m_iMaxActivateDelay = pDesc->GetAttributeIntegerBounded(MAX_ACTIVATE_DELAY_ATTRIB, 0, -1, 0); // Load the item criteria CString sCriteria; if (!pDesc->FindAttribute(CRITERIA_ATTRIB, &sCriteria)) sCriteria = CONSTLIT("w"); CItem::ParseCriteria(sCriteria, &pDevice->m_Criteria); // Done *retpDevice = pDevice; return NOERROR; }
开发者ID:alanhorizon,项目名称:Transcendence,代码行数:50,
示例5: AppendReferenceStringCString CDeviceClass::GetReference (CItemCtx &Ctx, int iVariant, DWORD dwFlags)// GetReference//// Returns reference string { CString sReference; // For a device we always add power and other properties. // (If iVariant != -1 then it means that we're looking for reference on a // missile or someting). if (iVariant == -1) { CInstalledDevice *pDevice = Ctx.GetDevice(); // Start with power requirements AppendReferenceString(&sReference, GetReferencePower(Ctx)); // Non-standard slots if (GetSlotsRequired() != 1) AppendReferenceString(&sReference, strPatternSubst(CONSTLIT("%d Slots"), GetSlotsRequired())); // External devices if (IsExternal() || (pDevice && pDevice->IsExternal())) AppendReferenceString(&sReference, CONSTLIT("External")); } // Combine with our subclass AppendReferenceString(&sReference, OnGetReference(Ctx, iVariant, dwFlags)); return sReference; }
开发者ID:bmer,项目名称:Mammoth,代码行数:37,
示例6: catchvoid CHumanInterface::HardCrash (const CString &sProgramState)// HardCrash//// Report an error { CString sSessionMessage; try { if (m_pCurSession) m_pCurSession->HIReportHardCrash(&sSessionMessage); } catch (...) { sSessionMessage = CONSTLIT("Unable to obtain crash report from session."); } CString sMessage = strPatternSubst(CONSTLIT( "Unable to continue due to program error./r/n/r/n" "program state: %s/r/n" "%s" "/r/n/r/nPlease contact transce[email C++ CONST_BUF_LEN函数代码示例 C++ CONSTANT_CLASS_P函数代码示例
|