1 \input texinfo @c -*-texinfo-*-
3 @comment %**start of header
4 @setfilename ../info/ebrowse
5 @settitle A Class Browser for C++
8 @comment %**end of header
13 * Ebrowse: (ebrowse). A C++ class browser for Emacs.
16 This file documents Ebrowse, a C++ class browser for GNU Emacs.
18 Copyright @copyright{} 2000 Free Software Foundation, Inc.
20 Permission is granted to copy, distribute and/or modify this document
21 under the terms of the GNU Free Documentation License, Version 1.1 or
22 any later version published by the Free Software Foundation; with no
23 Invariant Sections, with the Front-Cover texts being ``A GNU
24 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
25 license is included in the section entitled ``GNU Free Documentation
26 License'' in the Emacs manual.
28 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
29 this GNU Manual, like GNU software. Copies published by the Free
30 Software Foundation raise funds for GNU development.''
32 This document is part of a collection distributed under the GNU Free
33 Documentation License. If you want to distribute this document
34 separately from the collection, you can do so by adding a copy of the
35 license to the document, as described in section 6 of the license.
40 @title Ebrowse User's Manual
42 @subtitle Ebrowse/Emacs 21
46 @author Gerd Moellmann
49 @vskip 0pt plus 1filll
51 Copyright @copyright{} 2000 Free Software Foundation, Inc.
54 Permission is granted to copy, distribute and/or modify this document
55 under the terms of the GNU Free Documentation License, Version 1.1 or
56 any later version published by the Free Software Foundation; with no
57 Invariant Sections, with the Front-Cover texts being ``A GNU
58 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
59 license is included in the section entitled ``GNU Free Documentation
60 License'' in the Emacs manual.
62 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
63 this GNU Manual, like GNU software. Copies published by the Free
64 Software Foundation raise funds for GNU development.''
66 This document is part of a collection distributed under the GNU Free
67 Documentation License. If you want to distribute this document
68 separately from the collection, you can do so by adding a copy of the
69 license to the document, as described in section 6 of the license.
74 @node Top, Overview, (dir), (dir)
77 You can browse C++ class hierarchies from within Emacs by using
82 * Overview:: What is it and now does it work?
83 * Generating browser files:: How to process C++ source files
84 * Loading a Tree:: How to start browsing
85 * Tree Buffers:: Traversing class hierarchies
86 * Member Buffers:: Looking at member information
87 * Tags-like Functions:: Finding members from source files
88 * Concept Index:: An entry for each concept defined
94 @node Overview, Generating browser files, Top, Top
97 When working in software projects using C++, I frequently missed
98 software support for two things:
102 When you get a new class library, or you have to work on source code you
103 haven't written yourself (or written sufficiently long ago), you need a
104 tool to let you navigate class hierarchies and investigate
105 features of the software. Without such a tool you often end up
106 @command{grep}ing through dozens or even hundreds of files.
109 Once you are productive, it would be nice to have a tool that knows your
110 sources and can help you while you are editing source code. Imagine to
111 be able to jump to the definition of an identifier while you are
112 editing, or something that can complete long identifier names because it
113 knows what identifiers are defined in your program@dots{}.
116 The design of Ebrowse reflects these two needs.
120 @cindex parser for C++ sources
121 A fast parser written in C is used to process C++ source files.
122 The parser generates a data base containing information about classes,
123 members, global functions, defines, types etc.@: found in the sources.
125 The second part of Ebrowse is a Lisp program. This program reads
126 the data base generated by the parser. It displays its contents in
127 various forms and allows you to perform operations on it, or do
128 something with the help of the knowledge contained in the data base.
130 @cindex major modes, of Ebrowse buffers
131 @dfn{Navigational} use of Ebrowse is centered around two
132 types of buffers which define their own major modes:
135 @dfn{Tree buffers} are used to view class hierarchies in tree form.
136 They allow you to quickly find classes, find or view class declarations,
137 perform operations like query replace on sets of your source files, and
138 finally tree buffers are used to produce the second buffer form---member
139 buffers. @xref{Tree Buffers}.
141 @cindex member buffer
142 Members are displayed in @dfn{member buffers}. Ebrowse
143 distinguishes between six different types of members; each type is
144 displayed as a member list of its own:
148 Instance member variables;
151 Instance member functions;
154 Static member variables;
157 Static member functions;
160 Friends/Defines. The list of defines is contained in the friends
161 list of the pseudo-class @samp{*Globals*};
164 Types (@code{enum}s, and @code{typedef}s defined with class
168 You can switch member buffers from one list to another, or to another
169 class. You can include inherited members in the display, you can set
170 filters that remove categories of members from the display, and most
171 importantly you can find or view member declarations and definitions
172 with a keystroke. @xref{Member Buffers}.
174 These two buffer types and the commands they provide support the
175 navigational use of the browser. The second form resembles Emacs' Tags
176 package for C and other procedural languages. Ebrowse's commands of
177 this type are not confined to special buffers; they are most often used
178 while you are editing your source code.
180 To list just a subset of what you can use the Tags part of Ebrowse for:
184 Jump to the definition or declaration of an identifier in your source
185 code, with an electric position stack that lets you easily navigate
189 Complete identifiers in your source with a completion list containing
190 identifiers from your source code only.
193 Perform search and query replace operations over some or all of your
197 Show all identifiers matching a regular expression---and jump to one of
204 @node Generating browser files, Loading a Tree, Overview, Top
205 @comment node-name, next, previous, up
206 @chapter Processing Source Files
208 @cindex @command{ebrowse}, the program
209 @cindex class data base creation
210 Before you can start browsing a class hierarchy, you must run the parser
211 @command{ebrowse} on your source files in order to generate a Lisp data
212 base describing your program.
214 @cindex command line for @command{ebrowse}
215 The operation of @command{ebrowse} can be tailored with command line
216 options. Under normal circumstances it suffices to let the parser use
217 its default settings. If you want to do that, call it with a command
225 or, if your shell doesn't allow all the file names to be specified on
229 ebrowse --files=@var{file}
233 where @var{file} contains the names of the files to be parsed, one
237 When invoked with option @samp{--help}, @command{ebrowse} prints a list of
238 available command line options.@refill
241 * Input files:: Specifying which files to parse
242 * Output file:: Changing the output file name
243 * Structs and unions:: Omitting @code{struct}s and @code{union}s
244 * Matching:: Setting regular expression lengths
245 * Verbosity:: Getting feedback for lengthy operations
251 @comment name, next, prev, up
252 @node Input files, Output file, Generating browser files, Generating browser files
253 @section Specifying Input Files
256 @cindex input files, for @command{ebrowse}
258 Each file name on the command line tells @command{ebrowse} to parse
261 @cindex response files
263 @item --files=@var{file}
264 This command line switch specifies that @var{file} contains a list of
265 file names to parse. Each line in @var{file} must contain one file
266 name. More than one option of this kind is allowed. You might, for
267 instance, want to use one file for header files, and another for source
270 @cindex standard input, specifying input files
272 When @command{ebrowse} finds no file names on the command line, and no
273 @samp{--file} option is specified, it reads file names from standard
274 input. This is sometimes convenient when @command{ebrowse} is used as part
277 @findex --search-path
278 @item --search-path=@var{paths}
279 This option lets you specify search paths for your input files.
280 @var{paths} is a list of directory names, separated from each other by a
281 either a colon or a semicolon, depending on the operating system.
285 @cindex friend functions
286 It is generally a good idea to specify input files so that header files
287 are parsed before source files. This facilitates the parser's work of
288 properly identifying friend functions of a class.
292 @comment name, next, prev, up
293 @node Output file, Structs and unions, Input files, Generating browser files
294 @section Changing the Output File Name
297 @cindex output file name
298 @findex --output-file
299 @cindex @file{BROWSE} file
300 @item --output-file=@var{file}
301 This option instructs @command{ebrowse} to generate a Lisp data base with
302 name @var{file}. By default, the data base is named @file{BROWSE}, and
303 is written in the directory in which @command{ebrowse} is invoked.
305 If you regularly use data base names different from the default, you
306 might want to add this to your init file:
309 (add-to-list 'auto-mode-alist '(@var{NAME} . ebrowse-tree-mode))
313 where @var{NAME} is the Lisp data base name you are using.
316 @cindex appending output to class data base
318 By default, each run of @command{ebrowse} erases the old contents of the
319 output file when writing to it. You can instruct @command{ebrowse} to
320 append its output to an existing file produced by @command{ebrowse}
321 with this command line option.
327 @comment name, next, prev, up
328 @node Structs and unions, Matching, Output file, Generating browser files
329 @section Structs and Unions
334 @findex --no-structs-or-unions
335 @item --no-structs-or-unions
336 This switch suppresses all classes in the data base declared as
337 @code{struct} or @code{union} in the output.
339 This is mainly useful when you are converting an existing
340 C program to C++, and do not want to see the old C structs in a class
347 @comment name, next, prev, up
348 @node Matching, Verbosity, Structs and unions, Generating browser files
349 @section Regular Expressions
351 @cindex regular expressions, recording
352 The parser @command{ebrowse} normally writes regular expressions to its
353 output file that help the Lisp part of Ebrowse to find functions,
354 variables etc.@: in their source files.
356 You can instruct @command{ebrowse} to omit these regular expressions by
357 calling it with the command line switch @samp{--no-regexps}.
359 When you do this, the Lisp part of Ebrowse tries to guess, from member
360 or class names, suitable regular expressions to locate that class or
361 member in source files. This works fine in most cases, but the
362 automatic generation of regular expressions can be too weak if unusual
363 coding styles are used.
368 This option turns off regular expression recording.
370 @findex --min-regexp-length
371 @cindex minimum regexp length for recording
372 @item --min-regexp-length=@var{n}
373 The number @var{n} following this option specifies the minimum length of
374 the regular expressions recorded to match class and member declarations
375 and definitions. The default value is set at compilation time of
378 The smaller the minimum length, the higher the probability that
379 Ebrowse will find a wrong match. The larger the value, the
380 larger the output file and therefore the memory consumption once the
381 file is read from Emacs.
383 @findex --max-regexp-length
384 @cindex maximum regexp length for recording
385 @item --max-regexp-length=@var{n}
386 The number following this option specifies the maximum length of the
387 regular expressions used to match class and member declarations and
388 definitions. The default value is set at compilation time of
391 The larger the maximum length, the higher the probability that the
392 browser will find a correct match, but the larger the value the larger
393 the output file and therefore the memory consumption once the data is
394 read. As a second effect, the larger the regular expression, the higher
395 the probability that it will no longer match after editing the file.
401 @node Verbosity, , Matching, Generating browser files
402 @comment node-name, next, previous, up
403 @section Verbose Mode
404 @cindex verbose operation
409 When this option is specified on the command line, @command{ebrowse} prints
410 a period for each file parsed, and it displays a @samp{+} for each
411 class written to the output file.
413 @findex --very-verbose
415 This option makes @command{ebrowse} print out the names of the files and
416 the names of the classes seen.
422 @node Loading a Tree, Tree Buffers, Generating browser files, Top
423 @comment node-name, next, previous, up
424 @chapter Starting to Browse
428 You start browsing a class hierarchy parsed by @command{ebrowse} by just
429 finding the @file{BROWSE} file with @kbd{C-x C-f}.
431 An example of a tree buffer display is shown below.
442 @cindex mouse highlight in tree buffers
443 When you run Emacs on a display which supports colors and the mouse, you
444 will notice that certain areas in the tree buffer are highlighted
445 when you move the mouse over them. This highlight marks mouse-sensitive
446 regions in the buffer. Please notice the help strings in the echo area
447 when the mouse moves over a sensitive region.
450 A click with @kbd{Mouse-3} on a mouse-sensitive region opens a context
451 menu. In addition to this, each buffer also has a buffer-specific menu
452 that is opened with a click with @kbd{Mouse-3} somewhere in the buffer
453 where no highlight is displayed.
457 @comment ****************************************************************
459 @comment *** TREE BUFFERS
461 @comment ****************************************************************
463 @node Tree Buffers, Member Buffers, Loading a Tree, Top
464 @comment node-name, next, previous, up
465 @chapter Tree Buffers
466 @cindex tree buffer mode
469 Class trees are displayed in @dfn{tree buffers} which install their own
470 major mode. Most Emacs keys work in tree buffers in the usual way,
471 e.g.@: you can move around in the buffer with the usual @kbd{C-f},
472 @kbd{C-v} etc., or you can search with @kbd{C-s}.
474 Tree-specific commands are bound to simple keystrokes, similar to
475 @code{Gnus}. You can take a look at the key bindings by entering
476 @kbd{?} which calls @code{M-x describe-mode} in both tree and member
480 * Source Display:: Viewing and finding a class declaration
481 * Member Display:: Showing members, switching to member buffers
482 * Go to Class:: Finding a class
483 * Quitting:: Discarding and burying the tree buffer
484 * File Name Display:: Showing file names in the tree
485 * Expanding and Collapsing:: Expanding and collapsing branches
486 * Tree Indentation:: Changing the tree indentation
487 * Killing Classes:: Removing class from the tree
488 * Saving a Tree:: Saving a modified tree
489 * Statistics:: Displaying class tree statistics
490 * Marking Classes:: Marking and unmarking classes
495 @node Source Display, Member Display, Tree Buffers, Tree Buffers
496 @comment node-name, next, previous, up
497 @section Viewing and Finding Class Declarations
498 @cindex viewing, class
499 @cindex finding a class
500 @cindex class declaration
502 You can view or find a class declaration when the cursor is on a class
507 This command views the class declaration if the database
508 contains informations about it. If you don't parse the entire source
509 you are working on, some classes will only be known to exist but the
510 location of their declarations and definitions will not be known.@refill
513 Works like @kbd{SPC}, except that it finds the class
514 declaration rather than viewing it, so that it is ready for
518 The same functionality is available from the menu opened with
519 @kbd{Mouse-3} on the class name.
524 @node Member Display, Go to Class, Source Display, Tree Buffers
525 @comment node-name, next, previous, up
526 @section Displaying Members
527 @cindex @samp{*Members*} buffer
528 @cindex @samp{*Globals*}
529 @cindex freezing a member buffer
530 @cindex member lists, in tree buffers
532 Ebrowse distinguishes six different kinds of members, each of
533 which is displayed as a separate @dfn{member list}: instance variables,
534 instance functions, static variables, static functions, friend
535 functions, and types.
537 Each of these lists can be displayed in a member buffer with a command
538 starting with @kbd{L} when the cursor is on a class name. By default,
539 there is only one member buffer named @dfn{*Members*} that is reused
540 each time you display a member list---this has proven to be more
541 practical than to clutter up the buffer list with dozens of member
544 If you want to display more than one member list at a time you can
545 @dfn{freeze} its member buffer. Freezing a member buffer prevents it
546 from being overwritten the next time you display a member list. You can
547 toggle this buffer status at any time.
549 Every member list display command in the tree buffer can be used with a
550 prefix argument (@kbd{C-u}). Without a prefix argument, the command will
551 pop to a member buffer displaying the member list. With prefix argument,
552 the member buffer will additionally be @dfn{frozen}.
555 @cindex instance member variables, list
557 This command displays the list of instance member variables.
559 @cindex static variables, list
561 Display the list of static variables.
563 @cindex friend functions, list
565 Display the list of friend functions. This list is used for defines if
566 you are viewing the class @samp{*Globals*} which is a place holder for
569 @cindex member functions, list
571 Display the list of member functions.
573 @cindex static member functions, list
575 Display the list of static member functions.
579 Display a list of types.
582 These lists are also available from the class' context menu invoked with
583 @kbd{Mouse-3} on the class name.
588 @node Go to Class, Quitting, Member Display, Tree Buffers
589 @comment node-name, next, previous, up
590 @section Finding a Class
592 @cindex expanding branches
593 @cindex class location
596 @cindex search for class
598 This command reads a class name from the minibuffer with completion and
599 positions the cursor on the class in the class tree.
601 If the branch of the class tree containing the class searched for is
602 currently collapsed, the class itself and all its base classes are
603 recursively made visible. (See also @ref{Expanding and
606 This function is also available from the tree buffer's context menu.
609 Repeat the last search done with @kbd{/}. Each tree buffer has its own
610 local copy of the regular expression last searched in it.
616 @node Quitting, File Name Display, Go to Class, Tree Buffers
617 @comment node-name, next, previous, up
618 @section Burying a Tree Buffer
619 @cindex burying tree buffer
623 Is a synonym for @kbd{M-x bury-buffer}.
629 @node File Name Display, Expanding and Collapsing, Quitting, Tree Buffers
630 @comment node-name, next, previous, up
631 @section Displaying File Names
634 @cindex file names in tree buffers
636 This command toggles the display of file names in a tree buffer. If
637 file name display is switched on, the names of the files containing the
638 class declaration are shown to the right of the class names. If the
639 file is not known, the string @samp{unknown} is displayed.
641 This command is also provided in the tree buffer's context menu.
644 Display file names for the current line, or for the number of lines
645 given by a prefix argument.
648 Here is an example of a tree buffer with file names displayed.
651 | Collection (unknown)
652 | IndexedCollection (indexedcltn.h)
654 | FixedArray (fixedarray.h)
656 | Dictionary (dict.h)
662 @node Expanding and Collapsing, Tree Indentation, File Name Display, Tree Buffers
663 @comment node-name, next, previous, up
664 @section Expanding and Collapsing a Tree
665 @cindex expand tree branch
666 @cindex collapse tree branch
667 @cindex branches of class tree
668 @cindex class tree, collapse or expand
670 You can expand and collapse parts of a tree to reduce the complexity of
671 large class hierarchies. Expanding or collapsing branches of a tree has
672 no impact on the functionality of other commands, like @kbd{/}. (See
673 also @ref{Go to Class}.)@refill
675 Collapsed branches are indicated with an ellipsis following the class
676 name like in the example below.
680 | IndexedCollection...
687 This command collapses the branch of the tree starting at the class the
691 This command expands the branch of the tree starting at the class the
692 cursor is on. Both commands for collapsing and expanding branches are
693 also available from the class' object menu.
696 This command expands all collapsed branches in the tree.
702 @node Tree Indentation, Killing Classes, Expanding and Collapsing, Tree Buffers
703 @comment node-name, next, previous, up
704 @section Changing the Tree Indentation
705 @cindex tree indentation
706 @cindex indentation of the tree
710 This command reads a new indentation width from the minibuffer and
711 redisplays the tree buffer with the new indentation It is also
712 available from the tree buffer's context menu.
718 @node Killing Classes, Saving a Tree, Tree Indentation, Tree Buffers
719 @comment node-name, next, previous, up
720 @section Removing Classes from the Tree
721 @cindex killing classes
722 @cindex class, remove from tree
726 This command removes the class the cursor is on and all its derived
727 classes from the tree. The user is asked for confirmation before the
728 deletion is actually performed.
734 @node Saving a Tree, Statistics, Killing Classes, Tree Buffers
735 @comment node-name, next, previous, up
736 @comment node-name, next, previous, up
737 @section Saving a Tree
738 @cindex save tree to a file
739 @cindex tree, save to a file
740 @cindex class tree, save to a file
744 This command writes a class tree to the file from which it was read.
745 This is useful after classes have been deleted from a tree.
748 Writes the tree to a file whose name is read from the minibuffer.
754 @node Statistics, Marking Classes, Saving a Tree, Tree Buffers
755 @comment node-name, next, previous, up
756 @cindex statistics for a tree
757 @cindex tree statistics
758 @cindex class statistics
762 Display statistics for the tree, like number of classes in it, number of
763 member functions, etc. This command can also be found in the buffer's
770 @node Marking Classes, , Statistics, Tree Buffers
771 @comment node-name, next, previous, up
772 @cindex marking classes
773 @cindex operations on marked classes
775 Classes can be marked for operations similar to the standard Emacs
776 commands @kbd{M-x tags-search} and @kbd{M-x tags-query-replace} (see
777 also @xref{Tags-like Functions}.)@refill
782 Toggle the mark of the line point is in or for as many lines as given by
783 a prefix command. This command can also be found in the class' context
788 Unmark all classes. With prefix argument @kbd{C-u}, mark all classes in
789 the tree. Since this command operates on the whole buffer, it can also be
790 found in the buffer's object menu.
793 Marked classes are displayed with an @code{>} in column one of the tree
794 display, like in the following example
798 | IndexedCollection...
806 @c ****************************************************************
808 @c *** MEMBER BUFFERS
810 @c ****************************************************************
812 @node Member Buffers, Tags-like Functions, Tree Buffers, Top
813 @comment node-name, next, previous, up
814 @chapter Member Buffers
816 @cindex member buffer mode
818 @cindex class members, types
819 @cindex types of class members
820 @dfn{Member buffers} are used to operate on lists of members of a class.
821 Ebrowse distinguishes six kinds of lists:
825 Instance variables (normal member variables);
827 Instance functions (normal member functions);
831 Static member functions;
835 Types (@code{enum}s and @code{typedef}s defined with class scope.
836 Nested classes will be shown in the class tree like normal classes.
839 Like tree buffers, member buffers install their own major mode. Also
840 like in tree buffers, menus are provided for certain areas in the
841 buffer: members, classes, and the buffer itself.
844 * Switching Member Lists:: Choosing which members to display
845 * Finding/Viewing:: Modifying source code
846 * Inherited Members:: Display of Inherited Members
847 * Searching Members:: Finding members in member buffer
848 * Switching to Tree:: Going back to the tree buffer
849 * Filters:: Selective member display
850 * Attributes:: Display of @code{virtual} etc.
851 * Long and Short Display:: Comprehensive and verbose display
852 * Regexp Display:: Showing matching regular expressions
853 * Switching Classes:: Displaying another class
854 * Killing/Burying:: Getting rid of the member buffer
855 * Column Width:: Display style
856 * Redisplay:: Redrawing the member list
857 * Getting Help:: How to get help for key bindings
863 @node Switching Member Lists, Finding/Viewing, Member Buffers, Member Buffers
864 @comment node-name, next, previous, up
865 @section Switching Member Lists
866 @cindex member lists, in member buffers
867 @cindex static members
873 @cindex next member list
875 This command switches the member buffer display to the next member list.
877 @cindex previous member list
879 This command switches the member buffer display to the previous member
883 Switch to the list of member functions.
887 Switch to the list of static member functions.
890 Switch to the list of member variables.
893 Switch to the list of static member variables.
896 Switch to the list of friends or defines.
899 Switch to the list of types.
902 Both commands cycle through the member list.
904 Most of the commands are also available from the member buffer's
910 @node Finding/Viewing, Inherited Members, Switching Member Lists, Member Buffers
911 @comment node-name, next, previous, up
912 @section Finding and Viewing Member Source
913 @cindex finding members, in member buffers
914 @cindex viewing members, in member buffers
915 @cindex member definitions, in member buffers
916 @cindex member declarations, in member buffers
917 @cindex definition of a member, in member buffers
918 @cindex declaration of a member, in member buffers
922 This command finds the definition of the member the cursor is on.
923 Finding involves roughly the same as the standard Emacs tags facility
924 does---loading the file and searching for a regular expression matching
928 This command finds the declaration of the member the cursor is on.
931 This is the same command as @kbd{RET}, but views the member definition
932 instead of finding the member's source file.
935 This is the same command as @kbd{f}, but views the member's declaration
936 instead of finding the file the declaration is in.
939 You can install a hook function to perform actions after a member or
940 class declaration or definition has been found, or when it is not found.
942 All the commands described above can also be found in the context menu
943 displayed when clicking @kbd{Mouse-2} on a member name.
948 @node Inherited Members, Searching Members, Finding/Viewing, Member Buffers
949 @comment node-name, next, previous, up
950 @section Display of Inherited Members
951 @cindex superclasses, members
952 @cindex base classes, members
953 @cindex inherited members
957 This command toggles the display of inherited members in the member
958 buffer. This is also in the buffer's context menu.
964 @node Searching Members, Switching to Tree, Inherited Members, Member Buffers
965 @comment node-name, next, previous, up
966 @section Searching Members
967 @cindex searching members
971 Position the cursor on a member whose name is read from the minibuffer;
972 only members shown in the current member buffer appear in the completion
976 Like the above command, but all members for the current class appear in
977 the completion list. If necessary, the current member list is switched
978 to the one containing the member.
980 With a prefix argument (@kbd{C-u}), all members in the class tree,
981 i.e.@: all members the browser knows about appear in the completion
982 list. The member display will be switched to the class and member list
983 containing the member.
986 Repeat the last member search.
989 Look into the buffer's context menu for a convenient way to do this with
994 @node Switching to Tree, Filters, Searching Members, Member Buffers
995 @comment node-name, next, previous, up
996 @section Switching to Tree Buffer
997 @cindex tree buffer, switch to
998 @cindex buffer switching
999 @cindex switching buffers
1003 Pop up the tree buffer to which the member buffer belongs.
1006 Do the same as @kbd{TAB} but also position the cursor on the class
1007 displayed in the member buffer.
1013 @node Filters, Attributes, Switching to Tree, Member Buffers
1014 @comment node-name, next, previous, up
1019 @cindex @code{public} members
1021 This command toggles the display of @code{public} members. The
1022 @samp{a} stands for `access'.
1024 @cindex @code{protected} members
1026 This command toggles the display of @code{protected} members.
1028 @cindex @code{private} members
1030 This command toggles the display of @code{private} members.
1032 @cindex @code{virtual} members
1034 This command toggles the display of @code{virtual} members.
1036 @cindex @code{inline} members
1038 This command toggles the display of @code{inline} members.
1040 @cindex @code{const} members
1042 This command toggles the display of @code{const} members.
1044 @cindex pure virtual members
1046 This command toggles the display of pure virtual members.
1048 @cindex remove filters
1050 This command removes all filters.
1053 These commands are also found in the buffer's context menu.
1058 @node Attributes, Long and Short Display, Filters, Member Buffers
1059 @comment node-name, next, previous, up
1060 @section Displaying Member Attributes
1062 @cindex member attribute display
1066 Toggle the display of member attributes (default is on).
1068 The nine member attributes Ebrowse knows about are displayed
1069 as a list a single-characters flags enclosed in angle brackets in front
1070 the of the member's name. A @samp{-} at a given position means that
1071 the attribute is false. The list of attributes from left to right is
1074 @cindex @code{template} attribute
1076 The member is a template.
1078 @cindex @code{extern "C"} attribute
1080 The member is declared @code{extern "C"}.
1082 @cindex @code{virtual} attribute
1084 Means the member is declared @code{virtual}.
1086 @cindex @code{inline}
1088 The member is declared @code{inline}.
1090 @cindex @code{const} attribute
1092 The member is @code{const}.
1094 @cindex pure virtual function attribute
1096 The member is a pure virtual function.
1098 @cindex @code{mutable} attribute
1100 The member is declared @code{mutable}.
1102 @cindex @code{explicit} attribute
1104 The member is declared @code{explicit}.
1107 The member is a function with a throw list.
1111 This command is also in the buffer's context menu.
1115 @node Long and Short Display, Regexp Display, Attributes, Member Buffers
1116 @comment node-name, next, previous, up
1117 @section Long and Short Member Display
1118 @cindex display form
1119 @cindex long display
1120 @cindex short display
1124 This command toggles the member buffer between short and long display
1125 form. The short display form displays member names, only:
1128 | isEmpty contains hasMember create
1129 | storeSize hash isEqual restoreGuts
1133 The long display shows one member per line with member name and regular
1134 expressions matching the member (if known):
1137 | isEmpty Bool isEmpty () const...
1138 | hash unsigned hash () const...
1139 | isEqual int isEqual (...
1142 Regular expressions will only be displayed when the Lisp database has
1143 not been produced with the @command{ebrowse} option @samp{--no-regexps}.
1144 @xref{Matching, --no-regexps, Regular Expressions}.
1150 @node Regexp Display, Switching Classes, Long and Short Display, Member Buffers
1151 @comment node-name, next, previous, up
1152 @section Display of Regular Expressions
1153 @cindex regular expression display
1157 This command toggles the long display form from displaying the regular
1158 expressions matching the member declarations to those expressions
1159 matching member definitions.
1162 Regular expressions will only be displayed when the Lisp database has
1163 not been produced with the @command{ebrowse} option @samp{--no-regexps},
1164 see @ref{Matching, --no-regexps, Regular Expressions}.
1169 @node Switching Classes, Killing/Burying, Regexp Display, Member Buffers
1170 @comment node-name, next, previous, up
1171 @section Displaying Another Class
1172 @cindex base class, display
1173 @cindex derived class, display
1174 @cindex superclass, display
1175 @cindex subclass, display
1176 @cindex class display
1180 This command lets you switch the member buffer to another class. It
1181 reads the name of the new class from the minibuffer with completion.
1184 This is the same command as @kbd{C c} but restricts the classes shown in
1185 the completion list to immediate base classes, only. If only one base
1186 class exists, this one is immediately shown in the minibuffer.
1189 Same as @kbd{C b}, but for derived classes.
1192 Switch to the previous class in the class hierarchy on the same level as
1193 the class currently displayed.
1196 Switch to the next sibling of the class in the class tree.
1202 @node Killing/Burying, Column Width, Switching Classes, Member Buffers
1203 @comment node-name, next, previous, up
1204 @section Burying a Member Buffer
1205 @cindex burying member buffers
1209 This command is a synonym for @kbd{M-x bury-buffer}.
1215 @node Column Width, Redisplay, Killing/Burying, Member Buffers
1216 @comment node-name, next, previous, up
1217 @section Setting the Column Width
1218 @cindex column width
1219 @cindex member indentation
1220 @cindex indentation, member
1224 This command sets the column width depending on the display form used
1225 (long or short display).
1231 @node Redisplay, Getting Help, Column Width, Member Buffers
1232 @comment node-name, next, previous, up
1233 @section Forced Redisplay
1234 @cindex redisplay of member buffers
1238 This command forces a redisplay of the member buffer. If the width
1239 of the window displaying the member buffer is changed this command
1240 redraws the member list with the appropriate column widths and number of
1247 @node Getting Help, , Redisplay, Member Buffers
1248 @comment node-name, next, previous, up
1253 This key is bound to @code{describe-mode}.
1259 @comment **************************************************************
1260 @comment *** TAGS LIKE FUNCTIONS
1261 @comment **************************************************************
1263 @node Tags-like Functions, Concept Index, Member Buffers, Top
1264 @comment node-name, next, previous, up
1265 @chapter Tags-like Functions
1267 Ebrowse provides tags functions similar to those of the standard
1268 Emacs Tags facility, but better suited to the needs of C++ programmers.
1271 * Finding and Viewing:: Going to a member declaration/definition
1272 * Position Stack:: Moving to previous locations
1273 * Search & Replace:: Searching and replacing over class tree files
1274 * Members in Files:: Listing all members in a given file
1275 * Apropos:: Listing members matching a regular expression
1276 * Symbol Completion:: Completing names while editing
1277 * Member Buffer Display:: Quickly display a member buffer for some
1283 @node Finding and Viewing, Position Stack, Tags-like Functions, Tags-like Functions
1284 @comment node-name, next, previous, up
1285 @section Finding and Viewing Members
1286 @cindex finding class member, in C++ source
1287 @cindex viewing class member, in C++ source
1289 @cindex member definition, finding, in C++ source
1290 @cindex member declaration, finding, in C++ source
1292 The functions in this section are similar to those described in
1293 @ref{Source Display}, and also in @ref{Finding/Viewing}, except that
1294 they work in a C++ source buffer, not in member and tree buffers created
1299 Find the definition of the member around point. If you invoke this
1300 function with a prefix argument, the declaration is searched.
1302 If more than one class contains a member with the given name you can
1303 select the class with completion. If there is a scope declaration in
1304 front of the member name, this class name is used as initial input for
1308 Find the declaration of the member around point.
1311 View the definition of the member around point.
1314 View the declaration of the member around point.
1317 Find a member's definition in another window.
1320 Find a member's declaration in another window.
1323 View a member's definition in another window.
1326 View a member's declaration in another window.
1329 Find a member's definition in another frame.
1332 Find a member's declaration in another frame.
1335 View a member's definition in another frame.
1338 View a member's declaration in another frame.
1343 @node Position Stack, Search & Replace, Finding and Viewing, Tags-like Functions
1344 @comment node-name, next, previous, up
1345 @section The Position Stack
1346 @cindex position stack
1348 When jumping to a member declaration or definition with one of
1349 Ebrowse's commands, the position from where you performed the
1350 jump and the position where you jumped to are recorded in a
1351 @dfn{position stack}. There are several ways in which you can quickly
1352 move to positions in the stack:@refill
1355 @cindex return to original position
1357 This command sets point to the previous position in the position stack.
1358 Directly after you performed a jump, this will put you back to the
1359 position where you came from.
1361 The stack is not popped, i.e.@: you can always switch back and forth
1362 between positions in the stack. To avoid letting the stack grow to
1363 infinite size there is a maximum number of positions defined. When this
1364 number is reached, older positions are discarded when new positions are
1365 pushed on the stack.
1368 This command moves forward in the position stack, setting point to
1369 the next position stored in the position stack.
1372 Displays an electric buffer showing all positions saved in the stack.
1373 You can select a position by pressing @kbd{SPC} in a line. You can
1374 view a position with @kbd{v}.
1380 @node Search & Replace, Members in Files, Position Stack, Tags-like Functions
1381 @comment node-name, next, previous, up
1382 @section Searching and Replacing
1383 @cindex searching multiple C++ files
1384 @cindex replacing in multiple C++ files
1385 @cindex restart tags-operation
1387 Ebrowse allows you to perform operations on all or a subset of the files
1388 mentioned in a class tree. When you invoke one of the following
1389 functions and more than one class tree is loaded, you must choose a
1390 class tree to use from an electric tree menu. If the selected tree
1391 contains marked classes, the following commands operate on the files
1392 mentioned in the marked classes only. Otherwise all files in the class
1397 This function performs a regular expression search in the chosen set of
1401 This command performs a search for calls of a given member which is
1402 selected in the usual way with completion.
1405 Perform a query replace over the set of files.
1408 All three operations above stop when finding a match. You can restart
1409 the operation with this command.
1412 This restarts the last tags operation with the next file in the list.
1418 @node Members in Files, Apropos, Search & Replace, Tags-like Functions
1419 @comment node-name, next, previous, up
1420 @section Members in Files
1422 @cindex members in file, listing
1423 @cindex list class members in a file
1424 @cindex file, members
1426 The command @kbd{C-c b l}, lists all members in a given file. The file
1427 name is read from the minibuffer with completion.
1432 @node Apropos, Symbol Completion, Members in Files, Tags-like Functions
1433 @comment node-name, next, previous, up
1434 @section Member Apropos
1435 @cindex apropos on class members
1436 @cindex members, matching regexp
1438 The command @kbd{C-c b a} can be used to display all members matching a
1439 given regular expression. This command can be very useful if you
1440 remember only part of a member name, and not its beginning.
1442 A special buffer is popped up containing all identifiers matching the
1443 regular expression, and what kind of symbol it is (e.g.@: a member
1444 function, or a type). You can then switch to this buffer, and use the
1445 command @kbd{C-c b f}, for example, to jump to a specific member.
1450 @node Symbol Completion, Member Buffer Display, Apropos, Tags-like Functions
1451 @comment node-name, next, previous, up
1452 @section Symbol Completion
1454 @cindex symbol completion
1456 The command @kbd{C-c b TAB} completes the symbol in front of point.
1461 @node Member Buffer Display, , Symbol Completion, Tags-like Functions
1462 @section Quick Member Display
1463 @cindex member buffer, for member at point
1465 You can quickly display a member buffer containing the member the cursor
1466 in on with the command @kbd{C-c b m}.
1469 @node Concept Index, , Tags-like Functions, Top
1470 @unnumbered Concept Index