本文整理汇总了C++中Container::GetArrangeMember方法的典型用法代码示例。如果您正苦于以下问题:C++ Container::GetArrangeMember方法的具体用法?C++ Container::GetArrangeMember怎么用?C++ Container::GetArrangeMember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Container
的用法示例。
在下文中一共展示了Container::GetArrangeMember方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: championsCompare
bool championsCompare(Champions &lhs, Champions &rhs)
{
bool resultStatus = false;
Container champsSort;
if (champsSort.GetArrangeMember() == "AD")
{
if (lhs.GetChampAD() < rhs.GetChampAD())
{
resultStatus = true;
}
else
{
if (lhs.GetChampAD() == rhs.GetChampAD())
{
if (lhs.GetChampName() < rhs.GetChampName())
{
resultStatus = true;
}
}
}
}
else if (champsSort.GetArrangeMember() == "AP")
{
if (lhs.GetChampAP() < rhs.GetChampAP())
{
resultStatus = true;
}
else
{
if (lhs.GetChampAP() == rhs.GetChampAP())
{
if (lhs.GetChampName() < rhs.GetChampName())
{
resultStatus = true;
}
}
}
}
else if (champsSort.GetArrangeMember() == "DEF")
{
if (lhs.GetChampDef() < rhs.GetChampDef())
{
resultStatus = true;
}
else
{
if (lhs.GetChampDef() == rhs.GetChampDef())
{
if (lhs.GetChampName() < rhs.GetChampName())
{
resultStatus = true;
}
}
}
}
else if (champsSort.GetArrangeMember() == "Diff")
{
if (lhs.GetChampDiff() < rhs.GetChampDiff())
{
resultStatus = true;
}
else
{
if (lhs.GetChampDiff() == rhs.GetChampDiff())
{
if (lhs.GetChampName() < rhs.GetChampName())
{
resultStatus = true;
}
}
}
}
else if (champsSort.GetArrangeMember() == "DEF")
{
if (lhs.GetChampDef() < rhs.GetChampDef())
{
resultStatus = true;
}
else
{
if (lhs.GetChampDef() == rhs.GetChampDef())
{
if (lhs.GetChampName() < rhs.GetChampName())
{
resultStatus = true;
}
}
}
}
else if (champsSort.GetArrangeMember() == "IP")
{
if (lhs.GetChampIP() < rhs.GetChampIP())
{
resultStatus = true;
}
else
{
if (lhs.GetChampIP() == rhs.GetChampIP())
{
if (lhs.GetChampName() < rhs.GetChampName())
//.........这里部分代码省略.........