本文整理汇总了C++中TagEntryPtr::GetAccess方法的典型用法代码示例。如果您正苦于以下问题:C++ TagEntryPtr::GetAccess方法的具体用法?C++ TagEntryPtr::GetAccess怎么用?C++ TagEntryPtr::GetAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TagEntryPtr
的用法示例。
在下文中一共展示了TagEntryPtr::GetAccess方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoGetTagImg
wxBitmap OpenResourceDialog::DoGetTagImg(TagEntryPtr tag)
{
wxString kind = tag->GetKind();
wxString access = tag->GetAccess();
wxBitmap bmp = m_tagImgMap[wxT("text")];
if(kind == wxT("class")) bmp = m_tagImgMap[wxT("class")];
if(kind == wxT("struct")) bmp = m_tagImgMap[wxT("struct")];
if(kind == wxT("namespace")) bmp = m_tagImgMap[wxT("namespace")];
if(kind == wxT("variable")) bmp = m_tagImgMap[wxT("member_public")];
if(kind == wxT("typedef")) bmp = m_tagImgMap[wxT("typedef")];
if(kind == wxT("member") && access.Contains(wxT("private"))) bmp = m_tagImgMap[wxT("member_private")];
if(kind == wxT("member") && access.Contains(wxT("public"))) bmp = m_tagImgMap[wxT("member_public")];
if(kind == wxT("member") && access.Contains(wxT("protected"))) bmp = m_tagImgMap[wxT("member_protected")];
if(kind == wxT("member")) bmp = m_tagImgMap[wxT("member_public")];
if((kind == wxT("function") || kind == wxT("prototype")) && access.Contains(wxT("private")))
bmp = m_tagImgMap[wxT("function_private")];
if((kind == wxT("function") || kind == wxT("prototype")) && (access.Contains(wxT("public")) || access.IsEmpty()))
bmp = m_tagImgMap[wxT("function_public")];
if((kind == wxT("function") || kind == wxT("prototype")) && access.Contains(wxT("protected")))
bmp = m_tagImgMap[wxT("function_protected")];
if(kind == wxT("macro")) bmp = m_tagImgMap[wxT("typedef")];
if(kind == wxT("enum")) bmp = m_tagImgMap[wxT("enum")];
if(kind == wxT("enumerator")) bmp = m_tagImgMap[wxT("enumerator")];
return bmp;
}
示例2: GetImageId
int wxCodeCompletionBox::GetImageId(TagEntryPtr entry)
{
wxString kind = entry->GetKind();
wxString access = entry->GetAccess();
if(kind == wxT("class")) return 0;
if(kind == wxT("struct")) return 1;
if(kind == wxT("namespace")) return 2;
if(kind == wxT("variable")) return 3;
if(kind == wxT("typedef")) return 4;
if(kind == wxT("member") && access.Contains(wxT("private"))) return 5;
if(kind == wxT("member") && access.Contains(wxT("public"))) return 6;
if(kind == wxT("member") && access.Contains(wxT("protected"))) return 7;
// member with no access? (maybe part of namespace??)
if(kind == wxT("member")) return 6;
if((kind == wxT("function") || kind == wxT("prototype")) && access.Contains(wxT("private"))) return 8;
if((kind == wxT("function") || kind == wxT("prototype")) && (access.Contains(wxT("public")) || access.IsEmpty()))
return 9;
if((kind == wxT("function") || kind == wxT("prototype")) && access.Contains(wxT("protected"))) return 10;
if(kind == wxT("macro")) return 11;
if(kind == wxT("enum")) return 12;
if(kind == wxT("enumerator")) return 13;
if(kind == wxT("cpp_keyword")) return 17;
return wxNOT_FOUND;
}
示例3: CompareDisplayString
int TagEntry::CompareDisplayString(const TagEntryPtr& rhs) const
{
wxString d1, d2;
d1 << GetReturnValue() << wxT(": ") << GetFullDisplayName() << wxT(":") << GetAccess();
d2 << rhs->GetReturnValue() << wxT(": ") << rhs->GetFullDisplayName() << wxT(":") << rhs->GetAccess();
return d1.Cmp(d2);
}