本文整理汇总了C++中Name::identifiers_end方法的典型用法代码示例。如果您正苦于以下问题:C++ Name::identifiers_end方法的具体用法?C++ Name::identifiers_end怎么用?C++ Name::identifiers_end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Name
的用法示例。
在下文中一共展示了Name::identifiers_end方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Type
UnknownType::UnknownType(const Name& name)
: Type(Name(name.last()))
{
if (!name.isSimple())
{
/*
* As we need to support UnknownType instances with qualified names,
* but NamedEntity's name() method guarantees to return a simple name,
* we need a small hack: we create auxiliary NamedEntity instances and
* chain them together with addChild() so that the
* UnknownType's qualifiedName() method will return the correct
* full name, while name() will only return the simple name.
*/
Name::identifiers_iterator it = name.identifiers_begin();
mQualifiedNameParents.push_back(new NamedEntity(Name(*it)));
it++;
for (; it != --name.identifiers_end(); it++)
{
NamedEntity* parent = new NamedEntity(Name(*it));
mQualifiedNameParents.back()->addChild(parent);
mQualifiedNameParents.push_back(parent);
}
mQualifiedNameParents.back()->addChild(this);
}
}
示例2: ret
Name
Name::operator+(const Name& other) const
{
Name ret(identifiers_begin(), identifiers_end());
ret.mIdentifiers.insert(ret.mIdentifiers.end(),
other.identifiers_begin(),
other.identifiers_end());
return ret;
}