# Copyright (C) 2001 Tobias Peters <t-peters@berlios.de>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA  02111-1307, USA.

require "code_creation/idl_attribute.rb"
require "code_creation/idl_constant.rb"
require "code_creation/idl_exception.rb"
require "code_creation/idl_interface.rb"
require "code_creation/idl_method.rb"
require "code_creation/idl_module.rb"
require "code_creation/idl_parameter.rb"
require "code_creation/knowledge.rb"

puts ("/*")
rbdom_module = Idl_Module.new(File.open("dom.idl","r"))
puts ("*/")


gdome_ruby_c = File.new("gdome-ruby.c", File::CREAT|File::TRUNC|File::WRONLY)

gdome_ruby_c.puts ("/*
# Copyright (C) 2001 Tobias Peters <t-peters@berlios.de>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA  02111-1307, USA.
*/")

gdome_ruby_c.puts ("\n#include <ruby.h> \n" +
		   "\n#include <gdome.h>\n")

rbdom_module.create_ruby_code(gdome_ruby_c)
