cgraph_annotation simplified and ported to be more C++.