src/Generic/theories/Parse.cpp
// Helper that registers the identifier for each node in the tree.
// node_id_counter is an in/out parameter used to assign unique identifiers
// following a depth-first traversal.

Helper that registers the identifier for each node in the tree.
node_id_counter is an in/out parameter used to assign unique identifiers
following a depth-first traversal.
Helper that registers the identifier for each node in the tree . node_id_counter is an in / out parameter used to assign unique identifiers following a depth - first traversal .
void Parse::assignTreebankNodeIds(const SynNode *node, SerifXML::XMLIdMap *idMap, 
								  const std::wstring &prefix, int &node_id_counter) const 
{
	using namespace SerifXML;
	std::wstringstream id;
	id << prefix << node_id_counter++;
	idMap->registerId(transcodeToXString(id.str().c_str()).c_str(), node);
	for (int i=0; i<node->getNChildren(); ++i) {
		assignTreebankNodeIds(node->getChild(i), idMap, prefix, node_id_counter);
	}
}
void Parse :: assignTreebankNodeIds ( const SynNode * node , SerifXML :: XMLIdMap * idMap , const std :: wstring & prefix , int & node_id_counter ) const { using namespace SerifXML ; std :: wstringstream id ; id << prefix << node_id_counter ++ ; idMap -> registerId ( transcodeToXString ( id . str ( ) . c_str ( ) ) . c_str ( ) , node ) ; for ( int i = 0 ; i < node -> getNChildren ( ) ; ++ i ) { assignTreebankNodeIds ( node -> getChild ( i ) , idMap , prefix , node_id_counter ) ; } }
Helper that registers the identifier for each node in the tree.
Helper that registers the identifier for each node in the tree .