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
11 This file documents Ebrowse, a C++ class browser for GNU Emacs.
13 Copyright @copyright{} 2000--2013 Free Software Foundation, Inc.
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.3 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
20 and with the Back-Cover Texts as in (a) below. A copy of the license
21 is included in the section entitled ``GNU Free Documentation License''.
23 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
24 modify this GNU manual.''
28 @dircategory Emacs misc features
30 * Ebrowse: (ebrowse). A C++ class browser for Emacs.
34 @title Ebrowse User's Manual
36 @subtitle Ebrowse/Emacs
38 @author Gerd Moellmann
40 @vskip 0pt plus 1filll
47 @node Top, Overview, (dir), (dir)
50 You can browse C++ class hierarchies from within Emacs by using
57 * Overview:: What is it and how does it work?
58 * Generating browser files:: How to process C++ source files
59 * Loading a Tree:: How to start browsing
60 * Tree Buffers:: Traversing class hierarchies
61 * Member Buffers:: Looking at member information
62 * Tags-like Functions:: Finding members from source files
63 * GNU Free Documentation License:: The license for this documentation.
64 * Concept Index:: An entry for each concept defined
70 @node Overview, Generating browser files, Top, Top
73 When working in software projects using C++, I frequently missed
74 software support for two things:
78 When you get a new class library, or you have to work on source code you
79 haven't written yourself (or written sufficiently long ago), you need a
80 tool to let you navigate class hierarchies and investigate
81 features of the software. Without such a tool you often end up
82 @command{grep}ing through dozens or even hundreds of files.
85 Once you are productive, it would be nice to have a tool that knows your
86 sources and can help you while you are editing source code. Imagine to
87 be able to jump to the definition of an identifier while you are
88 editing, or something that can complete long identifier names because it
89 knows what identifiers are defined in your program@dots{}.
92 The design of Ebrowse reflects these two needs.
96 @cindex parser for C++ sources
97 A fast parser written in C is used to process C++ source files.
98 The parser generates a data base containing information about classes,
99 members, global functions, defines, types etc.@: found in the sources.
101 The second part of Ebrowse is a Lisp program. This program reads
102 the data base generated by the parser. It displays its contents in
103 various forms and allows you to perform operations on it, or do
104 something with the help of the knowledge contained in the data base.
106 @cindex major modes, of Ebrowse buffers
107 @dfn{Navigational} use of Ebrowse is centered around two
108 types of buffers which define their own major modes:
111 @dfn{Tree buffers} are used to view class hierarchies in tree form.
112 They allow you to quickly find classes, find or view class declarations,
113 perform operations like query replace on sets of your source files, and
114 finally tree buffers are used to produce the second buffer form---member
115 buffers. @xref{Tree Buffers}.
117 @cindex member buffer
118 Members are displayed in @dfn{member buffers}. Ebrowse
119 distinguishes between six different types of members; each type is
120 displayed as a member list of its own:
124 Instance member variables;
127 Instance member functions;
130 Static member variables;
133 Static member functions;
136 Friends/Defines. The list of defines is contained in the friends
137 list of the pseudo-class @samp{*Globals*};
140 Types (@code{enum}s, and @code{typedef}s defined with class
144 You can switch member buffers from one list to another, or to another
145 class. You can include inherited members in the display, you can set
146 filters that remove categories of members from the display, and most
147 importantly you can find or view member declarations and definitions
148 with a keystroke. @xref{Member Buffers}.
150 These two buffer types and the commands they provide support the
151 navigational use of the browser. The second form resembles Emacs's Tags
152 package for C and other procedural languages. Ebrowse's commands of
153 this type are not confined to special buffers; they are most often used
154 while you are editing your source code.
156 To list just a subset of what you can use the Tags part of Ebrowse for:
160 Jump to the definition or declaration of an identifier in your source
161 code, with an electric position stack that lets you easily navigate
165 Complete identifiers in your source with a completion list containing
166 identifiers from your source code only.
169 Perform search and query replace operations over some or all of your
173 Show all identifiers matching a regular expression---and jump to one of
180 @node Generating browser files, Loading a Tree, Overview, Top
181 @comment node-name, next, previous, up
182 @chapter Processing Source Files
184 @cindex @command{ebrowse}, the program
185 @cindex class data base creation
186 Before you can start browsing a class hierarchy, you must run the parser
187 @command{ebrowse} on your source files in order to generate a Lisp data
188 base describing your program.
190 @cindex command line for @command{ebrowse}
191 The operation of @command{ebrowse} can be tailored with command line
192 options. Under normal circumstances it suffices to let the parser use
193 its default settings. If you want to do that, call it with a command
201 or, if your shell doesn't allow all the file names to be specified on
205 ebrowse --files=@var{file}
209 where @var{file} contains the names of the files to be parsed, one
213 When invoked with option @samp{--help}, @command{ebrowse} prints a list of
214 available command line options.@refill
217 * Input files:: Specifying which files to parse
218 * Output file:: Changing the output file name
219 * Structs and unions:: Omitting @code{struct}s and @code{union}s
220 * Matching:: Setting regular expression lengths
221 * Verbosity:: Getting feedback for lengthy operations
227 @comment name, next, prev, up
228 @node Input files, Output file, Generating browser files, Generating browser files
229 @section Specifying Input Files
232 @cindex input files, for @command{ebrowse}
234 Each file name on the command line tells @command{ebrowse} to parse
237 @cindex response files
239 @item --files=@var{file}
240 This command line switch specifies that @var{file} contains a list of
241 file names to parse. Each line in @var{file} must contain one file
242 name. More than one option of this kind is allowed. You might, for
243 instance, want to use one file for header files, and another for source
246 @cindex standard input, specifying input files
248 When @command{ebrowse} finds no file names on the command line, and no
249 @samp{--file} option is specified, it reads file names from standard
250 input. This is sometimes convenient when @command{ebrowse} is used as part
253 @findex --search-path
254 @item --search-path=@var{paths}
255 This option lets you specify search paths for your input files.
256 @var{paths} is a list of directory names, separated from each other by a
257 either a colon or a semicolon, depending on the operating system.
261 @cindex friend functions
262 It is generally a good idea to specify input files so that header files
263 are parsed before source files. This facilitates the parser's work of
264 properly identifying friend functions of a class.
268 @comment name, next, prev, up
269 @node Output file, Structs and unions, Input files, Generating browser files
270 @section Changing the Output File Name
273 @cindex output file name
274 @findex --output-file
275 @cindex @file{BROWSE} file
276 @item --output-file=@var{file}
277 This option instructs @command{ebrowse} to generate a Lisp data base with
278 name @var{file}. By default, the data base is named @file{BROWSE}, and
279 is written in the directory in which @command{ebrowse} is invoked.
281 If you regularly use data base names different from the default, you
282 might want to add this to your init file:
285 (add-to-list 'auto-mode-alist '(@var{NAME} . ebrowse-tree-mode))
289 where @var{NAME} is the Lisp data base name you are using.
292 @cindex appending output to class data base
294 By default, each run of @command{ebrowse} erases the old contents of the
295 output file when writing to it. You can instruct @command{ebrowse} to
296 append its output to an existing file produced by @command{ebrowse}
297 with this command line option.
303 @comment name, next, prev, up
304 @node Structs and unions, Matching, Output file, Generating browser files
305 @section Structs and Unions
310 @findex --no-structs-or-unions
311 @item --no-structs-or-unions
312 This switch suppresses all classes in the data base declared as
313 @code{struct} or @code{union} in the output.
315 This is mainly useful when you are converting an existing
316 C program to C++, and do not want to see the old C structs in a class
323 @comment name, next, prev, up
324 @node Matching, Verbosity, Structs and unions, Generating browser files
325 @section Regular Expressions
327 @cindex regular expressions, recording
328 The parser @command{ebrowse} normally writes regular expressions to its
329 output file that help the Lisp part of Ebrowse to find functions,
330 variables etc.@: in their source files.
332 You can instruct @command{ebrowse} to omit these regular expressions by
333 calling it with the command line switch @samp{--no-regexps}.
335 When you do this, the Lisp part of Ebrowse tries to guess, from member
336 or class names, suitable regular expressions to locate that class or
337 member in source files. This works fine in most cases, but the
338 automatic generation of regular expressions can be too weak if unusual
339 coding styles are used.
344 This option turns off regular expression recording.
346 @findex --min-regexp-length
347 @cindex minimum regexp length for recording
348 @item --min-regexp-length=@var{n}
349 The number @var{n} following this option specifies the minimum length of
350 the regular expressions recorded to match class and member declarations
351 and definitions. The default value is set at compilation time of
354 The smaller the minimum length, the higher the probability that
355 Ebrowse will find a wrong match. The larger the value, the
356 larger the output file and therefore the memory consumption once the
357 file is read from Emacs.
359 @findex --max-regexp-length
360 @cindex maximum regexp length for recording
361 @item --max-regexp-length=@var{n}
362 The number following this option specifies the maximum length of the
363 regular expressions used to match class and member declarations and
364 definitions. The default value is set at compilation time of
367 The larger the maximum length, the higher the probability that the
368 browser will find a correct match, but the larger the value the larger
369 the output file and therefore the memory consumption once the data is
370 read. As a second effect, the larger the regular expression, the higher
371 the probability that it will no longer match after editing the file.
377 @node Verbosity, , Matching, Generating browser files
378 @comment node-name, next, previous, up
379 @section Verbose Mode
380 @cindex verbose operation
385 When this option is specified on the command line, @command{ebrowse} prints
386 a period for each file parsed, and it displays a @samp{+} for each
387 class written to the output file.
389 @findex --very-verbose
391 This option makes @command{ebrowse} print out the names of the files and
392 the names of the classes seen.
398 @node Loading a Tree, Tree Buffers, Generating browser files, Top
399 @comment node-name, next, previous, up
400 @chapter Starting to Browse
404 You start browsing a class hierarchy parsed by @command{ebrowse} by just
405 finding the @file{BROWSE} file with @kbd{C-x C-f}.
407 An example of a tree buffer display is shown below.
418 @cindex mouse highlight in tree buffers
419 When you run Emacs on a display which supports colors and the mouse, you
420 will notice that certain areas in the tree buffer are highlighted
421 when you move the mouse over them. This highlight marks mouse-sensitive
422 regions in the buffer. Please notice the help strings in the echo area
423 when the mouse moves over a sensitive region.
426 A click with @kbd{Mouse-3} on a mouse-sensitive region opens a context
427 menu. In addition to this, each buffer also has a buffer-specific menu
428 that is opened with a click with @kbd{Mouse-3} somewhere in the buffer
429 where no highlight is displayed.
433 @comment ****************************************************************
435 @comment *** TREE BUFFERS
437 @comment ****************************************************************
439 @node Tree Buffers, Member Buffers, Loading a Tree, Top
440 @comment node-name, next, previous, up
441 @chapter Tree Buffers
442 @cindex tree buffer mode
445 Class trees are displayed in @dfn{tree buffers} which install their own
446 major mode. Most Emacs keys work in tree buffers in the usual way,
447 e.g., you can move around in the buffer with the usual @kbd{C-f},
448 @kbd{C-v} etc., or you can search with @kbd{C-s}.
450 Tree-specific commands are bound to simple keystrokes, similar to
451 @code{Gnus}. You can take a look at the key bindings by entering
452 @kbd{?} which calls @code{M-x describe-mode} in both tree and member
456 * Source Display:: Viewing and finding a class declaration
457 * Member Display:: Showing members, switching to member buffers
458 * Go to Class:: Finding a class
459 * Quitting:: Discarding and burying the tree buffer
460 * File Name Display:: Showing file names in the tree
461 * Expanding and Collapsing:: Expanding and collapsing branches
462 * Tree Indentation:: Changing the tree indentation
463 * Killing Classes:: Removing class from the tree
464 * Saving a Tree:: Saving a modified tree
465 * Statistics:: Displaying class tree statistics
466 * Marking Classes:: Marking and unmarking classes
471 @node Source Display, Member Display, Tree Buffers, Tree Buffers
472 @comment node-name, next, previous, up
473 @section Viewing and Finding Class Declarations
474 @cindex viewing, class
475 @cindex finding a class
476 @cindex class declaration
478 You can view or find a class declaration when the cursor is on a class
483 This command views the class declaration if the database
484 contains information about it. If you don't parse the entire source
485 you are working on, some classes will only be known to exist but the
486 location of their declarations and definitions will not be known.@refill
489 Works like @kbd{SPC}, except that it finds the class
490 declaration rather than viewing it, so that it is ready for
494 The same functionality is available from the menu opened with
495 @kbd{Mouse-3} on the class name.
500 @node Member Display, Go to Class, Source Display, Tree Buffers
501 @comment node-name, next, previous, up
502 @section Displaying Members
503 @cindex @samp{*Members*} buffer
504 @cindex @samp{*Globals*}
505 @cindex freezing a member buffer
506 @cindex member lists, in tree buffers
508 Ebrowse distinguishes six different kinds of members, each of
509 which is displayed as a separate @dfn{member list}: instance variables,
510 instance functions, static variables, static functions, friend
511 functions, and types.
513 Each of these lists can be displayed in a member buffer with a command
514 starting with @kbd{L} when the cursor is on a class name. By default,
515 there is only one member buffer named @dfn{*Members*} that is reused
516 each time you display a member list---this has proven to be more
517 practical than to clutter up the buffer list with dozens of member
520 If you want to display more than one member list at a time you can
521 @dfn{freeze} its member buffer. Freezing a member buffer prevents it
522 from being overwritten the next time you display a member list. You can
523 toggle this buffer status at any time.
525 Every member list display command in the tree buffer can be used with a
526 prefix argument (@kbd{C-u}). Without a prefix argument, the command will
527 pop to a member buffer displaying the member list. With prefix argument,
528 the member buffer will additionally be @dfn{frozen}.
531 @cindex instance member variables, list
533 This command displays the list of instance member variables.
535 @cindex static variables, list
537 Display the list of static variables.
539 @cindex friend functions, list
541 Display the list of friend functions. This list is used for defines if
542 you are viewing the class @samp{*Globals*} which is a place holder for
545 @cindex member functions, list
547 Display the list of member functions.
549 @cindex static member functions, list
551 Display the list of static member functions.
555 Display a list of types.
558 These lists are also available from the class' context menu invoked with
559 @kbd{Mouse-3} on the class name.
564 @node Go to Class, Quitting, Member Display, Tree Buffers
565 @comment node-name, next, previous, up
566 @section Finding a Class
568 @cindex expanding branches
569 @cindex class location
572 @cindex search for class
574 This command reads a class name from the minibuffer with completion and
575 positions the cursor on the class in the class tree.
577 If the branch of the class tree containing the class searched for is
578 currently collapsed, the class itself and all its base classes are
579 recursively made visible. (See also @ref{Expanding and
582 This function is also available from the tree buffer's context menu.
585 Repeat the last search done with @kbd{/}. Each tree buffer has its own
586 local copy of the regular expression last searched in it.
592 @node Quitting, File Name Display, Go to Class, Tree Buffers
593 @comment node-name, next, previous, up
594 @section Burying a Tree Buffer
595 @cindex burying tree buffer
599 Is a synonym for @kbd{M-x bury-buffer}.
605 @node File Name Display, Expanding and Collapsing, Quitting, Tree Buffers
606 @comment node-name, next, previous, up
607 @section Displaying File Names
610 @cindex file names in tree buffers
612 This command toggles the display of file names in a tree buffer. If
613 file name display is switched on, the names of the files containing the
614 class declaration are shown to the right of the class names. If the
615 file is not known, the string @samp{unknown} is displayed.
617 This command is also provided in the tree buffer's context menu.
620 Display file names for the current line, or for the number of lines
621 given by a prefix argument.
624 Here is an example of a tree buffer with file names displayed.
627 | Collection (unknown)
628 | IndexedCollection (indexedcltn.h)
630 | FixedArray (fixedarray.h)
632 | Dictionary (dict.h)
636 @node Expanding and Collapsing, Tree Indentation, File Name Display, Tree Buffers
637 @comment node-name, next, previous, up
638 @section Expanding and Collapsing a Tree
639 @cindex expand tree branch
640 @cindex collapse tree branch
641 @cindex branches of class tree
642 @cindex class tree, collapse or expand
644 You can expand and collapse parts of a tree to reduce the complexity of
645 large class hierarchies. Expanding or collapsing branches of a tree has
646 no impact on the functionality of other commands, like @kbd{/}. (See
647 also @ref{Go to Class}.)@refill
649 Collapsed branches are indicated with an ellipsis following the class
650 name like in the example below.
654 | IndexedCollection...
661 This command collapses the branch of the tree starting at the class the
665 This command expands the branch of the tree starting at the class the
666 cursor is on. Both commands for collapsing and expanding branches are
667 also available from the class' object menu.
670 This command expands all collapsed branches in the tree.
676 @node Tree Indentation, Killing Classes, Expanding and Collapsing, Tree Buffers
677 @comment node-name, next, previous, up
678 @section Changing the Tree Indentation
679 @cindex tree indentation
680 @cindex indentation of the tree
684 This command reads a new indentation width from the minibuffer and
685 redisplays the tree buffer with the new indentation It is also
686 available from the tree buffer's context menu.
692 @node Killing Classes, Saving a Tree, Tree Indentation, Tree Buffers
693 @comment node-name, next, previous, up
694 @section Removing Classes from the Tree
695 @cindex killing classes
696 @cindex class, remove from tree
700 This command removes the class the cursor is on and all its derived
701 classes from the tree. The user is asked for confirmation before the
702 deletion is actually performed.
708 @node Saving a Tree, Statistics, Killing Classes, Tree Buffers
709 @comment node-name, next, previous, up
710 @comment node-name, next, previous, up
711 @section Saving a Tree
712 @cindex save tree to a file
713 @cindex tree, save to a file
714 @cindex class tree, save to a file
718 This command writes a class tree to the file from which it was read.
719 This is useful after classes have been deleted from a tree.
722 Writes the tree to a file whose name is read from the minibuffer.
728 @node Statistics, Marking Classes, Saving a Tree, Tree Buffers
729 @comment node-name, next, previous, up
730 @cindex statistics for a tree
731 @cindex tree statistics
732 @cindex class statistics
736 Display statistics for the tree, like number of classes in it, number of
737 member functions, etc. This command can also be found in the buffer's
744 @node Marking Classes, , Statistics, Tree Buffers
745 @comment node-name, next, previous, up
746 @cindex marking classes
747 @cindex operations on marked classes
749 Classes can be marked for operations similar to the standard Emacs
750 commands @kbd{M-x tags-search} and @kbd{M-x tags-query-replace} (see
751 also @xref{Tags-like Functions}.)@refill
756 Toggle the mark of the line point is in or for as many lines as given by
757 a prefix command. This command can also be found in the class' context
762 Unmark all classes. With prefix argument @kbd{C-u}, mark all classes in
763 the tree. Since this command operates on the whole buffer, it can also be
764 found in the buffer's object menu.
767 Marked classes are displayed with an @code{>} in column one of the tree
768 display, like in the following example
772 | IndexedCollection...
780 @c ****************************************************************
782 @c *** MEMBER BUFFERS
784 @c ****************************************************************
786 @node Member Buffers, Tags-like Functions, Tree Buffers, Top
787 @comment node-name, next, previous, up
788 @chapter Member Buffers
790 @cindex member buffer mode
792 @cindex class members, types
793 @cindex types of class members
794 @dfn{Member buffers} are used to operate on lists of members of a class.
795 Ebrowse distinguishes six kinds of lists:
799 Instance variables (normal member variables);
801 Instance functions (normal member functions);
805 Static member functions;
809 Types (@code{enum}s and @code{typedef}s defined with class scope.
810 Nested classes will be shown in the class tree like normal classes.
813 Like tree buffers, member buffers install their own major mode. Also
814 like in tree buffers, menus are provided for certain areas in the
815 buffer: members, classes, and the buffer itself.
818 * Switching Member Lists:: Choosing which members to display
819 * Finding/Viewing:: Modifying source code
820 * Inherited Members:: Display of Inherited Members
821 * Searching Members:: Finding members in member buffer
822 * Switching to Tree:: Going back to the tree buffer
823 * Filters:: Selective member display
824 * Attributes:: Display of @code{virtual} etc.
825 * Long and Short Display:: Comprehensive and verbose display
826 * Regexp Display:: Showing matching regular expressions
827 * Switching Classes:: Displaying another class
828 * Killing/Burying:: Getting rid of the member buffer
829 * Column Width:: Display style
830 * Redisplay:: Redrawing the member list
831 * Getting Help:: How to get help for key bindings
837 @node Switching Member Lists, Finding/Viewing, Member Buffers, Member Buffers
838 @comment node-name, next, previous, up
839 @section Switching Member Lists
840 @cindex member lists, in member buffers
841 @cindex static members
847 @cindex next member list
849 This command switches the member buffer display to the next member list.
851 @cindex previous member list
853 This command switches the member buffer display to the previous member
857 Switch to the list of member functions.
861 Switch to the list of static member functions.
864 Switch to the list of member variables.
867 Switch to the list of static member variables.
870 Switch to the list of friends or defines.
873 Switch to the list of types.
876 Both commands cycle through the member list.
878 Most of the commands are also available from the member buffer's
884 @node Finding/Viewing, Inherited Members, Switching Member Lists, Member Buffers
885 @comment node-name, next, previous, up
886 @section Finding and Viewing Member Source
887 @cindex finding members, in member buffers
888 @cindex viewing members, in member buffers
889 @cindex member definitions, in member buffers
890 @cindex member declarations, in member buffers
891 @cindex definition of a member, in member buffers
892 @cindex declaration of a member, in member buffers
896 This command finds the definition of the member the cursor is on.
897 Finding involves roughly the same as the standard Emacs tags facility
898 does---loading the file and searching for a regular expression matching
902 This command finds the declaration of the member the cursor is on.
905 This is the same command as @kbd{RET}, but views the member definition
906 instead of finding the member's source file.
909 This is the same command as @kbd{f}, but views the member's declaration
910 instead of finding the file the declaration is in.
913 You can install a hook function to perform actions after a member or
914 class declaration or definition has been found, or when it is not found.
916 All the commands described above can also be found in the context menu
917 displayed when clicking @kbd{Mouse-2} on a member name.
922 @node Inherited Members, Searching Members, Finding/Viewing, Member Buffers
923 @comment node-name, next, previous, up
924 @section Display of Inherited Members
925 @cindex superclasses, members
926 @cindex base classes, members
927 @cindex inherited members
931 This command toggles the display of inherited members in the member
932 buffer. This is also in the buffer's context menu.
938 @node Searching Members, Switching to Tree, Inherited Members, Member Buffers
939 @comment node-name, next, previous, up
940 @section Searching Members
941 @cindex searching members
945 Position the cursor on a member whose name is read from the minibuffer;
946 only members shown in the current member buffer appear in the completion
950 Like the above command, but all members for the current class appear in
951 the completion list. If necessary, the current member list is switched
952 to the one containing the member.
954 With a prefix argument (@kbd{C-u}), all members in the class tree,
955 i.e., all members the browser knows about appear in the completion
956 list. The member display will be switched to the class and member list
957 containing the member.
960 Repeat the last member search.
963 Look into the buffer's context menu for a convenient way to do this with
968 @node Switching to Tree, Filters, Searching Members, Member Buffers
969 @comment node-name, next, previous, up
970 @section Switching to Tree Buffer
971 @cindex tree buffer, switch to
972 @cindex buffer switching
973 @cindex switching buffers
977 Pop up the tree buffer to which the member buffer belongs.
980 Do the same as @key{TAB} but also position the cursor on the class
981 displayed in the member buffer.
987 @node Filters, Attributes, Switching to Tree, Member Buffers
988 @comment node-name, next, previous, up
993 @cindex @code{public} members
995 This command toggles the display of @code{public} members. The
996 @samp{a} stands for `access'.
998 @cindex @code{protected} members
1000 This command toggles the display of @code{protected} members.
1002 @cindex @code{private} members
1004 This command toggles the display of @code{private} members.
1006 @cindex @code{virtual} members
1008 This command toggles the display of @code{virtual} members.
1010 @cindex @code{inline} members
1012 This command toggles the display of @code{inline} members.
1014 @cindex @code{const} members
1016 This command toggles the display of @code{const} members.
1018 @cindex pure virtual members
1020 This command toggles the display of pure virtual members.
1022 @cindex remove filters
1024 This command removes all filters.
1027 These commands are also found in the buffer's context menu.
1032 @node Attributes, Long and Short Display, Filters, Member Buffers
1033 @comment node-name, next, previous, up
1034 @section Displaying Member Attributes
1036 @cindex member attribute display
1040 Toggle the display of member attributes (default is on).
1042 The nine member attributes Ebrowse knows about are displayed
1043 as a list a single-characters flags enclosed in angle brackets in front
1044 the of the member's name. A @samp{-} at a given position means that
1045 the attribute is false. The list of attributes from left to right is
1048 @cindex @code{template} attribute
1050 The member is a template.
1052 @cindex @code{extern "C"} attribute
1054 The member is declared @code{extern "C"}.
1056 @cindex @code{virtual} attribute
1058 Means the member is declared @code{virtual}.
1060 @cindex @code{inline}
1062 The member is declared @code{inline}.
1064 @cindex @code{const} attribute
1066 The member is @code{const}.
1068 @cindex pure virtual function attribute
1070 The member is a pure virtual function.
1072 @cindex @code{mutable} attribute
1074 The member is declared @code{mutable}.
1076 @cindex @code{explicit} attribute
1078 The member is declared @code{explicit}.
1081 The member is a function with a throw list.
1085 This command is also in the buffer's context menu.
1089 @node Long and Short Display, Regexp Display, Attributes, Member Buffers
1090 @comment node-name, next, previous, up
1091 @section Long and Short Member Display
1092 @cindex display form
1093 @cindex long display
1094 @cindex short display
1098 This command toggles the member buffer between short and long display
1099 form. The short display form displays member names, only:
1102 | isEmpty contains hasMember create
1103 | storeSize hash isEqual restoreGuts
1107 The long display shows one member per line with member name and regular
1108 expressions matching the member (if known):
1111 | isEmpty Bool isEmpty () const...
1112 | hash unsigned hash () const...
1113 | isEqual int isEqual (...
1116 Regular expressions will only be displayed when the Lisp database has
1117 not been produced with the @command{ebrowse} option @samp{--no-regexps}.
1118 @xref{Matching, --no-regexps, Regular Expressions}.
1124 @node Regexp Display, Switching Classes, Long and Short Display, Member Buffers
1125 @comment node-name, next, previous, up
1126 @section Display of Regular Expressions
1127 @cindex regular expression display
1131 This command toggles the long display form from displaying the regular
1132 expressions matching the member declarations to those expressions
1133 matching member definitions.
1136 Regular expressions will only be displayed when the Lisp database has
1137 not been produced with the @command{ebrowse} option @samp{--no-regexps},
1138 see @ref{Matching, --no-regexps, Regular Expressions}.
1143 @node Switching Classes, Killing/Burying, Regexp Display, Member Buffers
1144 @comment node-name, next, previous, up
1145 @section Displaying Another Class
1146 @cindex base class, display
1147 @cindex derived class, display
1148 @cindex superclass, display
1149 @cindex subclass, display
1150 @cindex class display
1154 This command lets you switch the member buffer to another class. It
1155 reads the name of the new class from the minibuffer with completion.
1158 This is the same command as @kbd{C c} but restricts the classes shown in
1159 the completion list to immediate base classes, only. If only one base
1160 class exists, this one is immediately shown in the minibuffer.
1163 Same as @kbd{C b}, but for derived classes.
1166 Switch to the previous class in the class hierarchy on the same level as
1167 the class currently displayed.
1170 Switch to the next sibling of the class in the class tree.
1176 @node Killing/Burying, Column Width, Switching Classes, Member Buffers
1177 @comment node-name, next, previous, up
1178 @section Burying a Member Buffer
1179 @cindex burying member buffers
1183 This command is a synonym for @kbd{M-x bury-buffer}.
1189 @node Column Width, Redisplay, Killing/Burying, Member Buffers
1190 @comment node-name, next, previous, up
1191 @section Setting the Column Width
1192 @cindex column width
1193 @cindex member indentation
1194 @cindex indentation, member
1198 This command sets the column width depending on the display form used
1199 (long or short display).
1205 @node Redisplay, Getting Help, Column Width, Member Buffers
1206 @comment node-name, next, previous, up
1207 @section Forced Redisplay
1208 @cindex redisplay of member buffers
1212 This command forces a redisplay of the member buffer. If the width
1213 of the window displaying the member buffer is changed this command
1214 redraws the member list with the appropriate column widths and number of
1221 @node Getting Help, , Redisplay, Member Buffers
1222 @comment node-name, next, previous, up
1227 This key is bound to @code{describe-mode}.
1233 @comment **************************************************************
1234 @comment *** TAGS LIKE FUNCTIONS
1235 @comment **************************************************************
1237 @node Tags-like Functions, GNU Free Documentation License, Member Buffers, Top
1238 @comment node-name, next, previous, up
1239 @chapter Tags-like Functions
1241 Ebrowse provides tags functions similar to those of the standard
1242 Emacs Tags facility, but better suited to the needs of C++ programmers.
1245 * Finding and Viewing:: Going to a member declaration/definition
1246 * Position Stack:: Moving to previous locations
1247 * Search & Replace:: Searching and replacing over class tree files
1248 * Members in Files:: Listing all members in a given file
1249 * Apropos:: Listing members matching a regular expression
1250 * Symbol Completion:: Completing names while editing
1251 * Member Buffer Display:: Quickly display a member buffer for some
1257 @node Finding and Viewing, Position Stack, Tags-like Functions, Tags-like Functions
1258 @comment node-name, next, previous, up
1259 @section Finding and Viewing Members
1260 @cindex finding class member, in C++ source
1261 @cindex viewing class member, in C++ source
1263 @cindex member definition, finding, in C++ source
1264 @cindex member declaration, finding, in C++ source
1266 The functions in this section are similar to those described in
1267 @ref{Source Display}, and also in @ref{Finding/Viewing}, except that
1268 they work in a C++ source buffer, not in member and tree buffers created
1273 Find the definition of the member around point. If you invoke this
1274 function with a prefix argument, the declaration is searched.
1276 If more than one class contains a member with the given name you can
1277 select the class with completion. If there is a scope declaration in
1278 front of the member name, this class name is used as initial input for
1282 Find the declaration of the member around point.
1285 View the definition of the member around point.
1288 View the declaration of the member around point.
1291 Find a member's definition in another window.
1294 Find a member's declaration in another window.
1297 View a member's definition in another window.
1300 View a member's declaration in another window.
1303 Find a member's definition in another frame.
1306 Find a member's declaration in another frame.
1309 View a member's definition in another frame.
1312 View a member's declaration in another frame.
1317 @node Position Stack, Search & Replace, Finding and Viewing, Tags-like Functions
1318 @comment node-name, next, previous, up
1319 @section The Position Stack
1320 @cindex position stack
1322 When jumping to a member declaration or definition with one of
1323 Ebrowse's commands, the position from where you performed the
1324 jump and the position where you jumped to are recorded in a
1325 @dfn{position stack}. There are several ways in which you can quickly
1326 move to positions in the stack:@refill
1329 @cindex return to original position
1331 This command sets point to the previous position in the position stack.
1332 Directly after you performed a jump, this will put you back to the
1333 position where you came from.
1335 The stack is not popped, i.e., you can always switch back and forth
1336 between positions in the stack. To avoid letting the stack grow to
1337 infinite size there is a maximum number of positions defined. When this
1338 number is reached, older positions are discarded when new positions are
1339 pushed on the stack.
1342 This command moves forward in the position stack, setting point to
1343 the next position stored in the position stack.
1346 Displays an electric buffer showing all positions saved in the stack.
1347 You can select a position by pressing @kbd{SPC} in a line. You can
1348 view a position with @kbd{v}.
1354 @node Search & Replace, Members in Files, Position Stack, Tags-like Functions
1355 @comment node-name, next, previous, up
1356 @section Searching and Replacing
1357 @cindex searching multiple C++ files
1358 @cindex replacing in multiple C++ files
1359 @cindex restart tags-operation
1361 Ebrowse allows you to perform operations on all or a subset of the files
1362 mentioned in a class tree. When you invoke one of the following
1363 functions and more than one class tree is loaded, you must choose a
1364 class tree to use from an electric tree menu. If the selected tree
1365 contains marked classes, the following commands operate on the files
1366 mentioned in the marked classes only. Otherwise all files in the class
1371 This function performs a regular expression search in the chosen set of
1375 This command performs a search for calls of a given member which is
1376 selected in the usual way with completion.
1379 Perform a query replace over the set of files.
1382 All three operations above stop when finding a match. You can restart
1383 the operation with this command.
1386 This restarts the last tags operation with the next file in the list.
1392 @node Members in Files, Apropos, Search & Replace, Tags-like Functions
1393 @comment node-name, next, previous, up
1394 @section Members in Files
1396 @cindex members in file, listing
1397 @cindex list class members in a file
1398 @cindex file, members
1400 The command @kbd{C-c C-m l}, lists all members in a given file. The file
1401 name is read from the minibuffer with completion.
1406 @node Apropos, Symbol Completion, Members in Files, Tags-like Functions
1407 @comment node-name, next, previous, up
1408 @section Member Apropos
1409 @cindex apropos on class members
1410 @cindex members, matching regexp
1412 The command @kbd{C-c C-m a} can be used to display all members matching a
1413 given regular expression. This command can be very useful if you
1414 remember only part of a member name, and not its beginning.
1416 A special buffer is popped up containing all identifiers matching the
1417 regular expression, and what kind of symbol it is (e.g., a member
1418 function, or a type). You can then switch to this buffer, and use the
1419 command @kbd{C-c C-m f}, for example, to jump to a specific member.
1424 @node Symbol Completion, Member Buffer Display, Apropos, Tags-like Functions
1425 @comment node-name, next, previous, up
1426 @section Symbol Completion
1428 @cindex symbol completion
1430 The command @kbd{C-c C-m @key{TAB}} completes the symbol in front of point.
1435 @node Member Buffer Display, , Symbol Completion, Tags-like Functions
1436 @section Quick Member Display
1437 @cindex member buffer, for member at point
1439 You can quickly display a member buffer containing the member the cursor
1440 in on with the command @kbd{C-c C-m m}.
1443 @node GNU Free Documentation License, Concept Index, Tags-like Functions, Top
1444 @appendix GNU Free Documentation License
1445 @include doclicense.texi
1448 @node Concept Index, , GNU Free Documentation License, Top
1449 @unnumbered Concept Index