/*
 * File automatically generated by
 * gengen 1.4.3 by Lorenzo Bettini 
 * http://www.gnu.org/software/gengen
 */

#ifndef EXTERN_FUNCTION_LUA_GEN_CLASS_H
#define EXTERN_FUNCTION_LUA_GEN_CLASS_H

#include <string>
#include <iostream>

using std::string;
using std::ostream;

class extern_function_lua_gen_class
{
 protected:
  string name;

 public:
  extern_function_lua_gen_class()
  {
  }
  
  extern_function_lua_gen_class(const string &_name) :
    name (_name)
  {
  }

  void set_name(const string &_name)
  {
    name = _name;
  }

  void generate_extern_function_lua(ostream &stream, unsigned int indent = 0)
  {
    string indent_str (indent, ' ');
    indent = 0;
  
    stream << "\n";
    stream << indent_str;
    stream << "generate_";
    stream << name;
    stream << " = function(stream, record, indent)";
    stream << "\n";
    stream << indent_str;
    stream << "--[[";
    stream << "\n";
    stream << indent_str;
    stream << "    This call back function will be executed if 'var'";
    stream << "\n";
    stream << indent_str;
    stream << "    associated with type 'method' is 'nil'. You could";
    stream << "\n";
    stream << indent_str;
    stream << "    add your Lua code here.";
    stream << "\n";
    stream << indent_str;
    stream << "--]]";
    stream << "\n";
    stream << indent_str;
    stream << "end";
    stream << "\n";
    stream << indent_str;
    stream << "\n";
    stream << indent_str;
  }
};

#endif // EXTERN_FUNCTION_LUA_GEN_CLASS_H
