Chapter 10. The Browser Reference

This chapter describes all of the windows and features associated with the Browser. For tutorials demonstrating how the Browser is used, refer to Chapter 8, "Using the Browser for C++: A Sample Session," and Chapter 9, "Using the Browser for Ada: A Sample Session."

This chapter contains the following sections:

Browsing Choices Window

The Browsing Choices window lets you select items to be browsed from a list derived from the fileset in the Browser View window. Double-clicking an item in the selection list causes the Browser View window to be raised (moved to the front) with the chosen item as the current subject for analysis.

Figure 10-1. Browsing Choices Window

Figure 10-1 Browsing Choices Window

Browsing Choices Window for C++

With C++ code, the Browsing Choices window displays one column to indicate the kind of item, a column to identify the item, and three columns indicating properties, as follows:

  • Kind—classes, template definitions, and template instances

  • Name—the name of the item

  • Abstract—abstract property: concrete (blank), abstract by declaration, or abstract by inheritance

  • Delta—delta property: dynamic, internal dynamic, or non-dynamic (blank)

  • Template—template property: specific definition, partial instantiation, or normal (blank)

The Browsing Choices window provides a facility for sorting items by column. To do this, click in the column you wish to sort on and select "Sort" from the Admin menu.

Browsing Choices Window for Ada

If you're using Ada, the Browsing Choices window displays packages, tasks, and tagged types in the Kinds column. The properties columns are not used in Ada and appear blank. You can sort the items by kind or name by clicking in the appropriate column and selecting "Sort" from the Admin menu.


Note: These features are available only if you have purchased the ProDev Ada package.


Browser View Window

Browser View is the primary Browser window (see Figure 10-2). It opens when you select "Browser" from the Admin menu of the WorkShop Static Analyzer, but does not display data until you select an item from the list in the Browsing Choices window. Browser View displays internal and related information for elements in Ada and C++ programs. The information is presented in hierarchical lists shown in outline format.

Browser View lets you perform a variety of static analysis database queries, depending on your current work context. Queries concerning the current subject are accessed from the Queries menu in the menu bar. You can also make queries specific to the selected elements in the list area by holding down the right mouse button to display a popup Queries menu specific to that type of element. The results of queries are indicated by highlighting matching elements in the Browser View window. Matching results are also highlighted in Source View, if it is displayed; and in the Static Analyzer, if the Show in Static Analyzer toggle is turned on (see "Show in Static Analyzer Toggle").

You can also launch graphical views showing hierarchies and call graphs from the Browser View window. In addition, you can generate reference pages and web pages from Browser View.

Figure 10-2. Browser View Window Elements

Figure 10-2 Browser View Window Elements

Current Subject Field

The Current Subject field indicates the kind and name of the element to be analyzed. It is directly below the menu bar (see Figure 10-2). The label on this field is initially Current Subject. To analyze an element, you can type directly into this field (or select from the Browsing Choices window). The label changes according to the kind of element you select. You can enter the following kinds of elements:

  • C++ class

  • C++ template definition

  • C++ template instance

  • Ada package (with ProDev Ada only)

  • Ada task (with ProDev Ada only)

  • Ada tagged type (with ProDev Ada only)

Name Completion

If you type a partial string and then press the <space bar>, the Browser attempts to complete the element name by searching the fileset. A beep indicates that more than one matching name exists. If a match is made, press the <Enter> key to make the change effective.

Changing Subject Using "?"

If you type a question mark (?) into the Current Subject field, the Browsing Choices window opens. You can select a new item by double-clicking a name in the selection list.

Show in Static Analyzer Toggle

The Show in Static Analyzer toggle is directly to the right of the Current Subject field (see Figure 10-2). When the toggle is set (a check mark and the label Yes appear), the results of all queries are displayed in the WorkShop Static Analyzer window from which the Browser was launched, including the file, line number, and source line for the matching items. If no results are found and the Static Analyzer window is open, it comes to the front with an error message.

Last Query Button

The Last Query button is at the top right of the window, directly beneath the Help menu (see Figure 10-2). Clicking this button displays the results of the most recent query in the WorkShop Static Analyzer window from which the Browser was launched.

Browser View Query Identification Area

The Browser View query identification area is directly above the list area (see Figure 10-2). This area displays the most recent query as a sentence containing both the query question and the name of the object of the query. The number of elements matching the query is displayed at the right end of the line.

