The code base for the simulation of Shor's algorithm consists of four files.
complex.cpp: This file contains the simple complex number class for storing state information about the quantum memory register in the simulation.
qureg.cpp: This file contains the quantum register class that simulates the behavior of the quantum memory register in Shor's algorithm. It is generic enough that it may be made to simulate any quantum memory register, although what happens in the event of a collapse not due to the direct measurement of the register is left to the programmer to perform. An example of such a collapse that is the collapse of the first partition of Shor's quantum memory register in step 7 of his algorithm.
shor.cpp: This is the main body of the simulation, which contains the Steps of Shor's algorithm as described above.
util.cpp: This is a library of useful functions used by shor.cpp