GraphNodePtrNN makeNewLeaf(AlertPtrNN alert, const unsigned int id) { IO::ConnectionPtrNN conn( IO::create() ); IO::Transaction t( conn->createNewTransaction("make_leaf_trans") ); GraphNodePtrNN graphNode( new GraphNode(alert, id, conn, t) ); t.commit(); return graphNode; }
GraphNodePtrNN makeNewNode(GraphNodePtrNN child1, GraphNodePtrNN child2, unsigned int id) { ::Persistency::IO::ConnectionPtrNN conn( ::Persistency::IO::create() ); IO::Transaction t( conn->createNewTransaction("make_node_transaction") ); const ::Persistency::NodeChildrenVector ncv(child1, child2); GraphNodePtrNN graphNode( new GraphNode( makeNewMetaAlert("some meta-alert", id), conn, t, ncv) ); t.commit(); return graphNode; }
void TreeNode::print() { // leftSubtree->print(); graphNode()->print(); // rightSubtree->print(); }