Browser View List Areas

The lower two-thirds of the Browser View window consists of two lists displayed in side-by-side panes (see Figure 10-2). The lists contain information about the currently selected subject and are organized by category in an outline format. The lists are:

  • member list—a detailed view of the internals of the current subject.

  • relation list—items related to the current subject.

You can change the relative widths of the panes by moving the sash that separates the panes.

The categories in the lists are different depending on whether you are using C++ or Ada code (with ProDev Ada only). Table 10-1 summarizes the contents of each list by programming language. For more information on the lists, see "C++ Member List", "C++ Relation List", "Ada Member List", and "Ada Relation List".

Table 10-1. Browser View List Summary

Language

Member List Contents

Relations List Contents

C++

PUBLIC/INSTANCE/PRIVATE

INSTANCE/STATIC

TYPES/DATA/METHODS/
VIRTUAL METHODS

BASE CLASSES (including the current class)/ DERIVED CLASSES/USES/ USED BY/ FRIEND FUNCTIONS/ FRIENDS/FRIEND OF

Ada

SPEC PUBLIC/SPEC PRIVATE/ BODY

CONTAINS/DATA/TYPE/
FUNCTIONS/ENTRIES/
PRIMITIVE OPERATIONS

PARENTS (including the current subject)/ DERIVED


Outline Icons

Each category name appears with an outline icon to its left, that is, a diamond-shaped icon that can be used to collapse (hide) or expand (make visible) the items under that category. Inside the icon there is an arrow that indicates whether the category is in the expanded or collapsed state. If the arrow points downward, the list is in its expanded state; all items are displayed. If the icon points to the right, the category is in its collapsed state; all items in that category are hidden. Clicking the arrow toggles the state of the category, displaying or hiding the category's contents. Another function of the outline icon is to indicate when a collapsed list contains items matching the current query. This is shown with a filled outline icon. See Figure 10-3.

Figure 10-3. Outline List Icons and Indicator Marks

Figure 10-3 Outline List Icons and Indicator Marks

Annotated Scroll Bars and Highlighted Entries

The lists use annotated scroll bars as another way to locate highlighted list entries. When you make a query on an item in a list, the Browser displays indicator marks in the scroll bars in both panes corresponding to the relative positions of matching items. This informs you about all matches even if they are in collapsed categories or in a portion of the list that is not currently in view. If you click an indicator with the middle mouse button, you scroll directly to the matching item in the list. When the thumb of the scroll bar overlaps a given tick mark, the corresponding entry is visible in the list window. See Figure 10-3.

C++ Member List

The Browser View member list displays the types, data members, methods, and virtual methods internal to the current class, template definition, or template instance when you are analyzing C++ code. It labels constructor methods as -constructor-> and destructors as --destructor->.

Display Hierarchy

The members of the current class are sorted recursively into three nested lists according to the access specification (PUBLIC, PROTECTED, or PRIVATE) of each member. Within each of the access categories, the members are sorted by scope into two categories (INSTANCE and STATIC). Finally, within each category, members are displayed by member category type in this order: TYPE, DATA, METHODS (member functions), and VIRTUAL METHODS.

Here is a schematic of the outline format for each nested list:

Access (PUBLIC, PROTECTED, or PRIVATE)
    Scope (INSoTANCE or STATIC)
       TYPES
       DATA
       METHODS
       VIRTUAL METHODS

Access Categories

The accessibility categories are:

  • public members—accessible by any method or C-style function

  • protected members—accessible only by methods in derived classes, friend classes, or friend functions

  • private members—accessible only by methods in the class in which they are defined, friend classes, or friend functions

Scope Categories

The scope categories are:

  • static members—all objects of a given class contain the same value for a given member

  • instance (non-static) members—members in different instances of that class can contain different data values

Class Member Categories

Class members fall into these categories:

  • types—definitions of data types declared within a class

  • data—variables that contain state information for a class

  • methods (or member functions)—definitions of how a class interacts with other classes and structures

  • virtual methods—methods for an object that ensure that the method invoked is defined by the class from which the object was instantiated, regardless of type casting

The list organization is customizable. For more information, refer to Appendix A.

Displaying a Member's Source Code

Double-clicking any member in the member list opens a Source View window containing that member's code with the declaration highlighted. See Figure 10-4.

Figure 10-4. Source View of Class Data Member

Figure 10-4 Source View of Class Data Member

