|  | NumeRe v1.1.4
    NumeRe: Framework für Numerische Rechnungen | 
This class represents a dialog showing the dependencies of a selected procedure file. More...
#include <dependencydialog.hpp>
| Public Member Functions | |
| DependencyDialog (wxWindow *parent, wxWindowID id, const wxString &title, const std::string &mainfile, ProcedureLibrary &lib, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) | |
| Constructor. Creates the UI elements and calls the dependency walker.  More... | |
| DECLARE_EVENT_TABLE () | |
| Private Member Functions | |
| void | calculateDependencies (ProcedureLibrary &lib, const std::string &mainfile) | 
| This private member function calculates the dependencies of the current selected main file. It will fill the map with additional items calculated from the called procedures.  More... | |
| void | fillDependencyTree () | 
| This private member function fills the tree in the UI with the calculated dependencies. It will call the function DependencyDialog::insertChilds() recursively to fill the childs of a procedure call.  More... | |
| void | insertChilds (wxTreeItemId item, const std::string &sParentProcedure) | 
| This private member function is called recursively to fill the childs of a procedure call. The recursion is stopped at the end of a branch or if the branch itself is a recursion.  More... | |
| bool | findInParents (wxTreeItemId item, const std::string &sCurrProc) | 
| This private member function searches the procedure call in the parents of the current branch.  More... | |
| void | CollapseAll (wxTreeItemId item) | 
| This private member function will collapse the current item and all corresponding subitems.  More... | |
| std::vector< std::string > | parseNameSpace (std::string sNameSpace) const | 
| Convert a name space into a vector of single namespaces for easier comparison.  More... | |
| int | calculateClusterLevel (const std::vector< std::string > &sCurrentNameSpace, const std::vector< std::string > &sNewNameSpace) | 
| This private member function calculates the level of nested clusters needed to correctly visualize the nested namespaces.  More... | |
| void | CreateDotFile () | 
| This member function handles the creation of GraphViz DOT files.  More... | |
| void | OnItemActivate (wxTreeEvent &event) | 
| This private member function is the event handler for double clicking on an item in the dependency tree.  More... | |
| void | OnItemRightClick (wxTreeEvent &event) | 
| This private member function shows the popup menu on a right click on any tree item.  More... | |
| void | OnMenuEvent (wxCommandEvent &event) | 
| This private member function handles all menu events yielded by clicking on an item of the popup menu.  More... | |
| Private Attributes | |
| wxcode::wxTreeListCtrl * | m_dependencyTree | 
| wxTreeItemId | m_selectedItem | 
| std::string | m_mainProcedure | 
| std::map< std::string, DependencyList > | m_deps | 
This class represents a dialog showing the dependencies of a selected procedure file.
Definition at line 35 of file dependencydialog.hpp.
| DependencyDialog::DependencyDialog | ( | wxWindow * | parent, | 
| wxWindowID | id, | ||
| const wxString & | title, | ||
| const std::string & | mainfile, | ||
| ProcedureLibrary & | lib, | ||
| long | style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | ||
| ) | 
Constructor. Creates the UI elements and calls the dependency walker.
| parent | wxWindow* | 
| id | wxWindowID | 
| title | const wxString& | 
| mainfile | const string& | 
| lib | ProcedureLibrary& | 
| style | long | 
Definition at line 51 of file dependencydialog.cpp.
References _guilang, and Language::get().
| 
 | private | 
This private member function calculates the level of nested clusters needed to correctly visualize the nested namespaces.
| sCurrentNameSpace | const std::vector<std::string>& | 
| sNewNameSpace | const std::vector<std::string>& | 
Definition at line 310 of file dependencydialog.cpp.
Referenced by CreateDotFile().
| 
 | private | 
This private member function calculates the dependencies of the current selected main file. It will fill the map with additional items calculated from the called procedures.
| lib | ProcedureLibrary& | 
| mainfile | const string& | 
Definition at line 83 of file dependencydialog.cpp.
References ProcedureElement::getDependencies(), Dependencies::getDependencyMap(), Dependencies::getMainProcedure(), ProcedureLibrary::getProcedureContents(), m_deps, m_mainProcedure, and replacePathSeparator().
| 
 | private | 
