本文整理汇总了C++中CAVector::size方法的典型用法代码示例。如果您正苦于以下问题:C++ CAVector::size方法的具体用法?C++ CAVector::size怎么用?C++ CAVector::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAVector
的用法示例。
在下文中一共展示了CAVector::size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scrollViewStopMoved
void CDNewsImageController::scrollViewStopMoved(CrossApp::CAScrollView *view)
{
CAVector<CATableViewCell*> temVec = p_TableView->displayingTableCell();
for(int i=0;i<temVec.size();i++)
{
CDNewsImageTableCell* cell = (CDNewsImageTableCell*)temVec.at(i);
CCLog("cell-index===%d",cell->getRow());
int row = cell->getRow();
int img_num = m_ImageNum[row];
for (int i=0; i<img_num; i++)
{
CommonUrlImageView* temImage = dynamic_cast<CommonUrlImageView*>(cell->getSubviewByTag(200 + i));
if (temImage)
{
temImage->setUrl(m_ImageMsg[row].m_imageUrl[1 + i]);
}
}
}
}
示例2: initWithViewControllers
bool CATabBarController::initWithViewControllers(const CAVector<CAViewController*>& viewControllers, CABarVerticalAlignment var)
{
CAViewController::init();
do
{
CC_BREAK_IF(viewControllers.size() == 0);
m_pViewControllers = viewControllers;
std::vector<CATabBarItem*> items;
for (unsigned int i=0; i<m_pViewControllers.size(); i++)
{
CAViewController* view = m_pViewControllers.at(i);
if (view->getTabBarItem() == NULL)
{
char title[8];
sprintf(title, "item%d", i);
CATabBarItem* item = CATabBarItem::create(title, NULL);
item->setTag(i);
view->setTabBarItem(item);
}
items.push_back(view->getTabBarItem());
view->m_pTabBarController = this;
}
m_pTabBar = CATabBar::create(items);
m_pTabBar->retain();
m_pTabBar->setDelegate(this);
}
while (0);
m_eTabBarVerticalAlignment = var;
return true;
}
示例3: updateAtlasIndex
void CABatchView::updateAtlasIndex(CAView* view, int* curIndex)
{
const CAVector<CAView*> pVector = view->getSubviews();
unsigned int count = (unsigned int)pVector.size();
int oldIndex = 0;
if( count == 0 )
{
oldIndex = view->getAtlasIndex();
view->setAtlasIndex(*curIndex);
view->setOrderOfArrival(0);
if (oldIndex != *curIndex)
{
swap(oldIndex, *curIndex);
}
(*curIndex)++;
}
else
{
bool needNewIndex = true;
if (pVector.front()->getZOrder() >= 0)
{
oldIndex = view->getAtlasIndex();
view->setAtlasIndex(*curIndex);
view->setOrderOfArrival(0);
if (oldIndex != *curIndex)
{
swap(oldIndex, *curIndex);
}
(*curIndex)++;
needNewIndex = false;
}
CAVector<CAView*>::const_iterator itr;
for (itr=pVector.begin(); itr!=pVector.end(); itr++)
{
CAView* subview = *itr;
if (needNewIndex && subview->getZOrder() >= 0)
{
oldIndex = view->getAtlasIndex();
view->setAtlasIndex(*curIndex);
view->setOrderOfArrival(0);
if (oldIndex != *curIndex)
{
this->swap(oldIndex, *curIndex);
}
(*curIndex)++;
needNewIndex = false;
}
updateAtlasIndex(subview, curIndex);
}
if (needNewIndex)
{
oldIndex = view->getAtlasIndex();
view->setAtlasIndex(*curIndex);
view->setOrderOfArrival(0);
if (oldIndex!=*curIndex)
{
swap(oldIndex, *curIndex);
}
(*curIndex)++;
}
}
}