Convert C code to C++

Analyse the call graph to identify potential classes to be factored out of C code.

Workflow

Create the call graph

Create a DGML file using a tool for reading the source code, for example

DeepEnds ReadCpp extract=callgraph output=C:\project\callgraph.dgml C:\project\source.sln

Note that the analyser expects C++ style structs.

Create clusters

Run the cluster tool, for example,

DeepEnds ReportClusters --output=C:\project\clusters.dgml C:\project\callgraph.dgml

Move nodes

Open the clusters file in the DGML editor of Visual Studio. The clusters that have been extracted will have been placed in numbered groups.

Find a cluster of interest and move it around between groups that it is connected to. Move nodes into that cluster until satisfied with an outline class.

Create classes

Move the code around to be consistent with the outline class diagram.