本文整理汇总了C++中CChars::Kill方法的典型用法代码示例。如果您正苦于以下问题:C++ CChars::Kill方法的具体用法?C++ CChars::Kill怎么用?C++ CChars::Kill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChars
的用法示例。
在下文中一共展示了CChars::Kill方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AssertCacheElement
void AssertCacheElement(CMemoryCache* pcCache, SMemoryCacheDescriptor* psCacheDesc, int iDataSize, char cExpected)
{
char* szData;
CChars szExpected;
AssertInt(iDataSize, psCacheDesc->iDataSize);
AssertInt(1, psCacheDesc->iFlags);
szData = (char*)pcCache->GetData(psCacheDesc);
szExpected.Init();
szExpected.Append(cExpected, iDataSize-1);
AssertString(szExpected.Text(), szData);
szExpected.Kill();
}
示例2: ValidateHasClass
void CBaseObject::ValidateHasClass(void)
{
CChars sz;
if (!HasClass())
{
sz.Init();
PrintObject(&sz, IsEmbedded());
gcLogger.Error2(__METHOD__, " Object {", sz.Text(), "} does not have Class initialised.", NULL);
sz.Kill();
}
}
示例3: ImportCelSource
BOOL CImageCelsSourceXML::ImportCelSource(CMarkupTag* pcBrushSourceTag, char* szTexturePath)
{
CMarkupTag* pcFileName;
CChars szFileName;
CChars szShortFileName;
BOOL bResult;
CMarkupTag* pcCels;
CFileUtil cFileUtil;
pcFileName = CMarkupTextParser::GetTag(pcBrushSourceTag, "FileName");
if (!pcFileName)
{
return FALSE;
}
szShortFileName.Init();
pcFileName->GetText(&szShortFileName);
if (szFileName.Empty())
{
szShortFileName.Kill();
CMarkupTextParser::LogErrorTagWasEmpty(pcBrushSourceTag);
return FALSE;
}
pcCels = CMarkupTextParser::GetTag(pcBrushSourceTag, "Cels");
if (!pcCels)
{
szShortFileName.Kill();
return FALSE;
}
szFileName.Init(szTexturePath);
cFileUtil.AppendToPath(&szFileName, szShortFileName.Text());
bResult = ImportCels(pcCels, szFileName.Text());
return bResult;
}
示例4: Dump
void CChars::Dump(void)
{
CChars sz;
int i;
if (Length() <= 10000)
{
if (Length() > 0)
{
EngineOutput(Text());
}
return;
}
for (i = 0; i < Length()-10000; i+=10000)
{
sz.Init(Text(), i, i+10000);
EngineOutput(sz.Text());
sz.Kill();
}
sz.Init(Text(), i, Length());
EngineOutput(sz.Text());
sz.Kill();
}
示例5: Kill
//////////////////////////////////////////////////////////////////////////
// //
// //
//////////////////////////////////////////////////////////////////////////
void CArrayString::Kill(void)
{
int i;
CChars* pcChars;
if (!mbFaked)
{
for (i = 0; i < mcArray.NumElements(); i++)
{
pcChars = mcArray.Get(i);
pcChars->Kill();
}
}
mcArray.Kill();
}
示例6: Dump
void CInputDeviceDesc::Dump(void)
{
CTextFile cFile;
CChars szName;
cFile.Init();
ToString(&cFile.mcText);
szName.Init("../");
szName.Append(mszFriendlyName.Text());
szName.Append(".txt");
cFile.Write(szName.Text());
szName.Kill();
cFile.Kill();
}
示例7: Init
void CLibrary::Init(char* szName, char* szBaseDir, CHeaderFileMap* pcHeaderFileMap)
{
CFileUtil cFileUtil;
CChars szPath;
szPath.Init(szBaseDir);
cFileUtil.FullPath(&szPath);
mszName.Init(szName);
mszBaseDir.Init(szPath);
szPath.Kill();
mcConfigs.Init();
mcTranslationUnits.Init(this);
mcHeaderNameMap.Init(mszBaseDir.Text(), pcHeaderFileMap, FALSE);
}
示例8: Dump
void CPointer::Dump(void)
{
CChars sz;
CBaseObject* pvBaseObject = BaseObject();
if (pvBaseObject)
{
pvBaseObject->Dump();
}
else
{
sz.Init("NULL\n");
sz.Dump();
sz.Kill();
}
}
示例9: Dump
//////////////////////////////////////////////////////////////////////////
// //
// //
//////////////////////////////////////////////////////////////////////////
void CArrayString::Dump(void)
{
int i;
CChars* psz;
CChars sz;
sz.Init(1024);
for (i = 0; i < mcArray.NumElements(); i++)
{
psz = mcArray.Get(i);
sz.Append(psz);
sz.AppendNewLine();
}
sz.Dump();
sz.Kill();
}
示例10: Split
//////////////////////////////////////////////////////////////////////////
// //
// //
//////////////////////////////////////////////////////////////////////////
BOOL CArrayString::Split(char* szString, char cSplitter)
{
CChars szTemp;
szTemp.Init(szString);
if (!szTemp.Empty())
{
szTemp.Split(this, cSplitter);
szTemp.Kill();
return TRUE;
}
else
{
return FALSE;
}
}
示例11: AddDirectory
BOOL CPackFiles::AddDirectory(char* szDirectory, char* szPackDirectory)
{
CFileUtil cFileUtil;
CArrayChars aszFileNames;
int i;
CChars* pszFileName;
CDiskFile cDiskFile;
CChars szName;
CChars szNameDirectory;
BOOL bResult;
BOOL bAnyFiles;
aszFileNames.Init();
bAnyFiles = cFileUtil.FindAllFiles(szDirectory, &aszFileNames, TRUE, FALSE);
if (!bAnyFiles)
{
aszFileNames.Kill();
return FALSE;
}
szNameDirectory.Init(szDirectory);
for (i = 0; i < aszFileNames.NumElements(); i++)
{
pszFileName = aszFileNames.Get(i);
cDiskFile.Init(pszFileName->Text());
cFileUtil.MakeNameFromDirectory(&szName, pszFileName, &szNameDirectory);
if (szPackDirectory)
{
szName.Insert(0, '/');
szName.Insert(0, szPackDirectory);
}
bResult = AddFile(&cDiskFile, szName.Text());
szName.Kill();
cDiskFile.Kill();
if (!bResult)
{
aszFileNames.Kill();
return FALSE;
}
}
aszFileNames.Kill();
return TRUE;
}
示例12: ProcessHashElif
//////////////////////////////////////////////////////////////////////////
// //
// //
//////////////////////////////////////////////////////////////////////////
SCTokenBlock CPreprocessor::ProcessHashElif(CPreprocessorTokenParser* pcParser, CPPConditional* pcCond, SCTokenBlock iLine)
{
BOOL bEvaluated;
CPPTokenHolder cTokenHolder;
CChars sz;
cTokenHolder.Init(32);
ProcessLine(&cTokenHolder, pcParser, TRUE, 0);
sz.Init(128);
cTokenHolder.Append(&sz);
bEvaluated = Evaluate(sz.Text());;
mcConditionalStack.SwapForElseIf(bEvaluated);
sz.Kill();
cTokenHolder.Kill();
return Condition(pcCond, iLine);
}
示例13: AddFile
CTranslationUnit* CTranslationUnitFileArray::AddFile(char* szRelativeFileName, BOOL bLogIncludes, BOOL bLogBlocks)
{
CChars szTemp;
CTranslationUnit* pcTranslationUnit;
CTranslationUnit cTranslationUnit;
szTemp.Init(mpcLibrary->mszBaseDir);
szTemp.Append(FILE_SEPARATOR);
szTemp.Append(szRelativeFileName);
cTranslationUnit.Init(8, szTemp.Text(), mpcLibrary, bLogIncludes, bLogBlocks);
szTemp.Kill();
pcTranslationUnit = mcFiles.InsertAfterTail();
memcpy(pcTranslationUnit, &cTranslationUnit, sizeof(CTranslationUnit));
pcTranslationUnit->macBlockSets.mpcFile = pcTranslationUnit;
return pcTranslationUnit;
}
示例14: ValidateEmpty
void CObjects::ValidateEmpty(void)
{
OIndex iNumIndexed;
iNumIndexed = mcMemory.NumIndexed();
if (iNumIndexed != 0)
{
CChars sz;
sz.Init("\n");
sz.Append("Memory not empty. ");
sz.Append(iNumIndexed);
sz.Append(" objects are still indexed.\n");
PrintMemory(&sz);
gcLogger.Error(sz.Text());
sz.Kill();
}
}
示例15: AddAllFiles
void CTranslationUnitFileArray::AddAllFiles(BOOL bLogInlucdes, BOOL bLogBlocks)
{
CChars szTemp;
CArrayString aszTemp;
int i;
CChars* pszFile;
int iIndex;
int j;
CChars* szFile;
char* szExtension;
int iBaseDirLen;
CFileUtil cFileUtil;
CArrayString aszFileNames;
szTemp.Init("*.c;*.cpp");
aszTemp.Init(16);
szTemp.Split(&aszTemp, ';');
iBaseDirLen = mpcLibrary->mszBaseDir.Length();
for (i = 0; i < aszTemp.NumElements(); i++)
{
pszFile = aszTemp.Get(i);
pszFile->StripWhiteSpace();
iIndex = pszFile->Find(0, ".");
szExtension = pszFile->Text(iIndex+1);
aszFileNames.Init(32);
cFileUtil.FindFilesWithExtension(mpcLibrary->mszBaseDir.Text(), szExtension, &aszFileNames);
for (j = 0; j < aszFileNames.NumElements(); j++)
{
szFile = aszFileNames.Get(j);
AddFile(szFile->Text(iBaseDirLen+1), bLogInlucdes, bLogBlocks);
}
aszFileNames.Kill();
}
szTemp.Kill();
aszTemp.Kill();
}