Code::Blocks
SVN r11506
|
worker thread to build the symbol browser tree controls(both the top tree and the bottom tree) When the thread is started, it is waiting for the semaphore, and once the GUI post the semaphore the builder will do the dirty job, once finished, it will wait again. More...
#include <classbrowserbuilderthread.h>
Public Types | |
enum | EThreadEvent { selectItemRequired, buildTreeStart, buildTreeEnd } |
the builder threads' event sent to the GUI(class browser window) More... | |
Public Types inherited from wxThread | |
typedef void * | ExitCode |
Public Member Functions | |
ClassBrowserBuilderThread (wxEvtHandler *evtHandler, wxSemaphore &sem) | |
constructor More... | |
virtual | ~ClassBrowserBuilderThread () |
destructor More... | |
void | Init (NativeParser *np, CCTreeCtrl *treeTop, CCTreeCtrl *treeBottom, const wxString &active_filename, void *user_data, const BrowserOptions &bo, TokenTree *tt, int idThreadEvent) |
void | ExpandItem (wxTreeItemId item) |
construct the children of the tree item Called from external, BuildTree(): More... | |
void | CollapseItem (wxTreeItemId item) |
remove the children of the tree item Called from external, BuildTree(), RemoveInvalidNodes(): More... | |
void | SelectItem (wxTreeItemId item) |
void | SelectItemRequired () |
void | RequestTermination (bool terminate=true) |
ask the worker thread to die Called from external: when the class browser window get destroyed More... | |
Public Member Functions inherited from wxThread | |
wxThread (wxThreadKind kind=wxTHREAD_DETACHED) | |
virtual | ~wxThread () |
wxThreadError | Create (unsigned int stackSize=0) |
wxThreadError | Delete (ExitCode *rc=NULL, wxThreadWait waitMode=wxTHREAD_WAIT_BLOCK) |
wxThreadIdType | GetId () const |
wxThreadKind | GetKind () const |
unsigned int | GetPriority () const |
bool | IsAlive () const |
bool | IsDetached () const |
bool | IsPaused () const |
bool | IsRunning () const |
wxThreadError | Kill () |
wxThreadError | Pause () |
wxThreadError | Resume () |
wxThreadError | Run () |
void | SetPriority (unsigned int priority) |
virtual bool | TestDestroy () |
ExitCode | Wait (wxThreadWait flags=wxTHREAD_WAIT_BLOCK) |
Protected Member Functions | |
virtual void * | Entry () |
void | BuildTree () |
void | RemoveInvalidNodes (CCTreeCtrl *tree, wxTreeItemId parent) |
Remove any nodes no longer valid (due to update) More... | |
void | ExpandNamespaces (wxTreeItemId node, TokenKind tokenKind, int level) |
recursively construct the children of node's children, which matches tokenKind Called from BuildTree(): More... | |
bool | CreateSpecialFolders (CCTreeCtrl *tree, wxTreeItemId parent) |
wxTreeItemId | AddNodeIfNotThere (CCTreeCtrl *tree, wxTreeItemId parent, const wxString &name, int imgIndex=-1, CCTreeCtrlData *data=0) |
bool | AddChildrenOf (CCTreeCtrl *tree, wxTreeItemId parent, int parentTokenIdx, short int tokenKindMask=0xffff, int tokenScopeMask=0) |
Add the child nodes of the specified token. More... | |
bool | AddAncestorsOf (CCTreeCtrl *tree, wxTreeItemId parent, int tokenIdx) |
bool | AddDescendantsOf (CCTreeCtrl *tree, wxTreeItemId parent, int tokenIdx, bool allowInheritance=true) |
void | AddMembersOf (CCTreeCtrl *tree, wxTreeItemId node) |
Protected Member Functions inherited from wxThread | |
void | Exit (ExitCode exitcode=0) |
Protected Attributes | |
wxEvtHandler * | m_Parent |
wxSemaphore & | m_ClassBrowserSemaphore |
wxMutex | m_ClassBrowserBuilderThreadMutex |
Some member functions of ClassBrowserBuilderThread such as ExpandItem() can either be called from the main GUI thread(in ClassBrowser::OnTreeItemExpanding(wxTreeEvent& event)), or be called in the worker thread(in BuildTree() which is called in ClassBrowserBuilderThread::Entry()), to protect the member variables of the class(especially the wxTreeCtrl, we use the Mutex so that only one thread can access to those member variables. More... | |
NativeParser * | m_NativeParser |
CCTreeCtrl * | m_CCTreeCtrlTop |
pointer to the top wxTreeCtrl More... | |
CCTreeCtrl * | m_CCTreeCtrlBottom |
pointer to the bottom wxTreeCtrl More... | |
wxString | m_ActiveFilename |
void * | m_UserData |
BrowserOptions | m_BrowserOptions |
TokenTree * | m_TokenTree |
TokenFileSet | m_CurrentFileSet |
A file set which contains a header file and the associated implementation file. More... | |
TokenIdxSet | m_CurrentTokenSet |
Tokens belong to the m_CurrentFileSet file set. More... | |
TokenIdxSet | m_CurrentGlobalTokensSet |
Special global scope tokens belong to the m_CurrentFileSet file set. More... | |
Private Member Functions | |
bool | AddNodes (CCTreeCtrl *tree, wxTreeItemId parent, const TokenIdxSet *tokens, short int tokenKindMask=0xffff, int tokenScopeMask=0, bool allowGlobals=false) |
bool | TokenMatchesFilter (const Token *token, bool locked=false) |
if the token should be shown in the tree, it will return true More... | |
bool | TokenContainsChildrenOfKind (const Token *token, int kind) |
void | SaveExpandedItems (CCTreeCtrl *tree, wxTreeItemId parent, int level) |
void | ExpandSavedItems (CCTreeCtrl *tree, wxTreeItemId parent, int level) |
void | SaveSelectedItem () |
void | SelectSavedItem () |
Private Attributes | |
ExpandedItemVect | m_ExpandedVect |
SelectedItemPath | m_SelectedPath |
bool | m_InitDone |
bool | m_TerminationRequested |
if this variable is true, the Entry() function should return More... | |
int | m_idThreadEvent |
wxTreeItemId | m_SelectItemRequired |
Additional Inherited Members | |
Static Public Member Functions inherited from wxThread | |
static int | GetCPUCount () |
static wxThreadIdType | GetCurrentId () |
static wxThreadIdType | GetMainId () |
static bool | IsMain () |
static bool | SetConcurrency (size_t level) |
static void | Sleep (unsigned long milliseconds) |
static wxThread * | This () |
static void | Yield () |
worker thread to build the symbol browser tree controls(both the top tree and the bottom tree) When the thread is started, it is waiting for the semaphore, and once the GUI post the semaphore the builder will do the dirty job, once finished, it will wait again.
Definition at line 21 of file classbrowserbuilderthread.h.
the builder threads' event sent to the GUI(class browser window)
Enumerator | |
---|---|
selectItemRequired | |
buildTreeStart | an item is selected |
buildTreeEnd | the thread is starting to (re)build the tree finishing (re)build the tree |
Definition at line 25 of file classbrowserbuilderthread.h.
ClassBrowserBuilderThread::ClassBrowserBuilderThread | ( | wxEvtHandler * | evtHandler, |
wxSemaphore & | sem | ||
) |
constructor
evtHandler | parent window notification events will sent to |
sem | a semaphore reference which is used synchronize the GUI and the builder thread |
Definition at line 66 of file classbrowserbuilderthread.cpp.
References wxID_NONE, and wxTHREAD_JOINABLE.
|
virtual |
destructor
Definition at line 84 of file classbrowserbuilderthread.cpp.
|
protected |
Definition at line 840 of file classbrowserbuilderthread.cpp.
References _T, AddNodes(), TokenTree::at(), CBBT_SANITY_CHECK, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, Token::m_DirectAncestors, m_TokenTree, TokenTree::RecalcInheritanceChain(), s_TokenTreeMutex, tkClass, tkTypedef, and TRACE.
Referenced by ExpandItem(), and RequestTermination().
|
protected |
Add the child nodes of the specified token.
tree | the symbol tree control |
parent | the specified node |
parentTokenIdx | the Token index associated with the node Called from ExpandItem() |
Definition at line 795 of file classbrowserbuilderthread.cpp.
References _T, AddNodes(), TokenTree::at(), bdfEverything, bdfWorkspace, CBBT_SANITY_CHECK, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, BrowserOptions::displayFilter, TokenTree::GetGlobalNameSpaces(), m_BrowserOptions, Token::m_Children, m_CurrentGlobalTokensSet, m_TokenTree, s_TokenTreeMutex, and TRACE.
Referenced by AddMembersOf(), ExpandItem(), and RequestTermination().
|
protected |
Definition at line 861 of file classbrowserbuilderthread.cpp.
References _T, AddNodes(), TokenTree::at(), CBBT_SANITY_CHECK, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, m_BrowserOptions, Token::m_Descendants, m_TokenTree, TokenTree::RecalcInheritanceChain(), s_TokenTreeMutex, BrowserOptions::showInheritance, tkClass, tkTypedef, and TRACE.
Referenced by ExpandItem(), and RequestTermination().
|
protected |
Definition at line 888 of file classbrowserbuilderthread.cpp.
References _(), _T, AddChildrenOf(), wxTreeCtrl::AddRoot(), wxTreeCtrl::AppendItem(), bstKind, bstScope, CBBT_SANITY_CHECK, CCLogger::DebugLog(), wxTreeCtrl::Delete(), wxTreeCtrl::DeleteAllItems(), wxTreeCtrl::EnsureVisible(), wxTreeCtrl::ExpandAll(), F(), CCLogger::Get(), wxTreeCtrl::GetChildrenCount(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetLastChild(), wxTreeCtrl::GetPrevSibling(), wxTreeCtrl::GetRootItem(), wxTreeItemId::IsOk(), m_BrowserOptions, m_CCTreeCtrlBottom, m_CCTreeCtrlTop, Token::m_Index, CCTreeCtrlData::m_SpecialFolder, CCTreeCtrlData::m_Token, Token::m_TokenKind, PARSER_IMG_CLASS_FOLDER, PARSER_IMG_FUNCS_FOLDER, PARSER_IMG_MACRO_USE_FOLDER, PARSER_IMG_OTHERS_FOLDER, PARSER_IMG_VARS_FOLDER, wxTreeCtrl::ScrollTo(), wxTreeCtrl::SetItemBold(), sfBase, sfDerived, sfGFuncs, sfGVars, sfMacro, sfPreproc, sfRoot, sfToken, sfTypedef, BrowserOptions::sortType, wxStopWatch::Start(), wxStopWatch::Time(), tkAnyFunction, tkClass, tkConstructor, tkDestructor, tkEnum, tkFunction, tkMacroDef, tkMacroUse, tkNamespace, tkTypedef, tkVariable, TRACE, tsPrivate, tsProtected, and tsPublic.
Referenced by ExpandItem(), RequestTermination(), and SelectItem().
|
protected |
Definition at line 768 of file classbrowserbuilderthread.cpp.
References _T, wxTreeCtrl::AppendItem(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetItemText(), wxTreeCtrl::GetNextChild(), wxTreeCtrl::SetItemData(), wxTreeCtrl::SetItemImage(), TRACE, wxTreeItemIcon_Normal, and wxTreeItemIcon_Selected.
Referenced by CreateSpecialFolders(), and RequestTermination().
|
private |
Definition at line 1021 of file classbrowserbuilderthread.cpp.
References _T, wxTreeCtrl::AppendItem(), TokenTree::at(), CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, CCLogger::DebugLog(), F(), CCLogger::Get(), wxTreeCtrl::GetFirstChild(), Token::GetFormattedArgs(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetNextSibling(), Token::GetTicket(), NativeParser::GetTokenKindImage(), wxString::IsEmpty(), wxTreeItemId::IsOk(), m_BrowserOptions, m_CCTreeCtrlTop, Token::m_FullType, Token::m_IsLocal, Token::m_Name, m_NativeParser, Token::m_Scope, Token::m_TemplateArgument, CCTreeCtrlData::m_Ticket, Token::m_TokenKind, m_TokenTree, s_TokenTreeMutex, wxTreeCtrl::SetItemHasChildren(), sfToken, BrowserOptions::showInheritance, wxTreeCtrl::SortChildren(), tkClass, tkConstructor, tkDestructor, tkEnum, tkEnumerator, tkFunction, tkMacroUse, tkNamespace, tkTypedef, tkVariable, TokenContainsChildrenOfKind(), TokenMatchesFilter(), TRACE, and BrowserOptions::treeMembers.
Referenced by AddAncestorsOf(), AddChildrenOf(), AddDescendantsOf(), and RequestTermination().
|
protected |
Definition at line 417 of file classbrowserbuilderthread.cpp.
References _(), _T, wxTreeCtrl::AddRoot(), buildTreeEnd, buildTreeStart, CBBT_SANITY_CHECK, CollapseItem(), CCLogger::DebugLog(), wxTreeCtrl::Expand(), ExpandItem(), ExpandNamespaces(), ExpandSavedItems(), F(), CCLogger::Get(), NativeParser::GetImageList(), wxTreeCtrl::GetRootItem(), wxTreeItemId::IsOk(), m_BrowserOptions, m_CCTreeCtrlBottom, m_CCTreeCtrlTop, m_ExpandedVect, m_idThreadEvent, m_InitDone, m_NativeParser, m_Parent, PARSER_IMG_SYMBOLS_FOLDER, RemoveInvalidNodes(), SaveExpandedItems(), SaveSelectedItem(), SelectSavedItem(), CCTreeCtrl::SetCompareFunction(), wxTreeCtrl::SetImageList(), wxTreeCtrl::SetItemHasChildren(), sfRoot, BrowserOptions::sortType, wxStopWatch::Start(), wxStopWatch::Time(), tkClass, tkNamespace, BrowserOptions::treeMembers, and wxEVT_COMMAND_ENTER.
Referenced by Entry(), and RequestTermination().
void ClassBrowserBuilderThread::CollapseItem | ( | wxTreeItemId | item | ) |
remove the children of the tree item Called from external, BuildTree(), RemoveInvalidNodes():
Definition at line 352 of file classbrowserbuilderthread.cpp.
References _T, CBBT_SANITY_CHECK, CC_LOCKER_TRACK_CBBT_MTX_LOCK, CC_LOCKER_TRACK_CBBT_MTX_UNLOCK, wxTreeCtrl::CollapseAndReset(), wxTreeCtrl::DeleteChildren(), wxTreeItemId::IsOk(), m_CCTreeCtrlTop, m_ClassBrowserBuilderThreadMutex, m_InitDone, wxTreeCtrl::SetItemHasChildren(), and TRACE.
Referenced by BuildTree(), ClassBrowser::OnTreeItemCollapsing(), and RemoveInvalidNodes().
|
protected |
Definition at line 689 of file classbrowserbuilderthread.cpp.
References _(), _T, AddNodeIfNotThere(), TokenTree::at(), CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, wxSystemSettings::GetColour(), TokenTree::GetGlobalNameSpaces(), NativeParser::GetParser(), ParserBase::GetTokenTree(), m_BrowserOptions, m_CCTreeCtrlTop, Token::m_IsLocal, m_NativeParser, Token::m_TokenKind, PARSER_IMG_FUNCS_FOLDER, PARSER_IMG_MACRO_DEF_FOLDER, PARSER_IMG_MACRO_USE_FOLDER, PARSER_IMG_TYPEDEF_FOLDER, PARSER_IMG_VARS_FOLDER, s_TokenTreeMutex, wxTreeCtrl::SetItemHasChildren(), wxTreeCtrl::SetItemTextColour(), sfGFuncs, sfGVars, sfMacro, sfPreproc, sfTypedef, tkFunction, tkMacroDef, tkMacroUse, tkTypedef, tkVariable, TokenMatchesFilter(), TRACE, BrowserOptions::treeMembers, wxSYS_COLOUR_GRAYTEXT, and wxSYS_COLOUR_WINDOWTEXT.
Referenced by ExpandItem(), and RequestTermination().
|
protectedvirtual |
Implements wxThread.
Definition at line 194 of file classbrowserbuilderthread.cpp.
References BuildTree(), Manager::IsAppShuttingDown(), m_CCTreeCtrlBottom, m_CCTreeCtrlTop, m_ClassBrowserSemaphore, m_NativeParser, m_TerminationRequested, wxSemaphore::Wait(), wxIsMainThread(), wxMutexGuiEnter(), and wxMutexGuiLeave().
Referenced by RequestTermination().
void ClassBrowserBuilderThread::ExpandItem | ( | wxTreeItemId | item | ) |
construct the children of the tree item Called from external, BuildTree():
Definition at line 243 of file classbrowserbuilderthread.cpp.
References _(), _T, AddAncestorsOf(), AddChildrenOf(), AddDescendantsOf(), AddMembersOf(), wxTreeCtrl::AppendItem(), bdfFile, CBBT_SANITY_CHECK, CC_LOCKER_TRACK_CBBT_MTX_LOCK, CC_LOCKER_TRACK_CBBT_MTX_UNLOCK, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, CreateSpecialFolders(), CCLogger::DebugLog(), BrowserOptions::displayFilter, F(), CCLogger::Get(), wxTreeCtrl::GetCount(), wxTreeCtrl::GetItemData(), wxString::IsEmpty(), wxTreeItemId::IsOk(), m_ActiveFilename, m_BrowserOptions, m_CCTreeCtrlTop, m_ClassBrowserBuilderThreadMutex, Token::m_Descendants, Token::m_DirectAncestors, Token::m_Index, m_InitDone, m_NativeParser, CCTreeCtrlData::m_SpecialFolder, CCTreeCtrlData::m_Token, Token::m_TokenKind, m_TokenTree, PARSER_IMG_CLASS_FOLDER, TokenTree::RecalcInheritanceChain(), s_TokenTreeMutex, wxTreeCtrl::SetItemHasChildren(), sfBase, sfDerived, sfGFuncs, sfGVars, sfMacro, sfPreproc, sfRoot, sfToken, sfTypedef, BrowserOptions::showInheritance, wxStopWatch::Time(), tkAnyContainer, tkAnyFunction, tkClass, tkConstructor, tkDestructor, tkEnum, tkEnumerator, tkFunction, tkMacroDef, tkMacroUse, tkNamespace, tkTypedef, tkUndefined, tkVariable, TRACE, and BrowserOptions::treeMembers.
Referenced by BuildTree(), and ClassBrowser::OnTreeItemExpanding().
|
protected |
recursively construct the children of node's children, which matches tokenKind Called from BuildTree():
level | the recursive level |
Definition at line 663 of file classbrowserbuilderthread.cpp.
References _T, CBBT_SANITY_CHECK, wxTreeCtrl::Expand(), BrowserOptions::expandNS, F(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetNextSibling(), wxTreeItemId::IsOk(), m_BrowserOptions, m_CCTreeCtrlTop, Token::m_Name, CCTreeCtrlData::m_Token, Token::m_TokenKind, and TRACE.
Referenced by BuildTree(), and RequestTermination().
|
private |
Definition at line 1198 of file classbrowserbuilderthread.cpp.
References _T, CBBT_SANITY_CHECK, wxTreeCtrl::Expand(), CCTreeCtrlExpandedItemData::GetData(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), CCTreeCtrlExpandedItemData::GetLevel(), wxTreeCtrl::GetNextSibling(), wxTreeItemId::IsOk(), m_ExpandedVect, CCTreeCtrlData::m_SpecialFolder, CCTreeCtrlData::m_TokenKind, CCTreeCtrlData::m_TokenName, and TRACE.
Referenced by BuildTree(), and RequestTermination().
void ClassBrowserBuilderThread::Init | ( | NativeParser * | np, |
CCTreeCtrl * | treeTop, | ||
CCTreeCtrl * | treeBottom, | ||
const wxString & | active_filename, | ||
void * | user_data, | ||
const BrowserOptions & | bo, | ||
TokenTree * | tt, | ||
int | idThreadEvent | ||
) |
Definition at line 88 of file classbrowserbuilderthread.cpp.
References _T, TokenTree::at(), bdfFile, bdfProject, CC_LOCKER_TRACK_CBBT_MTX_LOCK, CC_LOCKER_TRACK_CBBT_MTX_UNLOCK, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, BrowserOptions::displayFilter, ProjectFile::file, NativeParser::GetAllPathsByFilename(), wxArrayString::GetCount(), TokenTree::GetFileIndex(), TokenTree::GetFileMatches(), cbProject::GetFilesList(), wxFileName::GetFullPath(), NativeParser::GetParser(), TokenTree::GetTokensBelongToFile(), ParserBase::GetTokenTree(), idThreadEvent, wxString::IsEmpty(), m_ActiveFilename, m_BrowserOptions, m_CCTreeCtrlBottom, m_CCTreeCtrlTop, m_ClassBrowserBuilderThreadMutex, m_CurrentFileSet, m_CurrentGlobalTokensSet, m_CurrentTokenSet, m_idThreadEvent, m_NativeParser, Token::m_ParentIndex, m_TokenTree, m_UserData, s_TokenTreeMutex, and TRACE.
Referenced by ClassBrowser::ThreadedBuildTree().
|
protected |
Remove any nodes no longer valid (due to update)
Recursively enters all existing nodes and deletes the node if the token it references is invalid
tree | the symbol tree |
parent | the node Id Called from BuildTree(): |
Definition at line 592 of file classbrowserbuilderthread.cpp.
References _T, TokenTree::at(), CBBT_SANITY_CHECK, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, CollapseItem(), wxTreeCtrl::Delete(), wxTreeCtrl::DeleteChildren(), wxTreeCtrl::GetChildrenCount(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetLastChild(), wxTreeCtrl::GetPrevSibling(), Token::GetTicket(), wxTreeItemId::IsOk(), wxTreeCtrl::ItemHasChildren(), m_CCTreeCtrlBottom, m_CCTreeCtrlTop, CCTreeCtrlData::m_Ticket, CCTreeCtrlData::m_Token, CCTreeCtrlData::m_TokenIndex, m_TokenTree, s_TokenTreeMutex, TokenMatchesFilter(), and TRACE.
Referenced by BuildTree(), and RequestTermination().
|
inline |
ask the worker thread to die Called from external: when the class browser window get destroyed
Definition at line 68 of file classbrowserbuilderthread.h.
References AddAncestorsOf(), AddChildrenOf(), AddDescendantsOf(), AddMembersOf(), AddNodeIfNotThere(), AddNodes(), BuildTree(), CreateSpecialFolders(), Entry(), ExpandNamespaces(), ExpandSavedItems(), m_TerminationRequested, RemoveInvalidNodes(), SaveExpandedItems(), SaveSelectedItem(), SelectSavedItem(), TokenContainsChildrenOfKind(), and TokenMatchesFilter().
Referenced by ClassBrowser::~ClassBrowser().
|
private |
Definition at line 1175 of file classbrowserbuilderthread.cpp.
References _T, CBBT_SANITY_CHECK, wxTreeCtrl::GetChildrenCount(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetNextSibling(), wxTreeItemId::IsOk(), m_ExpandedVect, and TRACE.
Referenced by BuildTree(), and RequestTermination().
|
private |
Definition at line 1240 of file classbrowserbuilderthread.cpp.
References _T, CBBT_SANITY_CHECK, wxTreeCtrl::GetItemData(), wxTreeCtrl::GetItemParent(), wxTreeCtrl::GetRootItem(), wxTreeCtrl::GetSelection(), wxTreeItemId::IsOk(), m_CCTreeCtrlTop, m_SelectedPath, and TRACE.
Referenced by BuildTree(), and RequestTermination().
void ClassBrowserBuilderThread::SelectItem | ( | wxTreeItemId | item | ) |
Definition at line 378 of file classbrowserbuilderthread.cpp.
References _T, AddMembersOf(), bdfFile, CBBT_SANITY_CHECK, CC_LOCKER_TRACK_CBBT_MTX_LOCK, CC_LOCKER_TRACK_CBBT_MTX_UNLOCK, CCLogger::DebugLog(), BrowserOptions::displayFilter, F(), CCLogger::Get(), wxString::IsEmpty(), wxTreeItemId::IsOk(), m_ActiveFilename, m_BrowserOptions, m_CCTreeCtrlBottom, m_CCTreeCtrlTop, m_ClassBrowserBuilderThreadMutex, TRACE, and BrowserOptions::treeMembers.
Referenced by ClassBrowser::OnTreeSelChanged().
void ClassBrowserBuilderThread::SelectItemRequired | ( | ) |
Definition at line 403 of file classbrowserbuilderthread.cpp.
References wxTreeCtrl::EnsureVisible(), Manager::IsAppShuttingDown(), wxTreeItemId::IsOk(), m_CCTreeCtrlTop, m_SelectItemRequired, and wxTreeCtrl::SelectItem().
Referenced by ClassBrowser::OnThreadEvent().
|
private |
Definition at line 1259 of file classbrowserbuilderthread.cpp.
References _T, CBBT_SANITY_CHECK, wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetNextSibling(), wxTreeCtrl::GetRootItem(), wxTreeItemId::IsOk(), m_CCTreeCtrlTop, m_idThreadEvent, m_Parent, m_SelectedPath, m_SelectItemRequired, CCTreeCtrlData::m_SpecialFolder, CCTreeCtrlData::m_TokenKind, CCTreeCtrlData::m_TokenName, selectItemRequired, TRACE, and wxEVT_COMMAND_ENTER.
Referenced by BuildTree(), and RequestTermination().
|
private |
Definition at line 1148 of file classbrowserbuilderthread.cpp.
References _T, TokenTree::at(), CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, Token::GetTree(), Token::m_Children, Token::m_TokenKind, s_TokenTreeMutex, and TRACE.
Referenced by AddNodes(), and RequestTermination().
|
private |
if the token should be shown in the tree, it will return true
The view option of the symbol browser determines which tokens should be shown in the tree Called from RemoveInvalidNodes(), AddNodes(), CreateSpecialFolder()
Definition at line 1104 of file classbrowserbuilderthread.cpp.
References _T, TokenTree::at(), bdfEverything, bdfFile, bdfProject, bdfWorkspace, CC_LOCKER_TRACK_TT_MTX_LOCK, CC_LOCKER_TRACK_TT_MTX_UNLOCK, BrowserOptions::displayFilter, m_BrowserOptions, Token::m_Children, m_CurrentTokenSet, Token::m_Index, Token::m_IsLocal, Token::m_IsTemp, m_TokenTree, m_UserData, Token::m_UserData, s_TokenTreeMutex, and TRACE.
Referenced by AddNodes(), CreateSpecialFolders(), RemoveInvalidNodes(), and RequestTermination().
|
protected |
Definition at line 149 of file classbrowserbuilderthread.h.
Referenced by ExpandItem(), Init(), and SelectItem().
|
protected |
Definition at line 151 of file classbrowserbuilderthread.h.
Referenced by AddChildrenOf(), AddDescendantsOf(), AddMembersOf(), AddNodes(), BuildTree(), CreateSpecialFolders(), ExpandItem(), ExpandNamespaces(), Init(), SelectItem(), and TokenMatchesFilter().
|
protected |
pointer to the bottom wxTreeCtrl
Definition at line 147 of file classbrowserbuilderthread.h.
Referenced by AddMembersOf(), BuildTree(), Entry(), Init(), RemoveInvalidNodes(), and SelectItem().
|
protected |
pointer to the top wxTreeCtrl
Definition at line 145 of file classbrowserbuilderthread.h.
Referenced by AddMembersOf(), AddNodes(), BuildTree(), CollapseItem(), CreateSpecialFolders(), Entry(), ExpandItem(), ExpandNamespaces(), Init(), RemoveInvalidNodes(), SaveSelectedItem(), SelectItem(), SelectItemRequired(), and SelectSavedItem().
|
protected |
Some member functions of ClassBrowserBuilderThread such as ExpandItem() can either be called from the main GUI thread(in ClassBrowser::OnTreeItemExpanding(wxTreeEvent& event)), or be called in the worker thread(in BuildTree() which is called in ClassBrowserBuilderThread::Entry()), to protect the member variables of the class(especially the wxTreeCtrl, we use the Mutex so that only one thread can access to those member variables.
Definition at line 141 of file classbrowserbuilderthread.h.
Referenced by CollapseItem(), ExpandItem(), Init(), and SelectItem().
|
protected |
Definition at line 133 of file classbrowserbuilderthread.h.
Referenced by Entry().
|
protected |
A file set which contains a header file and the associated implementation file.
If the view option "Current file's symbols" is selected, the symbol tree will show tokens from those files, e.g. if the a.cpp shown in the current active editor, then m_CurrentFileSet maybe contains two files: a.cpp and a.h
Definition at line 161 of file classbrowserbuilderthread.h.
Referenced by Init().
|
protected |
Special global scope tokens belong to the m_CurrentFileSet file set.
Definition at line 167 of file classbrowserbuilderthread.h.
Referenced by AddChildrenOf(), and Init().
|
protected |
Tokens belong to the m_CurrentFileSet file set.
Definition at line 164 of file classbrowserbuilderthread.h.
Referenced by Init(), and TokenMatchesFilter().
|
private |
Definition at line 170 of file classbrowserbuilderthread.h.
Referenced by BuildTree(), ExpandSavedItems(), and SaveExpandedItems().
|
private |
Definition at line 176 of file classbrowserbuilderthread.h.
Referenced by BuildTree(), Init(), and SelectSavedItem().
|
private |
Definition at line 172 of file classbrowserbuilderthread.h.
Referenced by BuildTree(), CollapseItem(), and ExpandItem().
|
protected |
Definition at line 142 of file classbrowserbuilderthread.h.
Referenced by AddNodes(), BuildTree(), CreateSpecialFolders(), Entry(), ExpandItem(), and Init().
|
protected |
Definition at line 132 of file classbrowserbuilderthread.h.
Referenced by BuildTree(), and SelectSavedItem().
|
private |
Definition at line 171 of file classbrowserbuilderthread.h.
Referenced by SaveSelectedItem(), and SelectSavedItem().
|
private |
Definition at line 177 of file classbrowserbuilderthread.h.
Referenced by SelectItemRequired(), and SelectSavedItem().
|
private |
if this variable is true, the Entry() function should return
Definition at line 175 of file classbrowserbuilderthread.h.
Referenced by Entry(), and RequestTermination().
|
protected |
Definition at line 152 of file classbrowserbuilderthread.h.
Referenced by AddAncestorsOf(), AddChildrenOf(), AddDescendantsOf(), AddNodes(), ExpandItem(), Init(), RemoveInvalidNodes(), and TokenMatchesFilter().
|
protected |
Definition at line 150 of file classbrowserbuilderthread.h.
Referenced by Init(), and TokenMatchesFilter().