Exemple #1
0
void CProxyFolder::AddRealIndices(CUIntVector &realIndices) const
{
  if (IsLeaf)
    realIndices.Add(Index);
  int i;
  for (i = 0; i < Folders.Size(); i++)
    Folders[i].AddRealIndices(realIndices);
  for (i = 0; i < Files.Size(); i++)
    realIndices.Add(Files[i].Index);
}
Exemple #2
0
void CProxyArc::AddRealIndices(unsigned dirIndex, CUIntVector &realIndices) const
{
  const CProxyDir &dir = Dirs[dirIndex];
  if (dir.IsLeaf())
    realIndices.Add(dir.ArcIndex);
  unsigned i;
  for (i = 0; i < dir.SubDirs.Size(); i++)
    AddRealIndices(dir.SubDirs[i], realIndices);
  for (i = 0; i < dir.SubFiles.Size(); i++)
    realIndices.Add(dir.SubFiles[i]);
}
Exemple #3
0
void CProxyArc2::AddRealIndices_of_ArcItem(unsigned arcIndex, bool includeAltStreams, CUIntVector &realIndices) const
{
  realIndices.Add(arcIndex);
  const CProxyFile2 &file = Files[arcIndex];
  if (file.DirIndex >= 0)
    AddRealIndices_of_Dir(file.DirIndex, includeAltStreams, realIndices);
  if (includeAltStreams && file.AltDirIndex >= 0)
    AddRealIndices_of_Dir(file.AltDirIndex, includeAltStreams, realIndices);
}
Exemple #4
0
void CProxyFolder::GetRealIndices(const UInt32 *indices, UInt32 numItems, CUIntVector &realIndices) const
{
  realIndices.Clear();
  for (UInt32 i = 0; i < numItems; i++)
  {
    int index = indices[i];
    int numDirItems = Folders.Size();
    if (index < numDirItems)
      Folders[index].AddRealIndices(realIndices);
    else
      realIndices.Add(Files[index - numDirItems].Index);
  }
  HeapSort(&realIndices.Front(), realIndices.Size());
}
Exemple #5
0
void CProxyArc::GetRealIndices(unsigned dirIndex, const UInt32 *indices, UInt32 numItems, CUIntVector &realIndices) const
{
  const CProxyDir &dir = Dirs[dirIndex];
  realIndices.Clear();
  for (UInt32 i = 0; i < numItems; i++)
  {
    UInt32 index = indices[i];
    unsigned numDirItems = dir.SubDirs.Size();
    if (index < numDirItems)
      AddRealIndices(dir.SubDirs[index], realIndices);
    else
      realIndices.Add(dir.SubFiles[index - numDirItems]);
  }
  HeapSort(&realIndices.Front(), realIndices.Size());
}