本文整理汇总了C++中vector::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ vector::GetSize方法的具体用法?C++ vector::GetSize怎么用?C++ vector::GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vector
的用法示例。
在下文中一共展示了vector::GetSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SortRegions
void SortRegions(vector<PSMILRegionElement*>& regions, PSMILElement* parent)
{
ASSERT(0);
#if 0
UPOSITION pos = parent->m_childList.GetHeadPosition();
while (pos)
{
CPSMILElementImpl* pElement = (CPSMILElementImpl*)parent->m_childList.GetNext(pos);
CComQIPtr<ILSMILRegionElement> region = pElement->m_pNode;
if (region)
{
CPSMILRegionElement* pRegionElement = (CPSMILRegionElement*)pElement;
CComBSTR bstrZIndex;
region->getAttribute(L"z-index", &bstrZIndex);
if (bstrZIndex.Length())
{
pRegionElement->m_computedZIndex = (long)_variant_t(bstrZIndex);
}
else
{
pRegionElement->m_computedZIndex = 0; // ? that of parent
}
// Insert sorted
for (int i = 0; i < regions.GetSize(); i++)
{
if (pRegionElement->m_computedZIndex < regions[i]->m_computedZIndex)
{
//regions.InsertAt(i, pRegionElement);
break;
}
/*
the rule concerning time priority is maintained, meaning that in the case
of a z-index conflict, the media visible in the overlap will be determined
by the region that is rendering the media that has most recently begun in
time. If the conflicting media began at the same time, then the rule using
the textual order of the media elements in the SMIL document is applied
*/
else if (pRegionElement->m_computedZIndex == regions[i]->m_computedZIndex)
{
//static_cast<SMILRegionElement*>(region.p)->m_p
}
}
regions.InsertAt(i, pRegionElement);
}
}
#endif
}
示例2: GetTransformValuesArray
int GetTransformValuesArray(const WCHAR* str, vector<double>& values)
{
// int len = str.GetLength();
const WCHAR* p = str;
while (*p && isspace(*p)) p++; // Skip spaces
//int i = 0;
while (*p)
{
double value = getfnumber(&p);
if (p == NULL)
{
values.RemoveAll(); // On error, make all values parsed so far invalid?
return 0;
}
/*
CWCharString str_value;
while (*p && (*p != ',') && (*p != ' '))
{
str_value += *p;
p++;
}
while (i < len && p[i] == ' ') i++; // Skip spaces
*/
if (*p == L',') p++;
//str_value.TrimRight();
//str_value.TrimRight();
//double value = atof(str_value);
values.Add(value);
while (*p && isspace(*p)) p++; // Skip spaces
}
return values.GetSize();
}
示例3: GetSizeOfTarget
tWord32 GetSizeOfTarget() {
return m_itrTargetSymbol->GetSize();
}