Algorithm for generating all unlabeled trees with n nodes?
Here is some python code 
https://gist.github.com/hagberg/7979081

I would start with all the trees size N-1 appending a new node to each of the nodes
The tricky part is to identify whether each new tree is truly new and not isomorphic to previously generated trees. I'm guessing you need a system to code this topologies to detect symmetries. 
I'd try to find the longest path
Longest path in an undirected tree with only one traversal
and find a deterministic way to represent the graph

This now gone project to verify the graceful Tree conjecture contains some c++ code that might help you 
https://web.archive.org/web/20120729224449/http://www.eleves.ens.fr/home/wfang/gtv/index_en.html