// file: gc_latnode_0.cc
// 

// isip include files
//
#include "grammar_compiler.h"
#include "grammar_compiler_constants.h"

// method: create_latnode_cc
//  
// arguments:
//
// char_1* word_name : the name of the given word
// int_4& num_nodes : number of lattice nodes
// Lattice*& lattice : the lattice
//
// return: a lattice node
//
// this method create a lattice node given a word
//
Lattice_node* create_latnode_cc(char_1* word_name_a, int_4& num_nodes_a,
				Lattice*& lattice_a) {

   // memory manager
  //
  Memory_manager* manager = Link_list::get_manager_cc();
  Lattice_node* latn = manager->new_lat_cc();
  latn->set_node_index_cc(num_nodes_a++);
   
  // set the word information
  //
  Word* word = new Word();
  word->set_name_cc(word_name_a);
  latn->set_word_cc(word);
   
  lattice_a->set_lat_node_cc(latn);
  
  return latn;
}
