Quintessoft
Programming tools > Modules

Modules

PROJECTS AND MODULES

The most-used left pane view shows the primary structure of a Code Navigator for C++ repository: the repository contains projects (which typically correspond to linker targets like .exe or .dll files, projects contain modules (matched pairs of C++ files, *.h and *.cpp), and modules contain code in the form of functions, classes, macros, variables, type synonyms, etc. Classes further contain their own variables, functions, enumerations, types, and if necessary, raw C++ text.

As an example, the main screen from the previous page shows four projects, "BankAccount," "Libraries," "MatrixMath," and "Motors." Some of the projects are expanded to show their contents, such as module ServoMotor containing class ServoMotor.

 
CLASS INHERITANCE

Another very useful way to view the overall structure of a repository is through the class inheritance diagram. The figure at left shows part of the left pane class inheritance tree for a sample repository that ships with Code Navigator. For example, the class Account has two derived classes each of which also has two further derived classes.

If your hierarchy of C++ classes makes use of multiple inheritance, a derived class with multiple bases will appear in more than one place in the tree. This view provides a quick way to judge the complexity of a framework design as well as a natural way to view the repository in a class-centric way.

As with all the other left pane views, whatever is selected here will be shown in greater detail on the right.

 
MODULE DEPENDENCIES

Managing large-scale C++ projects often boils down to managing the dependencies between modules in a system of code. In Code Navigator you explicitly create module dependencies (C++ #include statements or name declarations) and can explicitly view the chain of dependencies for the modules in your system.

The view at right shows some of the module dependencies in the Motors project of the sample repository. Branching down from each module in the tree are the modules on which that module depends. The level of the dependency can be set precisely. The implementation of a module may depend only on the names in another module or on that module's full definitions. The interface of a module may independently have either of these dependency levels or none at all. Code Navigator automatically puts the #include statements in the right place or adds forward-declared class names. This improves compile and link dependencies between modules, reduces compile times, and often provides for better designed code.

 

 
 

powered by CMSimple.dk