C++ Relation List

The C++ relations list displays the current class and its related classes in the related class list. The categories in the list are:

  • BASE CLASSES—contains the current class and its ancestors, listed hierarchically

  • DERIVED CLASSES—contains descendants of the current class, listed hierarchically

  • USES—contains classes that the current class uses (that is, instantiates, destroys, interacts with, or contains)

  • USED BY—contains classes that the current class is used by

  • FRIEND FUNCTIONS—contains global functions declared as friends by the current class

  • FRIENDS—contains classes that are declared as friends by the current class.

  • FRIEND OF—contains classes that declare the current class as a friend.

Within this list, the current class is displayed as follows:

<- This

which refers to the class in the Current Class field.

C++ Relations List Mouse Shortcuts

Double-clicking any class listed in the related class list makes it the new current class. Double-clicking a friend function brings up a Source View window highlighting the function's definition.

Base Classes Category Hierarchy

The Base Classes category shows the ancestors of the current class, if any. Each indented class is an ancestor of the class listed above it. The Base Classes category indicates a multiple inheritance relationship by indenting parent classes to the same level. If a given class has ancestors, it is accompanied by an outline icon, which works in a similar manner to the outline icons in the member list. Each ancestor name is followed by its inheritance access type (public, protected or private) listed in parentheses.

This schematic gives an example of a Base Classes category:

BASE CLASSES
   <-This
              first_parent_of_This (access type)
                                parent_of_first_parent_class (access type)
               second_parent_of_This (access type)
                               parent_of_second_parent_class (access type)

Derived Classes Category Hierarchy

The Derived Classes category shows the descendants of the current class, if any. Each indented class is a descendant of the class listed above it. If a given class has descendants, it is accompanied by an outline icon, which works in a similar manner to the outline icons in the base classes category and member list.

This schematic gives an example of a possible Derived Classes category:

DERIVED CLASSES
    first_child_of_This
       child_of_first_child_class
    second_child_of_This
       child_of_second_child_class

Figure 10-5. C++ Relations List Derived Classes Category

Figure 10-5 C++ Relations List Derived Classes Category

Ada Member List


Note: The features described in this section are available only if you have purchased the ProDev Ada package.

The Ada version of the Browser View member list displays packages, task types, and tagged types as its current subjects. Packages have functions as their internal "members." The internal members for task types are entries (under Public) and functions. Tagged types have primitive operations as their internal members.

Display Hierarchy

The members of the current subject are sorted recursively into three nested lists according to the access specification (SPEC PUBLIC, SPEC PRIVATE, or BODY) of each member. Under each of the access categories lies the INSTANCE subcategory. Finally, the members are displayed by member category type in this order: TYPES, DATA.

Here is a schematic of the outline format for each nested list:

Access (SPEC PUBLIC, SPEC PRIVATE, or BODY)
   Scope (INSTANCE)
      TYPES
      DATA

Access Categories

The accessibility categories are different depending on the type of Ada entity.

The accessibility categories for packages are:

  • spec public—includes declarations of data, functions, and types made in the public part of the package spec

  • spec private—includes declarations of data, functions, and types made in the private part of the package spec

  • body—includes declarations and definitions of data, functions, and types made in the implementation of the package. These symbols are usable only within the package body.

The accessibility categories for tagged types are:

  • spec public—includes data lists components of the tagged type. Functions list primitive operations of the tagged type.


Note: There is no spec private or body section for a tagged type.

The accessibility categories for task types are:

  • spec public—includes functions listed here are entries to the task. Types and data listed here are public (ie usable by a client of the task).

  • body—includes types, data, and functions used in the implementation of the task. These symbols are usable only within the task body.


Note: There is no spec private section for tagged types


Type and Data Member Categories

The other categories are:

  • types—definitions of data types declared by a package, task, or tagged type

  • data—variables that contain state information for a package, task, or tagged type

The list organization is customizable. For more information, refer to Appendix A, "Customizing the C++ Browser."

Displaying a Member's Source Code

Double-clicking any member in the member list opens a Source View window containing that member's code, with the declaration highlighted. See Figure 10-4.

Ada Relation List

The Ada relations list shows parent-derived relationships between tagged types (with ProDev Ada only).

Browser View Menu Bar

This section describes the menus, found in the Browser View menu bar (see Figure 10-6).

Figure 10-6. Browser View Menu Bar With Menus Displayed

