本文整理汇总了C++中SortedList::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ SortedList::Add方法的具体用法?C++ SortedList::Add怎么用?C++ SortedList::Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SortedList
的用法示例。
在下文中一共展示了SortedList::Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBounds
Rect GuiTableComposition::GetBounds()
{
Rect cached = previousBounds;
Rect result = GuiBoundsComposition::GetBounds();
bool cellMinSizeModified = false;
SortedList<GuiCellComposition*> cells;
FOREACH(GuiCellComposition*, cell, cellCompositions)
{
if (cell && !cells.Contains(cell))
{
cells.Add(cell);
Size newSize = cell->GetPreferredBounds().GetSize();
if (cell->lastPreferredSize != newSize)
{
cell->lastPreferredSize = newSize;
cellMinSizeModified = true;
}
}
}
if (cached != result || cellMinSizeModified)
{
UpdateCellBounds();
}
return result;
}
示例2: CollectTypeDescriptors
static void CollectTypeDescriptors(ITypeDescriptor* td, SortedList<ITypeDescriptor*>& tds)
{
if (!tds.Contains(td))
{
tds.Add(td);
}
}
示例3:
ParserDecl(Ptr<ParsingTreeObject> parserDecl)
{
nodeTypeMap.Add(parserDecl.Obj(), this);
CollectTypes(parserDecl->GetMember(L"types").Cast<ParsingTreeArray>(), nodeTypeMap);
{
Ptr<ParsingTreeArray> items=parserDecl->GetMember(L"tokens").Cast<ParsingTreeArray>();
if(items)
{
for(int i=0;i<items->Count();i++)
{
Ptr<ParsingTreeObject> type=items->GetItem(i).Cast<ParsingTreeObject>();
if(type)
{
Ptr<ParsingTreeToken> name=type->GetMember(L"name").Cast<ParsingTreeToken>();
if(name)
{
tokens.Add(name->GetValue());
}
}
}
}
}
{
Ptr<ParsingTreeArray> items=parserDecl->GetMember(L"rules").Cast<ParsingTreeArray>();
if(items)
{
for(int i=0;i<items->Count();i++)
{
Ptr<ParsingTreeObject> type=items->GetItem(i).Cast<ParsingTreeObject>();
if(type)
{
Ptr<ParsingTreeToken> name=type->GetMember(L"name").Cast<ParsingTreeToken>();
if(name)
{
rules.Add(name->GetValue());
}
}
}
}
}
}
示例4: if
ParserDecl(Ptr<ParsingTreeObject> parserDecl)
{
nodeTypeMap.Add(parserDecl.Obj(), this);
Ptr<ParsingTreeArray> defs=parserDecl->GetMember(L"definitions").Cast<ParsingTreeArray>();
if(defs)
{
vint count=defs->Count();
for(vint i=0;i<count;i++)
{
Ptr<ParsingTreeObject> defObject=defs->GetItem(i).Cast<ParsingTreeObject>();
if(defObject)
{
if(defObject->GetType()==L"TokenDef")
{
Ptr<ParsingTreeToken> name=defObject->GetMember(L"name").Cast<ParsingTreeToken>();
if(name)
{
tokens.Add(name->GetValue());
}
}
else if(defObject->GetType()==L"RuleDef")
{
Ptr<ParsingTreeToken> name=defObject->GetMember(L"name").Cast<ParsingTreeToken>();
if(name)
{
rules.Add(name->GetValue());
}
}
else
{
CollectSubType(defObject, nodeTypeMap);
}
}
}
}
}