The private key class is located in
src/key.h and is called
CPrivKey. It contains the functions that make a signature and extract the public key (the result of which is usually cached as it takes a long time to run). And in
walletdb.cpp is the function that writes the public and (encrypted) private keys to the wallet.dat file, which is just a Berkeley database. It also has a big function that reads al of the database keys from the wallet.dat, including the
encrypted private keys.
And to answer your question,
here is where the actual wallet structure is created inside the program. As you can see, it sets its password to blank first, calls the unlock function for it, and then generates the initial private keys within
SetupGeneration(), sets a "seed" (not a mnemonic phrase) for the purposes of deriving keys from the newly created HD wallet, and creates an
empty keypool for it with a no keys inside.