本文整理汇总了C++中CItem::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CItem::GetSize方法的具体用法?C++ CItem::GetSize怎么用?C++ CItem::GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItem
的用法示例。
在下文中一共展示了CItem::GetSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetProgressPosDrive
LONGLONG CItem::GetProgressPosDrive() const
{
LONGLONG pos = GetSize();
CItem *fs = FindFreeSpaceItem();
if (fs != NULL)
{
pos -= fs->GetSize();
}
return pos;
}
示例2: UpdateFreeSpaceItem
void CItem::UpdateFreeSpaceItem()
{
ASSERT(GetType() == IT_DRIVE);
if (!GetDocument()->OptionShowFreeSpace())
return;
CItem *freeSpaceItem = FindFreeSpaceItem();
ASSERT(freeSpaceItem != NULL);
LONGLONG total;
LONGLONG free;
MyGetDiskFreeSpace(GetPath(), total, free);
LONGLONG before = freeSpaceItem->GetSize();
LONGLONG diff = free - before;
freeSpaceItem->UpwardAddSize(diff);
ASSERT(freeSpaceItem->GetSize() == free);
}
示例3: RemoveUnknownItem
void CItem::RemoveUnknownItem()
{
ASSERT(GetType() == IT_DRIVE);
UpwardSetUndone();
int i = FindUnknownItemIndex();
ASSERT(i < GetChildrenCount());
CItem *unknown = GetChild(i);
UpwardAddSize(-unknown->GetSize());
RemoveChild(i);
}
示例4: RemoveFreeSpaceItem
void CItem::RemoveFreeSpaceItem()
{
ASSERT(GetType() == IT_DRIVE);
UpwardSetUndone();
int i = FindFreeSpaceItemIndex();
ASSERT(i < GetChildrenCount());
CItem *freespace = GetChild(i);
UpwardAddSize(-freespace->GetSize());
RemoveChild(i);
}
示例5: UpwardSetUndone
void CItem::UpwardSetUndone()
{
if (GetType() == IT_DRIVE && IsDone() && GetDocument()->OptionShowUnknown())
{
int i;
for (i=0; i < GetChildrenCount(); i++)
if (GetChild(i)->GetType() == IT_UNKNOWN)
break;
CItem *unknown = GetChild(i);
UpwardAddSize(- unknown->GetSize());
unknown->SetSize(0);
}
m_done = false;
if (GetParent() != NULL)
GetParent()->UpwardSetUndone();
}
示例6: CompareSibling
int CItem::CompareSibling(const CTreeListItem *tlib, int subitem) const
{
CItem *other = (CItem *)tlib;
int r=0;
switch (subitem)
{
case COL_NAME:
if (GetType() == IT_DRIVE)
{
ASSERT(other->GetType() == IT_DRIVE);
r = signum(GetPath().CompareNoCase(other->GetPath()));
}
else
{
r = signum(m_name.CompareNoCase(other->m_name));
}
break;
case COL_SUBTREEPERCENTAGE:
if (MustShowReadJobs())
r = signum(m_readJobs - other->m_readJobs);
else
r = signum(GetFraction() - other->GetFraction());
break;
case COL_PERCENTAGE:
r = signum(GetFraction() - other->GetFraction());
break;
case COL_SUBTREETOTAL:
r = signum(GetSize() - other->GetSize());
break;
case COL_ITEMS:
r = signum(GetItemsCount() - other->GetItemsCount());
break;
case COL_FILES:
r = signum(GetFilesCount() - other->GetFilesCount());
break;
case COL_SUBDIRS:
r = signum(GetSubdirsCount() - other->GetSubdirsCount());
break;
case COL_LASTCHANGE:
{
if (m_lastChange < other->m_lastChange)
return -1;
else if (m_lastChange == other->m_lastChange)
return 0;
else
return 1;
}
break;
case COL_ATTRIBUTES:
r = signum(GetSortAttributes() - other->GetSortAttributes());
break;
default:
ASSERT(false);
break;
}
return r;
}