Figure 10-6 Browser View Menu Bar With Menus Displayed

Admin Menu

Figure 10-7. Browser View Admin MenuCurrent Class Pop-Up Menu

Figure 10-7 Browser View Admin MenuCurrent Class Pop-Up Menu

The Admin menu contains commands for selecting new subjects, manipulating Browser View windows, generating reference and web pages, and exiting the Browser View.

"Change Current Subject" 


Lets you select a new current a new subject without manually typing it into the Current Subject field. Choosing this command opens the Browsing Choices window (see Figure 10-1), which contains a scrolling list of all the classes or packages available from the current fileset. Double-clicking an item selects it for display in the Browser View window and closes the Browsing Choices window.

"Another Browser View" 


Creates an identical copy of the Browser View window. All current information displayed within the initial window appears in the copy, but connections to the graphical view windows are not carried over to the new Browser View window.

"Close Browser View" 


Shuts the Browser View window and any associated windows, such as Graph or List of Classes.

Man Page Generation

"Generate Man Pages..." 


Opens the Man Page Generator window, which lets you create reference page templates for classes (C++), packages (Ada), tasks (Ada), and tagged types (Ada). See Figure 10-8.

Select individual subjects by clicking them. If you want a reference page for every subject in the list, click Select All. To remove selections you've made, click Unselect All. Clicking the Generate button creates a reference page template for each selected subject. If reference pages exist for any selected subjects, the Browser warns you, unless you set the Warn Overwrite toggle to No.

Output files go in the directory shown in the Man Page Directory field, if it exists. To specify a different output directory, click the Set Directory button in the Man Page Generator window and enter your choice.

Figure 10-8. Man Page Generator and Typical Man Page Template

Figure 10-8 Man Page Generator and Typical Man Page Template

Web Page Generation

"Generate Web Pages ..." 


Opens the Web Page Generator window (see Figure 10-9), which lets you create web page templates for classes (C++), packages (Ada), tasks (Ada), and tagged types (Ada). See Figure 10-10. These templates are in HTML format and can be read by viewers compatible with the World Wide Web.

Select individual subjects by clicking them. If you want a reference page for every subject in the list, click Select All. To remove selections you've made, click Unselect All. Clicking the Generate button creates a reference page template for each selected subject. If reference pages exist for any selected subjects, the Browser warns you, unless you set the Warn Overwrite toggle to No.

Output files go in the directory shown in the Web Page Directory field, if it exists. To specify a different output directory, click the Set Directory button in the Web Page Generator window and enter your choice.

Figure 10-9. Web Page Generator Window

Figure 10-9 Web Page Generator Window

Figure 10-10. Typical Web Page Template

Figure 10-10 Typical Web Page Template

"Exit Browser" 

Quits the C++ Browser, closing all windows launched from it (except Source View). The Static Analyzer window from which the browser was launched is not affected.

Views Menu

Figure 10-11. Views Menu

Figure 10-11 Views Menu

The Views menu contains commands for opening graphical views (see Figure 10-11). For descriptions of the display and controls, refer to Appendix A, "Using Graphical Views." Each of the first four selections opens a Graph Views window for the current class, with a specific relationship; refer to "Graph Views Window". The last selection opens a Call Graph window; refer to "Call Graph Window".

"Show Inheritance Graph" 


Describes the relationship between base classes and derived classes.

"Show Containment Graph" 


Describes the relationship of container classes to the classes they use as components.

"Show Interaction Graph"  


Describes the relationship of used classes to the classes that are their users.

"Show Friend Graph" 


Describes the relationship of classes declaring friends to the classes they declare.

"Show Call Graph" 


Opens a Call Graph window. To perform operations in it, select a method from the member list display, press the right mouse button to display the Methods popup menu, and select "Add," "Remove," or "Replace" from the "Call Graph" submenu.

History Menu

Figure 10-12. History Menu

Figure 10-12 History Menu

The History menu contains commands that let you quickly select previously chosen subjects for display in the Browser View window (see Figure 10-12). If no class was selected previously, a message appears.

"Show Previous Subject" 


Sets the current subject to the previously displayed class, and the information in the Browser View window changes to reflect this.

"Show History" 


Opens a "List of Subjects Shown" chooser window for selecting previously viewed subjects (see Figure 10-13). The window presents the previous subjects in reverse chronological order, that is, the most recent subject appears at the bottom of the list.

