本文整理汇总了C++中CDirItems::AddPrefix方法的典型用法代码示例。如果您正苦于以下问题:C++ CDirItems::AddPrefix方法的具体用法?C++ CDirItems::AddPrefix怎么用?C++ CDirItems::AddPrefix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDirItems
的用法示例。
在下文中一共展示了CDirItems::AddPrefix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnumerateItems
HRESULT EnumerateItems(
const NWildcard::CCensor &censor,
CDirItems &dirItems,
IEnumDirItemCallback *callback,
FStringVector &errorPaths,
CRecordVector<DWORD> &errorCodes)
{
for (int i = 0; i < censor.Pairs.Size(); i++)
{
const NWildcard::CPair &pair = censor.Pairs[i];
int phyParent = pair.Prefix.IsEmpty() ? -1 : dirItems.AddPrefix(-1, -1, pair.Prefix);
RINOK(EnumerateDirItems(pair.Head, phyParent, -1, us2fs(pair.Prefix), UStringVector(), dirItems, false,
callback, errorPaths, errorCodes));
}
dirItems.ReserveDown();
return S_OK;
}
示例2: EnumerateDirItems_Spec
static HRESULT EnumerateDirItems_Spec(
const NWildcard::CCensorNode &curNode,
int phyParent, int logParent, const FString &curFolderName,
const FString &phyPrefix,
const UStringVector &addArchivePrefix,
CDirItems &dirItems,
bool enterToSubFolders)
{
const FString name2 = curFolderName + FCHAR_PATH_SEPARATOR;
unsigned parent = dirItems.AddPrefix(phyParent, logParent, fs2us(name2));
unsigned numItems = dirItems.Items.Size();
HRESULT res = EnumerateDirItems(
curNode, parent, parent, phyPrefix + name2,
addArchivePrefix, dirItems, enterToSubFolders);
if (numItems == dirItems.Items.Size())
dirItems.DeleteLastPrefix();
return res;
}
示例3: EnumerateDirItems_Spec
static HRESULT EnumerateDirItems_Spec(const NWildcard::CCensorNode &curNode,
int phyParent, int logParent, const FString &curFolderName,
const FString &phyPrefix,
const UStringVector &addArchivePrefix,
CDirItems &dirItems,
bool enterToSubFolders,
IEnumDirItemCallback *callback,
FStringVector &errorPaths,
CRecordVector<DWORD> &errorCodes)
{
const FString name2 = curFolderName + FCHAR_PATH_SEPARATOR;
int parent = dirItems.AddPrefix(phyParent, logParent, fs2us(name2));
int numItems = dirItems.Items.Size();
HRESULT res = EnumerateDirItems(curNode, parent, parent, phyPrefix + name2,
addArchivePrefix, dirItems, enterToSubFolders, callback, errorPaths, errorCodes);
if (numItems == dirItems.Items.Size())
dirItems.DeleteLastPrefix();
return res;
}