Your 'C' and 'C++' programs use Local, Parameter, Global, and Define Identifiers.
Depending on how you want to look at things, CDOC or CREF produce either:
- System level reports ("where is XYZ used throughout my code"), or...
- Function level reports ("what identifiers are used in function ABC").
Depending on the level of detail you want, CDOC produces either:
- Summary reports (just lists identifiers and functions), or...
- XREF detailed cross-references (list of every line using the identifier).
As well, 'C++' uses Classes, and CDOC will analyze and document the class hierarchy.
For our simple example programs "EXAMPLE.C" and "EXAM_CPP.CPP":
[return to HomePage Contents] [backup to CREF]

The CDOC or CREF System Summary produces an alphabetic list of every identifier
encountered throughout the entire collection of user 'C' or 'C++' source code.
Processing our simple EXAMPLE.C and EXAMPLE1.C files yields the file "EXAMPLE.REF":
Global/Define/Local/Param, System SUMMARY (1 of 3)
**************************************************
c PARAM fahren 8 EXAMPLE1.C
c PARAM prt_line 20 EXAMPLE1.C
c_temp LOCAL main 18 EXAMPLE.C
count LOCAL main 16 EXAMPLE.C
f LOCAL fahren 10 EXAMPLE1.C
f PARAM prt_line 20 EXAMPLE1.C
f_temp LOCAL main 17 EXAMPLE.C
factor_1 DEFIN (null) 4 EXAMPLE.C
factor_2 GLOBL (null) 5 EXAMPLE.C
Locals/Parameters only are shown in report 2of3, and Globals/Defines only
are shown in report 3of3 (neither of these are show here to conserve space).
The above report shows that a local/parameter variable "c" and "f" happen
to be defined in both the functions "fahren" and "prt_line",
but they are independent (since they are LOCAL rather than GLOBAL variables).
[return to HomePage Contents] [backup to CREF]

The CDOC or CREF Function XREF report, like the Function Summary report,
alphabetically lists each defined function, and within each function it lists
all the identifiers used.
The detailed cross-reference table shows the declaration function, file,
and line number where each identifier is declared, followed by a detailed
cross-reference of all line numbers referencing that identifier within that function:
Local/Param/Global Variables/Constants, Function XREF
*****************************************************
-------------------------------------------------------------------------------
FUNCT:
DEFIN: factor_1 4 : 4
GLOBL: factor_2 5 : 5
-------------------------------------------------------------------------------
FUNCT: fahren FILE=EXAMPLE1.C LINE=6
DEFIN: factor_1 0 : 12
GLOBL: factor_2 0 : 12
PARAM: c 8 : 6 8 12
LOCAL: f 10 : 10 12 13
-------------------------------------------------------------------------------
FUNCT: main FILE=EXAMPLE.C LINE=14
LOCAL: c_temp 18 : 18 24 25 26 27 30
count 16 : 16 22 22 22 24
f_temp 17 : 17 25 27 30
-------------------------------------------------------------------------------
FUNCT: prt_line FILE=EXAMPLE1.C LINE=18
PARAM: c 20 : 18 20 22 23 25
f 20 : 18 20 22
-------------------------------------------------------------------------------
[return to HomePage Contents] [backup to CREF]

CDOC or CREF will produce a C++ Class-Hierarchy Tree-Diagram which is nearly
identical in form to CCALL function caller/called tree-diagrams, but it shows
the class inheritance structure (including support for multiple inheritance).
Class TREEs (of Class Hierarchy Structure)
******************************************
3 CLASSTST.CPP 1 object (ABSTRACT)
9 CLASSTST.CPP 2 |<-alive
12 CLASSTST.CPP 3 | |<-animal
6 CLASSTST.CPP 4 |<-properties
12 CLASSTST.CPP 5 | |<-animal { 3 }
13 CLASSTST.CPP 6 | |<-machine
[return to HomePage Contents] [backup to CREF]

Graphic Class-Hierarchy (CBROWSE)
The C++ class-hierarchy tree can also be graphically viewed
in various formats using our Windows3.1 based CBROWSE program:
[return to HomePage Contents] [backup to CREF]

Class Instances and Methods on Class-Hierarchy
C++ Class Instances on Class-Hierarchy Tree-Diagram
CDOC can add class instances within functions to the C++
Class-Hierarchy Tree-Diagram (instance "bear" of class "animal"
within function "main" is shown as "..bear <main()>" ).
Class TREEs (of Class Hierarchy Structure)
******************************************
3 EXAM_CPP.CPP 1 object (ABSTRACT)
12 EXAM_CPP.CPP 2 |<-alive
19 EXAM_CPP.CPP 3 | |<-animal
23 EXAM_CPP.CPP 4 | | |..bear
7 EXAM_CPP.CPP 5 |<-properties
19 EXAM_CPP.CPP 6 | |<-animal { 3 }
20 EXAM_CPP.CPP 7 | |<-machine
21 EXAM_CPP.CPP 8 | | |<-truck
23 EXAM_CPP.CPP 9 | | | |..ford
C++ Class Methods on Class-Hierarchy Tree-Diagram
CDOC can add class methods to the C++
Class-Hierarchy Tree-Diagram (method "speak" of class "animal"
is shown as "..bear::speak()" ).
Class TREEs (of Class Hierarchy Structure)
******************************************
3 EXAM_CPP.CPP 1 object (ABSTRACT)
2 |..object::exist()
12 EXAM_CPP.CPP 3 |<-alive
16 EXAM_CPP.CPP 4 | |..alive::speak()
19 EXAM_CPP.CPP 5 | |<-animal
7 EXAM_CPP.CPP 6 |<-properties
7 | |..properties::speed()
19 EXAM_CPP.CPP 8 | |<-animal { 5 }
20 EXAM_CPP.CPP 9 | |<-machine
21 EXAM_CPP.CPP 10 | | |<-truck
[return to HomePage Contents] [backup to CREF]
[next document CMETRIC]

SoftWare BlackSmiths Inc, 6064 St Ives Way, Mississauga ON, Canada L5N-4M1
WWW = http://www.swbs.com
eMail = email@swbs.com
Voice/Fax = (905)-858-4466
You are the
visitor to this page. We just reset our hit-counter aug2001
MAIN WEBPAGE INDEX: (back to the main index).