This private member function will collapse the current item and all corresponding subitems.
| item | wxTreeItemId | 
Definition at line 256 of file dependencydialog.cpp.
References CollapseAll(), and m_dependencyTree.
Referenced by CollapseAll(), and OnMenuEvent().
| 
 | private | 
This member function handles the creation of GraphViz DOT files.
Definition at line 341 of file dependencydialog.cpp.
References _guilang, calculateClusterLevel(), Language::get(), m_deps, parseNameSpace(), and toString().
Referenced by OnMenuEvent().
| DependencyDialog::DECLARE_EVENT_TABLE | ( | ) | 
| 
 | private | 
This private member function fills the tree in the UI with the calculated dependencies. It will call the function DependencyDialog::insertChilds() recursively to fill the childs of a procedure call.
Definition at line 135 of file dependencydialog.cpp.
References insertChilds(), m_dependencyTree, m_deps, and m_mainProcedure.
| 
 | private | 
This private member function searches the procedure call in the parents of the current branch.
| item | wxTreeItemId | 
| sCurrProc | const string& | 
Definition at line 227 of file dependencydialog.cpp.
References m_dependencyTree.
Referenced by insertChilds().
| 
 | private | 
This private member function is called recursively to fill the childs of a procedure call. The recursion is stopped at the end of a branch or if the branch itself is a recursion.
| item | wxTreeItemId | 
| sParentProcedure | const string& | 
Definition at line 183 of file dependencydialog.cpp.
References findInParents(), insertChilds(), m_dependencyTree, and m_deps.
Referenced by fillDependencyTree(), and insertChilds().
| 
 | private | 
This private member function is the event handler for double clicking on an item in the dependency tree.
| event | wxTreeEvent& | 
Definition at line 478 of file dependencydialog.cpp.
References NumeReWindow::FindAndOpenProcedure(), and m_dependencyTree.
| 
 | private | 
This private member function shows the popup menu on a right click on any tree item.
| event | wxTreeEvent& | 
Definition at line 505 of file dependencydialog.cpp.
References _guilang, Language::get(), ID_DEPENDENCYDIALOG_EXPORTDOT, ID_DEPENDENCYDIALOG_FOLDALL, ID_DEPENDENCYDIALOG_FOLDITEM, ID_DEPENDENCYDIALOG_UNFOLDALL, ID_DEPENDENCYDIALOG_UNFOLDITEM, m_dependencyTree, and m_selectedItem.
| 
 | private | 
This private member function handles all menu events yielded by clicking on an item of the popup menu.
| event | wxCommandEvent& | 
Definition at line 531 of file dependencydialog.cpp.
References CollapseAll(), CreateDotFile(), ID_DEPENDENCYDIALOG_EXPORTDOT, ID_DEPENDENCYDIALOG_FOLDALL, ID_DEPENDENCYDIALOG_FOLDITEM, ID_DEPENDENCYDIALOG_UNFOLDALL, ID_DEPENDENCYDIALOG_UNFOLDITEM, m_dependencyTree, and m_selectedItem.
| 
 | private | 
Convert a name space into a vector of single namespaces for easier comparison.
| sNameSpace | std::string | 
Definition at line 279 of file dependencydialog.cpp.
Referenced by CreateDotFile().
| 
 | private | 
Definition at line 38 of file dependencydialog.hpp.
Referenced by CollapseAll(), fillDependencyTree(), findInParents(), insertChilds(), OnItemActivate(), OnItemRightClick(), and OnMenuEvent().
| 
 | private | 
Definition at line 41 of file dependencydialog.hpp.
Referenced by calculateDependencies(), CreateDotFile(), fillDependencyTree(), and insertChilds().
| 
 | private | 
Definition at line 40 of file dependencydialog.hpp.
Referenced by calculateDependencies(), and fillDependencyTree().
| 
 | private | 
Definition at line 39 of file dependencydialog.hpp.
Referenced by OnItemRightClick(), and OnMenuEvent().