本文整理汇总了C++中Base::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Base::GetName方法的具体用法?C++ Base::GetName怎么用?C++ Base::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base::GetName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char const *argv[])
{
/* code */
Derived cDerived;
Base *rBase = &cDerived;
cout << "rBase is a " << rBase->GetName() <<"\n";
return 0;
}
示例2: FindChildByName
Controls::Base* Base::FindChildByName( const Gwen::String& name, bool bRecursive )
{
Base::List::iterator iter;
for (iter = Children.begin(); iter != Children.end(); ++iter)
{
Base* pChild = *iter;
if ( !pChild->GetName().empty() && pChild->GetName() == name )
return pChild;
if ( bRecursive )
{
Controls::Base* pSubChild = pChild->FindChildByName( name, true );
if ( pSubChild )
return pSubChild;
}
}
return NULL;
}
示例3: GetNamedChildren
int Base::GetNamedChildren( Gwen::ControlList& list, const Gwen::String& strName, bool bDeep )
{
int iFound = 0;
Base::List::iterator iter;
for ( iter = Children.begin(); iter != Children.end(); ++iter )
{
Base* pChild = *iter;
if ( !pChild->GetName().empty() && pChild->GetName() == strName )
{
list.Add( pChild );
iFound++;
}
if ( !bDeep ) continue;
iFound += pChild->GetNamedChildren( list, strName, bDeep );
}
return iFound;
}