#ifdef VHDL

/*
 * $Id: Vhdl_generate_file_package.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Vhdl.h"
#include <sstream>
#include <fstream>

namespace morpheo              {
namespace behavioural          {

  void Vhdl::generate_file_package(void)
  {
    log_printf(FUNC,Behavioural,"generate_file_package","Begin");

    std::string name     = _name + "_Pack";
    std::string filename =  name + ".vhdl";

    std::cout << "Generate file \""<< filename << "\"" << std::endl;

    std::ofstream file;
    file.open(filename.c_str(),std::ios::out | std::ios::trunc);

    file << get_package (0,filename, name, _name);

    file.close();

    log_printf(FUNC,Behavioural,"generate_file_package","End");
  };
  
}; // end namespace behavioural          
}; // end namespace morpheo              

#endif
