You can browse C++ class hierarchies from within Emacs by using Ebrowse.
|Description||C++ class browser|
|Author||name of author|
|Part of Emacs||yes|
When working in software projects using C++, I frequently missed software support for two things:
- When you get a new class library, or you have to work on source code you haven't written yourself (or written sufficiently long ago), you need a tool to let you navigate class hierarchies and investigate features of the software. Without such a tool you often end up greping through dozens or even hundreds of files.
- Once you are productive, it would be nice to have a tool that knows your sources and can help you while you are editing source code. Imagine to be able to jump to the definition of an identifier while you are editing, or something that can complete long identifier names because it knows what identifiers are defined in your program....
The design of Ebrowse reflects these two needs.
Process source files
Before you can start browsing a class hierarchy, you must run the parser ebrowse on your source files in order to generate a Lisp data base describing your program.
ebrowse $(find . -name "*.[hc]pp")
You start browsing a class hierarchy parsed by ebrowse by just finding the BROWSE file with C-x C-f.
An example of a tree buffer display is shown below.
| Collection | IndexedCollection | Array | FixedArray | Set | Dictionary
When you run Emacs on a display which supports colors and the mouse, you will notice that certain areas in the tree buffer are highlighted when you move the mouse over them. This highlight marks mouse-sensitive regions in the buffer. Please notice the help strings in the echo area when the mouse moves over a sensitive region.
A click with Mouse-3 on a mouse-sensitive region opens a context menu. In addition to this, each buffer also has a buffer-specific menu that is opened with a click with Mouse-3 somewhere in the buffer where no highlight is displayed.
See much more
Read the official documentation: https://www.gnu.org/software/emacs/manual/html_node/ebrowse/