Figure 10-13. List of Classes Shown

Figure 10-13 List of Classes Shown

To select a subject, click it and press Apply or OK. Double-clicking a subject has the same effect as OK; it makes the selection and closes the window. The selected class then becomes the current subject in the Browser View window.

Main Queries Menu

Figure 10-14. Queries Menu

Figure 10-14 Queries Menu

The main Queries menu is accessed from the menu bar and applies to the current subject (see Figure 10-14). The selections are:

"What Is Declared" 


Displays all methods declared by the current class.

"What Is Defined"  


Displays all members defined by the current class.

"What Is Overridden By" 


Displays all inherited methods that the current class overrides.

"What is Pure Virtual" 


Displays all pure virtual functions in the current subject.

"What Instantiates" 


Displays classes that instantiate the current class by invoking its constructors or by using its new methods.

"What Destroys" 


Displays classes that destroy the current class by invoking its destructors or by using its delete methods.

"What Uses" submenu (see Figure 10-15) 


Figure 10-15. "What Uses" Submenu of Queries Menu

Figure 10-15 "What Uses" Submenu of Queries Menu

Displays the classes that use the current class in these contexts:

  • "To Contain" displays classes that use the current class as either an embedded or linked component.

  • "As Friend" displays classes that use the current class as a friend class.

  • "Methods" displays classes that use the methods defined by the current class.

  • "Data Members" displays classes that use (by modifying, reading, or taking the address) data members defined by the current class.

"What Is Instantiated" 


Displays classes that the current class instantiates by invoking its constructors.

"What Is Destroyed" 


Displays classes that the current class destroys by invoking its destructors.

"What Is Used" submenu (see Figure 10-16) 


Figure 10-16. "What Is Used" Submenu of Queries Menu

Figure 10-16 "What Is Used" Submenu of Queries Menu

Displays those classes used by the current class in these contexts:

  • "To Contain" highlights classes that the current class uses as either embedded or linked components.

  • "As Friend" highlights classes that the current class uses as friend classes.

  • "By Methods" highlights classes whose methods are used by the current class.

  • "By Data Access" highlights classes whose data members are assigned, read, or have their address taken by the current class.

Additional queries on subjects, data members, and methods are accessible from popup menus described in "C++ Member List" and "C++ Relation List".

Preference Menu

The Preference menu allows you to control how the class information is displayed in the window (see Figure 10-17).

Figure 10-17. Preferences Menu

Figure 10-17 Preferences Menu

The selections are:

"Relation Display" submenu  


Allows you to control how the class relations are displayed:

  • "Declaration Order" displays the related classes in order of their declaration or the detection of their relation.

  • "End To End Sort" displays a sorted list of related classes.

"Member Display" submenu  


Allows you to control how the class members are displayed:

  • "Declaration Order" displays the members in order of their declaration.

  • "End To End Sort" performs an end-to-end sort of the member display strings and displays the result.

  • "Name Sort" performs a sort based on the name of the members and displays the result.

"Member Alignment" submenu 


Allows you to control how members line up:

  • "Align Names" aligns the member names in the display. A radio button indicates if this feature is enabled or disabled.

  • "Align Arglists" aligns the member function argument lists in the display. A radio button indicates if this feature is enabled or disabled.

"Member Double Click" submenu 


Lets you select which related source code is displayed in Source View when you double-click an item in the member list:

  • "Show Definition" displays the source code where the item is defined.

  • "Show Declaration" displays the source code where the item is declared.

  • "Show Decl if no Defn" displays the code where the item is defined; if there is no definition, then the source code containing the declaration is displayed instead.

Browser View Popup Menus

The Browser View popup queries menus provide queries for currently selected items in the outline list areas. These menu are accessed by selecting an item and then holding down the right mouse button. Figure 10-18 shows all of the popup menus available in Browser View.

This section describes:

Many of the same queries in the class popup menus appear in more than one menu. To eliminate this redundancy, each query is described once and presented in a single list rather than by menu.

Figure 10-18. Queries Popup Menus in the C++ Browser View

Figure 10-18 Queries Popup Menus in the C++ Browser View

Data Members Popup Menu

The Data Members popup menu performs these queries on data members selected in the member display list:

Figure 10-19. Data Members Popup Menu

Figure 10-19 Data Members Popup Menu

"What Modifies" 


Highlights all methods and classes in which the selected data member is assigned a value.

