本文整理汇总了C++中Method::getSignature方法的典型用法代码示例。如果您正苦于以下问题:C++ Method::getSignature方法的具体用法?C++ Method::getSignature怎么用?C++ Method::getSignature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Method
的用法示例。
在下文中一共展示了Method::getSignature方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: class_signature
ISequence<MethodSignature>*
MethodsList::extractAndSyncAnyExtraMethods( Method& method )
{
ISequence<MethodSignature>* method_signatures = new Sequence<MethodSignature>();
{
ISequence<Method>* extra_methods = method.extractExtraMethods();
if ( extra_methods )
{
ClassSignature class_signature( this->cu.getFQName() );
while ( ! extra_methods->isEmpty() )
{
Method* method = extra_methods->removeLast();
if ( method->sync() )
{
const char* method_key = method->getSignature().getMethodKey().getChars();
this->methods->insert( method_key, method );
method_signatures->addLast( new MethodSignature( class_signature, method_key ) );
}
else
{
delete method_signatures;
method_signatures = NULL;
break;
}
}
}
delete extra_methods;
}
return method_signatures;
}
示例2:
bool
MethodsList::removeMethodFromAST( Method& method )
{
bool status = false;
const char* method_key = method.getSignature().getMethodKey().getChars();
if ( (status = method.removeMethod( method_key )) )
{
try
{
IEntry<IPosition<SourceToken> >* e = this->methodPositions->find( method_key );
delete this->methodPositions->remove( e );
}
catch ( NoSuchElementException* ex )
{
delete ex;
}
try
{
IEntry<Method>* e = this->methods->find( method_key );
delete this->methods->remove( e );
}
catch ( NoSuchElementException* ex )
{
delete ex;
}
}
return status;
}