本文整理汇总了C++中Reference::GetBase方法的典型用法代码示例。如果您正苦于以下问题:C++ Reference::GetBase方法的具体用法?C++ Reference::GetBase怎么用?C++ Reference::GetBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reference
的用法示例。
在下文中一共展示了Reference::GetBase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
vector<string> ObjectFunctor::operator()()
{
vector<string> result;
NetworkID id = get();
if (id)
{
FactoryObject reference = GameFactory::GetObject(id);
Reference* object = vaultcast<Object>(reference);
if (object)
{
unsigned int flags = this->flags();
if (flags & FLAG_REFERENCE)
result.push_back(Utils::toString(object->GetReference()));
else if (flags & FLAG_BASE)
result.push_back(Utils::toString(object->GetBase()));
}
}
else
{
vector<FactoryObject>::iterator it;
vector<FactoryObject> references = GameFactory::GetObjectTypes(ID_OBJECT);
unsigned int refID;
for (it = references.begin(); it != references.end(); GameFactory::LeaveReference(*it), ++it)
if ((refID = (**it)->GetReference()) && !filter(**it))
result.push_back(Utils::toString(refID));
}
_next(result);
return result;
}