"What Reads" 

Highlights all methods and classes in which the selected data member is read.

"What Accesses" 


Highlights all classes where the selected data member is assigned a value, read, or its address is taken.

"What Defines" 


Highlights the class that defines the selected data member.

"Show Source Where Defined" 


Displays the source code where the data is defined in a Source View window.

Methods Popup Menu

The Methods popup menu lets you perform the following queries on methods shown in Figure 10-20.

Figure 10-20. Queries on Methods Popup Menu

Figure 10-20 Queries on Methods Popup Menu

The Methods popup menu provides these queries:

"What Uses" 


Highlights all methods and classes that use the currently selected method.

"What Is Used" submenu 


Contains these menu items:

  • "All (method and data access)" highlights all data members, methods, and classes the currently selected method uses.

  • "Method Calls" highlights all methods called by the currently selected method.

  • "Data Access" highlights all data members that have been assigned, read, or had their address taken by the currently selected method.

  • "Data Modification" highlights all data members assigned by the currently selected method.

  • "Data Read" highlights all data members read by the currently selected method.

"Call Graph" submenu 


Contains these menu items:

  • "Add" adds the currently selected method and its calling structure to the Call Graph window, if one is open. If not, "Add" opens a Call Graph window before adding the method.

  • "Replace" replaces all methods in the display with the selected method and its calling structure in the Call Graph window.

  • "Remove" removes the currently selected method and its calling structure from the Call Graph window.

"What Declares" 


Highlights the class that declares the currently selected method.

"What Currently Defines" 


Highlights the class that provides the current definition for the method.

"What Else Defines" 


Highlights all classes that define the currently selected method.

"What Overloads" 


Highlights all methods and classes that overload the currently selected method.

Class Popup Menus

