本文整理汇总了C++中TagEntryPtr::SetSignature方法的典型用法代码示例。如果您正苦于以下问题:C++ TagEntryPtr::SetSignature方法的具体用法?C++ TagEntryPtr::SetSignature怎么用?C++ TagEntryPtr::SetSignature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TagEntryPtr
的用法示例。
在下文中一共展示了TagEntryPtr::SetSignature方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddFunctionsImplBaseDlg
AddFunctionsImpDlg::AddFunctionsImpDlg(wxWindow* parent, const TagEntryPtrVector_t &tags, const wxString &targetFile)
: AddFunctionsImplBaseDlg(parent)
{
unsigned int colCount = m_dataviewModel->GetColCount();
m_dataviewModel = new MyAddFunctionsModel();
m_dataviewModel->SetColCount( colCount );
m_dataview->AssociateModel( m_dataviewModel.get() );
m_tags.insert(m_tags.end(), tags.begin(), tags.end());
for(size_t i=0; i<m_tags.size(); ++i) {
wxVector<wxVariant> cols;
cols.push_back(true);
cols.push_back( m_tags.at(i)->GetDisplayName() );
// keep the implementation as the client data
wxString body;
TagEntryPtr tag = m_tags.at(i);
tag->SetSignature( TagsManagerST::Get()->NormalizeFunctionSig( tag->GetSignature(), Normalize_Func_Name ) );
body << TagsManagerST::Get()->FormatFunction(tag, FunctionFormat_Impl);
body << wxT("\n");
m_dataviewModel->AppendItem( wxDataViewItem(0), cols, new wxStringClientData(body) );
}
m_filePicker->SetPath( targetFile );
WindowAttrManager::Load(this, "AddFunctionsImpDlg", NULL);
}
示例2: SyncSignature
TagEntryPtr RefactoringEngine::SyncSignature(const wxFileName& fn,
int line,
int pos,
const wxString &word,
const wxString &text,
const wxString &expr)
{
TagEntryPtr func = TagsManagerST::Get()->FunctionFromFileLine(fn, line);
if(!func)
return NULL;
bool bIsImpl = (func->GetKind() == wxT("function"));
// Found the counterpart
std::vector<TagEntryPtr> tags;
TagsManagerST::Get()->FindImplDecl(fn, line, expr, word, text, tags, !bIsImpl);
if(tags.size() != 1)
return NULL;
TagEntryPtr tag = tags.at(0);
if(tag->IsMethod() == false)
return NULL;
wxString signature;
if (bIsImpl) {
// The "source" is an implementaion, which means that we need to prepare declaration signature
// this could be tricky since we might lose the "default" values
signature = TagsManagerST::Get()->NormalizeFunctionSig(func->GetSignature(), Normalize_Func_Default_value|Normalize_Func_Name|Normalize_Func_Reverse_Macro);
} else {
// Prepare an "implementation" signature
signature = TagsManagerST::Get()->NormalizeFunctionSig(func->GetSignature(), Normalize_Func_Name|Normalize_Func_Reverse_Macro);
}
tag->SetSignature(signature);
return tag;
}