This section describes the popup menus available in the related class list display. These menus are shown in Figure 10-18. (Note that the queries menu that displays when you select <-This is not shown here; it's exactly the same as the main Queries menu shown in Figure 10-14.)

Many of the items in the class popup menus are common to more than one menu. To eliminate the redundancy of describing them in each menu, this section presents all the queries in a single list in alphabetical order. The menus they belong to are shown in parentheses. Here are the menu items:

"New Browser View" (all menus except Friend Functions) 


Opens a new Browser View window displaying the selected class.

"Show Source" (all menus) 


Opens a Source View window on a file containing the declaration of the selected item. The first line of the declaration is highlighted in the source.

"What Destroys" (Uses and Used By) 


Highlights all members of the current class that destroy the selected class.

"What Instantiates" (Uses and Used By) 


Highlights all members of the current class that instantiate the selected class.

"What Is Declared" (Base Classes) 


Highlights all methods declared by the selected base class.

"What Is Defined" (Base Classes) 


Highlights all members defined by the selected base class.

"What Is Overloaded" (Derived Classes) 


Highlights all members of the current class that are overloaded by the selected class.

"What Is Overridden" (Base Classes) 


Highlights all the methods of the selected base class that are overridden by the current class.

"What Is Overridden" (Derived Classes) 


Highlights all the methods of the current class that are overridden by the selected derived class.

"What Is Used" (Friends) 


Highlights all members of the current class that the selected friend class uses.

"What Is Used" (Derived Classes and Used By Classes) 


Figure 10-21. "What Is Used" SubmenuCurrent Class Pop-Up Menu

Figure 10-21 "What Is Used" SubmenuCurrent Class Pop-Up Menu

Contains these queries in the submenu (see Figure 10-7):

  • "by Accessing Any Member" highlights all members (of the current class) that the selected class uses.

  • "by Calling Methods" highlights all methods (of the current class) that the selected class uses.

  • "by Accessing Data Members" highlights all data members (of the current class) that the selected class modifies, reads, or takes the address of.

  • "by Modifying Data Members" highlights all data members (of the current class) to which the selected class assigns a value.

  • "by Reading Data Members" highlights all data members (of the current class) from which the selected class reads a value.

"What It Uses" (Friend Function) 


Highlights all members of the current class that the selected friend function uses.

"What Uses" (Friend of Class) 


Highlights all members of the current class that use the friend class.

"What Uses" submenu (Uses Classes) 


Contains these queries in the submenu (see Figure 10-7):

Figure 10-22. "What Uses" SubmenuCurrent Class Pop-Up Menu

Figure 10-22 "What Uses" SubmenuCurrent Class Pop-Up Menu

  • "by Accessing Any Member" highlights all members (of the current class) that use the selected class.

  • "by Calling Methods" highlights all methods (of the current class) that use the methods of the selected class.

  • "by Accessing Data" highlights all data members (of the current class) that modify, read, or take the address of data members of the selected class.

  • "by Modifying Data" highlights all data members (of the current class) that assign a value to data members of the selected class.

  • "by Reading Data" highlights all data members (of the current class) that read a value from data members of the selected class.

Graph Views Window

The Browser provides the Graph Views window, a graphical view for showing relationships between classes in the fileset (see Figure 10-23). It depicts classes as nodes and relationships as arcs. The Graph Views window can show four types of class relationships:

  • Inheritance

  • Containment

  • Interaction

  • Friends

    Figure 10-23. Graph Views Window Showing Inheritance Relationships

    Figure 10-23 Graph Views Window Showing Inheritance Relationships

Setting Graph Views Relationships

You can display the graphical views by selecting any of the following items from the Views menu of the Browser View window:

  • "Show Inheritance Graph"

  • "Show Containment Graph"

  • "Show Interaction Graph"

  • "Show Friends Graph"

Once the Graph Views window is displayed, you can switch to any of the other relationships by using the Relationship menu at the bottom right of the Graph Views window (see Figure 10-23).

Graph Views Admin Menu

Figure 10-24. "Save Graph" Submenu of Admin Menu

Figure 10-24 "Save Graph" Submenu of Admin Menu

The Graph Views Admin menu contains two commands:

"Save Graph" 

Allows you to save the graph to a file. It brings up the file selection dialog shown in Figure 10-24. When you select your file and click OK, you save the graph as a PostScript® file with the name specified in "Selection."

"Close" 

Closes the Graph Views window.

Graph Views Window Views Menu

The Graph Views window Views menu (see Figure 10-23) commands control which classes included in the current fileset are displayed in the Graph Views window. The choices are:

"Show All" 

Displays all classes included in the fileset as nodes, and their relations as arcs, as chosen from the relationship option menu.

"Show All Related" 


Displays only those classes included in the chain of relations, which includes the current class.

"Show Butterfly" 


Displays only those classes that are the immediate relatives (for example, parents and children for an inheritance relation of the current class).

Mouse Manipulations

Double-clicking any subject in the Graph Views window causes it to become the new current subject in both the Browser View and Graph Views windows.

Call Graph Window

The Call Graph window shows all calls made from selected methods in the member list, including calls made from its target methods. You can invoke it by

  • selecting "Call Graph" from the Views menu in Browser View

  • selecting a method in the member list, displaying the Methods popup menu, and selecting "Call Graph:Add." This displays the Call Graph window the first time and adds new methods to the graph each time you select "Call Graph:Add."

Figure 10-25 illustrates the second method for displaying Call Graph. The user has selected the initialize method in the Browser window and then selected "CallGraph:Add" from the Methods popup menu. The initialize method now appears in the Call Graph window with the methods that it calls.

Figure 10-25. Displaying a Selected Method in Call Graph

Figure 10-25 Displaying a Selected Method in Call Graph

Using the Call Graph Window

You add, replace, or remove methods in the Call Graph by choosing from the Call Graph submenu in the Methods popup menu in the Browser View member list (see Figure 10-25), as follows:

  • "Add" adds the currently selected method and its calling structure to the Call Graph window, if one is open. If not, "Add" opens a Call Graph window and then adds the method.

  • "Replace" replaces all methods in the display with the selected method and its calling structure in the Call Graph window.

  • "Remove" removes the currently selected method and its calling structure from the Call Graph window.

The action you request is displayed in the message area in Browser View. In the Call Graph window, there is also a message area that identifies the method and its arguments.

In the Call Graph window, double-clicking any method node opens a Source View window displaying the code that defines the method. The definition is highlighted in the source.

For information on manipulating graphs, see Appendix A, "Using Graphical Views," in the ProDev WorkShop Overview.

Call Graph Admin Menu

The Call Graph window's Admin menu contains the following selections:

"Show Arglist" toggle 


Lets you display or hide the argument list for each method, as shown in Figure 10-25.

"Clear" 

Removes all methods from the Call Graph window.

"Save Graph" 

Displays a file selection dialog for saving the graph to a PostScript file.

"Close" 

Closes the Call Graph window.