/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.4
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#define SWIGLUA
#define SWIG_LUA_MODULE_GLOBAL


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif 
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif


/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  
  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/* 
   Flags/methods for returning states.
   
   The SWIG conversion methods, as ConvertPtr, return an integer 
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).
   
   Use the following macros/flags to set or process the returning
   states.
   
   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }
    
   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {         
        if (<obj is ok>) {			       
          if (<need new object>) {		       
            *ptr = <ptr to new allocated object>; 
            return SWIG_NEWOBJ;		       
          } else {				       
            *ptr = <ptr to old object>;	       
            return SWIG_OLDOBJ;		       
          } 				       
        } else {				       
          return SWIG_BADOBJ;		       
        }					       
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call
 
      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0) 
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) { 
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) { 
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
}
#else /* no cast-rank mode */
#  define SWIG_AddCast
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/* 
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}


/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/* 
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/* 
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/* 
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;
  
  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }    
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}
  
/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start, 
                            swig_module_info *end, 
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {	    
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start, 
                     swig_module_info *end, 
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }
  
  /* neither found a match */
  return 0;
}

/* 
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/* 
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else 
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/* 
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * luarun.swg
 *
 * This file contains the runtime support for Lua modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

#include "lua.h"
#include "lauxlib.h"
#include <stdlib.h>  /* for malloc */
#include <assert.h>  /* for a few sanity tests */

/* -----------------------------------------------------------------------------
 * global swig types
 * ----------------------------------------------------------------------------- */
/* Constant table */
#define SWIG_LUA_INT     1
#define SWIG_LUA_FLOAT   2
#define SWIG_LUA_STRING  3
#define SWIG_LUA_POINTER 4
#define SWIG_LUA_BINARY  5
#define SWIG_LUA_CHAR    6

/* Structure for variable linking table */
typedef struct {
  const char *name;
  lua_CFunction get;
  lua_CFunction set;
} swig_lua_var_info;

/* Constant information structure */
typedef struct {
    int type;
    char *name;
    long lvalue;
    double dvalue;
    void   *pvalue;
    swig_type_info **ptype;
} swig_lua_const_info;

typedef struct {
  const char     *name;
  lua_CFunction   method;
} swig_lua_method;

typedef struct {
  const char     *name;
  lua_CFunction   getmethod;
  lua_CFunction   setmethod;
} swig_lua_attribute;

typedef struct swig_lua_class {
  const char    *name;
  swig_type_info   **type;
  lua_CFunction  constructor;
  void    (*destructor)(void *);
  swig_lua_method   *methods;
  swig_lua_attribute     *attributes;
  struct swig_lua_class **bases;
  const char **base_names;
} swig_lua_class;

/* this is the struct for wrappering all pointers in SwigLua
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  void        *ptr;
} swig_lua_userdata;

/* this is the struct for wrapping arbitary packed binary data
(currently it is only used for member function pointers)
the data ordering is similar to swig_lua_userdata, but it is currently not possible
to tell the two structures apart within SWIG, other than by looking at the type
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  char data[1];       /* arbitary amount of data */    
} swig_lua_rawdata;

/* Common SWIG API */
#define SWIG_NewPointerObj(L, ptr, type, owner)       SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
#define SWIG_ConvertPtr(L,idx, ptr, type, flags)    SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname)  SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(L, idx, ptr, sz, ty)       SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
#define SWIG_NewMemberObj(L, ptr, sz, type)      SWIG_Lua_NewPackedObj(L, ptr, sz, type)

/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*

/* Contract support */
#define SWIG_contract_assert(expr, msg)  \
  if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else

/* helper #defines */
#define SWIG_fail {goto fail;}
#define SWIG_fail_arg(func_name,argnum,type) \
  {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
  func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
  goto fail;}
#define SWIG_fail_ptr(func_name,argnum,type) \
  SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
#define SWIG_check_num_args(func_name,a,b) \
  if (lua_gettop(L)<a || lua_gettop(L)>b) \
  {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
  goto fail;}


#define SWIG_Lua_get_table(L,n) \
  (lua_pushstring(L, n), lua_rawget(L,-2))

#define SWIG_Lua_add_function(L,n,f) \
  (lua_pushstring(L, n), \
      lua_pushcfunction(L, f), \
      lua_rawset(L,-3))

/* special helper for allowing 'nil' for usertypes */
#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))

#ifdef __cplusplus
/* Special helper for member function pointers 
it gets the address, casts it, then dereferences it */
//#define SWIG_mem_fn_as_voidptr(a)  (*((char**)&(a)))
#endif

/* storing/access of swig_module_info */
SWIGRUNTIME swig_module_info *
SWIG_Lua_GetModule(lua_State* L) {
  swig_module_info *ret = 0;
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_rawget(L,LUA_REGISTRYINDEX);
  if (lua_islightuserdata(L,-1))
    ret=(swig_module_info*)lua_touserdata(L,-1);
  lua_pop(L,1);  /* tidy */
  return ret;
}

SWIGRUNTIME void
SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
  /* add this all into the Lua registry: */
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_pushlightuserdata(L,(void*)module);
  lua_rawset(L,LUA_REGISTRYINDEX);
}

/* -----------------------------------------------------------------------------
 * global variable support code: modules
 * ----------------------------------------------------------------------------- */

/* this function is called when trying to set an immutable.
default value is to print an error.
This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
{
/*  there should be 1 param passed in: the new value */
#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
  lua_pop(L,1);  /* remove it */
  lua_pushstring(L,"This variable is immutable");
  lua_error(L);
#endif
    return 0;   /* should not return anything */
}

/* the module.get method used for getting linked data */
SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  printf("SWIG_Lua_module_get %p(%s) '%s'\n",
   lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
   lua_tostring(L,2));
*/
  /* get the metatable */
  assert(lua_istable(L,1));  /* just in case */
  lua_getmetatable(L,1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get");  /* get the .get table */
  lua_remove(L,3);  /* remove metatable */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .get table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,3);  /* remove .get */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_call(L,0,1);
      return 1;
    }
    lua_pop(L,1);  /* remove the top */
  }
  lua_pop(L,1);  /* remove the .get */
  lua_pushnil(L);  /* return a nil */
    return 1;
}

/* the module.set method used for setting linked data */
SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
*/
  /* get the metatable */
  assert(lua_istable(L,1));  /* just in case */
  lua_getmetatable(L,1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".set");  /* get the .set table */
  lua_remove(L,4);  /* remove metatable */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,4);  /* remove .set */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,1,0);
      return 0;
    }
  }
  lua_settop(L,3);  /* reset back to start */
  /* we now have the table, key & new value, so just set directly */
  lua_rawset(L,1);  /* add direct */
  return 0;
}

/* registering a module in lua. Pushes the module table on the stack. */
SWIGINTERN void  SWIG_Lua_module_begin(lua_State* L,const char* name)
{
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushstring(L,name);
  lua_newtable(L);   /* the table */
  /* add meta table */
  lua_newtable(L);    /* the meta table */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
  lua_pushstring(L,".get");
  lua_newtable(L);    /* the .get table */
  lua_rawset(L,-3);  /* add .get into metatable */
  lua_pushstring(L,".set");
  lua_newtable(L);    /* the .set table */
  lua_rawset(L,-3);  /* add .set into metatable */
  lua_setmetatable(L,-2);  /* sets meta table in module */
#ifdef SWIG_LUA_MODULE_GLOBAL
  /* If requested, install the module directly into the global namespace. */
  lua_rawset(L,-3);        /* add module into parent */
  SWIG_Lua_get_table(L,name);   /* get the table back out */
#else
  /* Do not install the module table as global name. The stack top has
     the module table with the name below. We pop the top and replace
     the name with it. */
  lua_replace(L,-2);
#endif
}

/* ending the register */
SWIGINTERN void  SWIG_Lua_module_end(lua_State* L)
{
  lua_pop(L,1);       /* tidy stack (remove module) */
}

/* adding a linked variable to the module */
SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  lua_getmetatable(L,-1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* should be a table: */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)  /* if there is a set fn */
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* should be a table: */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
  lua_pop(L,1);       /* tidy stack (remove meta) */
}

/* adding a function module */
SWIGINTERN void  SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
{
  SWIG_Lua_add_function(L,name,fn);
}

/* -----------------------------------------------------------------------------
 * global variable support code: classes
 * ----------------------------------------------------------------------------- */

/* the class.get method, performs the lookup of class attributes */
SWIGINTERN int  SWIG_Lua_class_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  assert(lua_isuserdata(L,-2));  /* just in case */
  lua_getmetatable(L,-2);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  /* look for the key in the .get table */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);
  lua_remove(L,-2); /* stack tidy, remove .get table */
  if (lua_iscfunction(L,-1))
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_call(L,1,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);  /* look for the fn */
  lua_remove(L,-2); /* stack tidy, remove .fn table */
  if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
  {  /* found it so return the fn & let lua call it */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* NEW: looks for the __getitem() fn
  this is a user provided get fn */
  SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
  if (lua_iscfunction(L,-1))  /* if its there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_pushvalue(L,2);  /* the parameter */
    lua_call(L,2,1);  /* 2 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  return 0;  /* sorry not known */
}

/* the class.set method, performs the lookup of class attributes */
SWIGINTERN int  SWIG_Lua_class_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
      lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
      lua_tostring(L,2),
      lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/

  assert(lua_isuserdata(L,1));  /* just in case */
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */

  SWIG_Lua_get_table(L,".set"); /* find the .set table */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,1);  /* userdata */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,2,0);
      return 0;
    }
    lua_pop(L,1);  /* remove the value */
  }
  lua_pop(L,1);  /* remove the value .set table */
  /* NEW: looks for the __setitem() fn
  this is a user provided set fn */
  SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
  if (lua_iscfunction(L,-1))  /* if its there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_pushvalue(L,2);  /* the parameter */
    lua_pushvalue(L,3);  /* the value */
    lua_call(L,3,0);  /* 3 values in ,0 out */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  return 0;
}

/* the class.destruct method called by the interpreter */
SWIGINTERN int  SWIG_Lua_class_destruct(lua_State* L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata* usr;
  swig_lua_class* clss;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
  /* if must be destroyed & has a destructor */
  if (usr->own) /* if must be destroyed */
  {
    clss=(swig_lua_class*)usr->type->clientdata;  /* get the class */
    if (clss && clss->destructor)  /* there is a destroy fn */
    {
      clss->destructor(usr->ptr);  /* bye bye */
    }
  }
  return 0;
}

/* gets the swig class registry (or creates it) */
SWIGINTERN void  SWIG_Lua_get_class_registry(lua_State* L)
{
  /* add this all into the swig registry: */
  lua_pushstring(L,"SWIG");
  lua_rawget(L,LUA_REGISTRYINDEX);  /* get the registry */
  if (!lua_istable(L,-1))  /* not there */
  {  /* must be first time, so add it */
    lua_pop(L,1);  /* remove the result */
    lua_pushstring(L,"SWIG");
    lua_newtable(L);
    lua_rawset(L,LUA_REGISTRYINDEX);
    /* then get it */
    lua_pushstring(L,"SWIG");
    lua_rawget(L,LUA_REGISTRYINDEX);
  }
}

/* helper fn to get the classes metatable from the register */
SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
{
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,cname);  /* get the name */
  lua_rawget(L,-2);    /* get it */
  lua_remove(L,-2);    /* tidy up (remove registry) */
}

/* helper add a variable to a registered class */
SWIGINTERN void  SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* just in case */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
}

/* helper to recursively add class details (attributes & operations) */
SWIGINTERN void  SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
{
  int i;
  /* call all the base classes first: we can then override these later: */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_add_class_details(L,clss->bases[i]);
  }
  /* add fns */
  for(i=0;clss->attributes[i].name;i++){
    SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
  }
  /* add methods to the metatable */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;clss->methods[i].name;i++){
    SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
  }
  lua_pop(L,1);       /* tidy stack (remove table) */
  /*   add operator overloads
    these look ANY method which start with "__" and assume they
    are operator overloads & add them to the metatable
    (this might mess up is someone defines a method __gc (the destructor)*/
  for(i=0;clss->methods[i].name;i++){
    if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
      SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
    }
  }
}

/* set up the base classes pointers.
Each class structure has a list of pointers to the base class structures.
This function fills them.
It cannot be done at compile time, as this will not work with hireachies
spread over more than one swig file. 
Therefore it must be done at runtime, querying the SWIG type system.
*/
SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
{
  int i=0;
  swig_module_info* module=SWIG_GetModule(L);
  for(i=0;clss->base_names[i];i++)
  {
    if (clss->bases[i]==0) /* not found yet */
    {
      /* lookup and cache the base class */
      swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
      if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
    }
  }	
}

/* performs the entire class registration process */
SWIGINTERN void  SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
{
  /*  add its constructor to module with the name of the class
  so you can do MyClass(...) as well as new_MyClass(...)
  BUT only if a constructor is defined
  (this overcomes the problem of pure virtual classes without constructors)*/
  if (clss->constructor)
    SWIG_Lua_add_function(L,clss->name,clss->constructor);

  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->name);  /* get the name */
  lua_newtable(L);    /* create the metatable */
  /* add string of class name called ".type" */
  lua_pushstring(L,".type");
  lua_pushstring(L,clss->name);
  lua_rawset(L,-3);
  /* add a table called ".get" */
  lua_pushstring(L,".get");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".set" */
  lua_pushstring(L,".set");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".fn" */
  lua_pushstring(L,".fn");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add accessor fns for using the .get,.set&.fn */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
  SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
  /* add it */
  lua_rawset(L,-3);  /* metatable into registry */
  lua_pop(L,1);      /* tidy stack (remove registry) */

  SWIG_Lua_get_class_metatable(L,clss->name);
  SWIG_Lua_add_class_details(L,clss);  /* recursive adding of details (atts & ops) */
  lua_pop(L,1);      /* tidy stack (remove class metatable) */
}

/* -----------------------------------------------------------------------------
 * Class/structure conversion fns
 * ----------------------------------------------------------------------------- */

/* helper to add metatable to new lua object */
SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
{
  if (type->clientdata)  /* there is clientdata: so add the metatable */
  {
    SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
    if (lua_istable(L,-1))
    {
      lua_setmetatable(L,-2);
    }
    else
    {
      lua_pop(L,1);
    }
  }
}

/* pushes a new object into the lua stack */
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
{
  swig_lua_userdata* usr;
  if (!ptr){
    lua_pushnil(L);
    return;
  }
  usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata));  /* get data */
  usr->ptr=ptr;  /* set the ptr */
  usr->type=type;
  usr->own=own;
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
}

/* takes a object from the lua stack & converts it into an object of the correct type
 (if possible) */
SWIGRUNTIME int  SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
{
  swig_lua_userdata* usr;
  swig_cast_info *cast;
  if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;}    /* special case: lua nil => NULL pointer */
  usr=(swig_lua_userdata*)lua_touserdata(L,index);  /* get data */
  if (usr)
  {
    if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
    {
        usr->own=0;
    }
    if (!type)            /* special cast void*, no casting fn */
    {
      *ptr=usr->ptr;
      return SWIG_OK; /* ok */
    }
    cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
    if (cast)
    {
      int newmemory = 0;
      *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
      return SWIG_OK;  /* ok */
    }
  }
  return SWIG_ERROR;  /* error */
}

SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
       int argnum,const char* func_name){
  void* result;
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
    lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n",
      func_name,(type && type->str)?type->str:"void*",argnum);
    lua_error(L);
  }
  return result;
}

/* pushes a packed userdata. user for member fn pointers only */
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata* raw;
  assert(ptr); /* not acceptable to pass in a NULL value */
  raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size);  /* alloc data */
  raw->type=type;
  raw->own=0;
  memcpy(raw->data,ptr,size); /* copy the data */
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
}
    
/* converts a packed userdata. user for member fn pointers only */
SWIGRUNTIME int  SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata* raw;
  raw=(swig_lua_rawdata*)lua_touserdata(L,index);  /* get data */
  if (!raw) return SWIG_ERROR;  /* error */
  if (type==0 || type==raw->type) /* void* or identical type */
  {
    memcpy(ptr,raw->data,size); /* copy it */
    return SWIG_OK; /* ok */
  }
  return SWIG_ERROR;  /* error */
}

/* a function to get the typestring of a piece of data */
SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
{
  swig_lua_userdata* usr;
  if (lua_isuserdata(L,tp))
  {
    usr=(swig_lua_userdata*)lua_touserdata(L,tp);  /* get data */
    if (usr && usr->type && usr->type->str)
      return usr->type->str;
    return "userdata (unknown type)";
  }
  return lua_typename(L,lua_type(L,tp));
}

/* lua callable function to get the userdata's type */
SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
{
  lua_pushstring(L,SWIG_Lua_typename(L,1));
  return 1;
}

/* lua callable function to compare userdata's value
the issue is that two userdata may point to the same thing
but to lua, they are different objects */
SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
{
  int result;
  swig_lua_userdata *usr1,*usr2;
  if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2))  /* just in case */
    return 0;  /* nil reply */
  usr1=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  usr2=(swig_lua_userdata*)lua_touserdata(L,2);  /* get data */
  /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
  result=(usr1->ptr==usr2->ptr);
   lua_pushboolean(L,result);
  return 1;
}

/* -----------------------------------------------------------------------------
 * global variable support code: class/struct typemap functions
 * ----------------------------------------------------------------------------- */

/* Install Constants */
SWIGINTERN void
SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
  int i;
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_LUA_INT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_FLOAT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].dvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_CHAR:
      lua_pushstring(L,constants[i].name);
      lua_pushfstring(L,"%c",(char)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_STRING:
      lua_pushstring(L,constants[i].name);
      lua_pushstring(L,(char *) constants[i].pvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_POINTER:
      lua_pushstring(L,constants[i].name);
      SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_BINARY:
      lua_pushstring(L,constants[i].name);
      SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
      lua_rawset(L,-3);
      break;
    default:
      break;
    }
  }
}

/* -----------------------------------------------------------------------------
 * executing lua code from within the wrapper
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
#endif
/* Executes a C string in Lua a really simple way of calling lua from C
Unfortunately lua keeps changing its API's, so we need a conditional compile
In lua 5.0.X its lua_dostring()
In lua 5.1.X its luaL_dostring()
*/
SWIGINTERN int 
SWIG_Lua_dostring(lua_State *L, const char* str) {
  int ok,top;
  if (str==0 || str[0]==0) return 0; /* nothing to do */
  top=lua_gettop(L); /* save stack */
#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
  ok=luaL_dostring(L,str);	/* looks like this is lua 5.1.X or later, good */
#else
  ok=lua_dostring(L,str);	/* might be lua 5.0.x, using lua_dostring */
#endif
  if (ok!=0) {
    SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
  }
  lua_settop(L,top); /* restore the stack */
  return ok;
}    

#ifdef __cplusplus
}
#endif

/* ------------------------------ end luarun.swg  ------------------------------ */

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1 
#define  SWIG_IOError        	   -2 
#define  SWIG_RuntimeError   	   -3 
#define  SWIG_IndexError     	   -4 
#define  SWIG_TypeError      	   -5 
#define  SWIG_DivisionByZero 	   -6 
#define  SWIG_OverflowError  	   -7 
#define  SWIG_SyntaxError    	   -8 
#define  SWIG_ValueError     	   -9 
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12 
#define  SWIG_NullReferenceError   -13




/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_IAI swig_types[0]
#define SWIGTYPE_p_IDamage swig_types[1]
#define SWIGTYPE_p_IGame swig_types[2]
#define SWIGTYPE_p_IMap swig_types[3]
#define SWIGTYPE_p_IMapFeature swig_types[4]
#define SWIGTYPE_p_IUnit swig_types[5]
#define SWIGTYPE_p_IUnitType swig_types[6]
#define SWIGTYPE_p_Position swig_types[7]
#define SWIGTYPE_p_Ptr swig_types[8]
#define SWIGTYPE_p_SResourceData swig_types[9]
#define SWIGTYPE_p_SResourceTransfer swig_types[10]
#define SWIGTYPE_p_std__shared_ptrT_IDamage_t swig_types[11]
#define SWIGTYPE_p_std__shared_ptrT_IUnit_t swig_types[12]
#define SWIGTYPE_p_std__string swig_types[13]
#define SWIGTYPE_p_std__vectorT_IMapFeature_p_t swig_types[14]
#define SWIGTYPE_p_std__vectorT_IUnitType_p_t swig_types[15]
#define SWIGTYPE_p_std__vectorT_IUnit_p_t swig_types[16]
#define SWIGTYPE_p_std__vectorT_Position_t swig_types[17]
#define SWIGTYPE_p_std__vectorT_float_t swig_types[18]
#define SWIGTYPE_p_std__vectorT_int_t swig_types[19]
#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[20]
static swig_type_info *swig_types[22];
static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#define SWIG_name      "api"
#define SWIG_init      luaopen_api
#define SWIG_init_user luaopen_api_user

#define SWIG_LUACODE   luaopen_api_luacode


namespace swig {
typedef struct{} LANGUAGE_OBJ;
}


#ifdef __cplusplus	/* generic alloc/dealloc fns*/
#define SWIG_ALLOC_ARRAY(TYPE,LEN) 	new TYPE[LEN]
#define SWIG_FREE_ARRAY(PTR)		delete[] PTR
#else
#define SWIG_ALLOC_ARRAY(TYPE,LEN) 	(TYPE *)malloc(LEN*sizeof(TYPE))
#define SWIG_FREE_ARRAY(PTR)		free(PTR)
#endif
/* counting the size of arrays:*/
SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
{
	int n=0;
	while(1){
		lua_rawgeti(L,index,n+1);
		if (lua_isnil(L,-1))break;
		++n;
		lua_pop(L,1);
	}
	lua_pop(L,1);
	return n;
}

SWIGINTERN int SWIG_table_size(lua_State* L, int index)
{
	int n=0;
	lua_pushnil(L);  /* first key*/
	while (lua_next(L, index) != 0) {
		++n;
		lua_pop(L, 1);  /* removes `value'; keeps `key' for next iteration*/
	}
	return n;
}

/* super macro to declare array typemap helper fns */
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
	SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
		int i;\
		for (i = 0; i < size; i++) {\
			lua_rawgeti(L,index,i+1);\
			if (lua_isnumber(L,-1)){\
				array[i] = (TYPE)lua_tonumber(L,-1);\
			} else {\
				lua_pop(L,1);\
				return 0;\
			}\
			lua_pop(L,1);\
		}\
		return 1;\
	}\
	SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
		TYPE *array;\
		if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
			lua_pushfstring(L,"expected a table of size %d",size);\
			return 0;\
		}\
		array=SWIG_ALLOC_ARRAY(TYPE,size);\
		if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
			lua_pushstring(L,"table must contain numbers");\
			SWIG_FREE_ARRAY(array);\
			return 0;\
		}\
		return array;\
	}\
	SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
	{\
		TYPE *array;\
		if (!lua_istable(L,index)) {\
			lua_pushstring(L,"expected a table");\
			return 0;\
		}\
		*size=SWIG_itable_size(L,index);\
		if (*size<1){\
			lua_pushstring(L,"table appears to be empty");\
			return 0;\
		}\
		array=SWIG_ALLOC_ARRAY(TYPE,*size);\
		if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
			lua_pushstring(L,"table must contain numbers");\
			SWIG_FREE_ARRAY(array);\
			return 0;\
		}\
		return array;\
	}\
	SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
		int i;\
		lua_newtable(L);\
		for (i = 0; i < size; i++){\
			lua_pushnumber(L,(lua_Number)array[i]);\
			lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
		}\
	}

SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char);
SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char);
SWIG_DECLARE_TYPEMAP_ARR_FN(int,int);
SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int);
SWIG_DECLARE_TYPEMAP_ARR_FN(short,short);
SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short);
SWIG_DECLARE_TYPEMAP_ARR_FN(long,long);
SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long);
SWIG_DECLARE_TYPEMAP_ARR_FN(float,float);
SWIG_DECLARE_TYPEMAP_ARR_FN(double,double);

SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
	int i;
	for (i = 0; i < size; i++) {
		lua_rawgeti(L,index,i+1);
		if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
			lua_pop(L,1);
			return 0;
		}
		lua_pop(L,1);
	}
	return 1;
}
SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
	void **array;
	if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
		lua_pushfstring(L,"expected a table of size %d",size);
		return 0;
	}
	array=SWIG_ALLOC_ARRAY(void*,size);
	if (!SWIG_read_ptr_array(L,index,array,size,type)){
		lua_pushfstring(L,"table must contain pointers of type %s",type->name);
		SWIG_FREE_ARRAY(array);
		return 0;
	}
	return array;
}
SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
	void **array;
	if (!lua_istable(L,index)) {
		lua_pushstring(L,"expected a table");
		return 0;
	}
	*size=SWIG_itable_size(L,index);
	if (*size<1){
		lua_pushstring(L,"table appears to be empty");
		return 0;
	}
	array=SWIG_ALLOC_ARRAY(void*,*size);
	if (!SWIG_read_ptr_array(L,index,array,*size,type)){
		lua_pushfstring(L,"table must contain pointers of type %s",type->name);
		SWIG_FREE_ARRAY(array);
		return 0;
	}
	return array;
}
SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
	int i;
	lua_newtable(L);
	for (i = 0; i < size; i++){
		SWIG_NewPointerObj(L,array[i],type,own);
		lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
	}
}


	#include <string>


SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
  int ret = lua_isstring(L, idx);
  if (!ret)
   ret = lua_isnil(L, idx);
  return ret;
}


#include <vector>


#include <stdexcept>


#define SWIG_exception(a,b)\
{ lua_pushfstring(L,"%s:%s",#a,b);SWIG_fail; }


#include <stdexcept>


	#include "interfaces/api.h"

SWIGINTERN IUnitType *std_vector_Sl_IUnitType_Sm__Sg____getitem__(std::vector< IUnitType * > *self,unsigned int idx){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__getitem__()");
				return (*self)[idx];
			}
SWIGINTERN void std_vector_Sl_IUnitType_Sm__Sg____setitem__(std::vector< IUnitType * > *self,unsigned int idx,IUnitType *val){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__setitem__()");
				(*self)[idx]=val;
			}
SWIGINTERN IUnit *std_vector_Sl_IUnit_Sm__Sg____getitem__(std::vector< IUnit * > *self,unsigned int idx){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__getitem__()");
				return (*self)[idx];
			}
SWIGINTERN void std_vector_Sl_IUnit_Sm__Sg____setitem__(std::vector< IUnit * > *self,unsigned int idx,IUnit *val){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__setitem__()");
				(*self)[idx]=val;
			}
SWIGINTERN float std_vector_Sl_float_Sg____getitem__(std::vector< float > *self,unsigned int idx){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__getitem__()");
				return (*self)[idx];
			}
SWIGINTERN void std_vector_Sl_float_Sg____setitem__(std::vector< float > *self,unsigned int idx,float val){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__setitem__()");
				(*self)[idx]=val;
			}
SWIGINTERN int std_vector_Sl_int_Sg____getitem__(std::vector< int > *self,unsigned int idx){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__getitem__()");
				return (*self)[idx];
			}
SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector< int > *self,unsigned int idx,int val){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__setitem__()");
				(*self)[idx]=val;
			}
SWIGINTERN IMapFeature *std_vector_Sl_IMapFeature_Sm__Sg____getitem__(std::vector< IMapFeature * > *self,unsigned int idx){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__getitem__()");
				return (*self)[idx];
			}
SWIGINTERN void std_vector_Sl_IMapFeature_Sm__Sg____setitem__(std::vector< IMapFeature * > *self,unsigned int idx,IMapFeature *val){
				if (idx>=self->size())
					throw std::out_of_range("in vector::__setitem__()");
				(*self)[idx]=val;
			}
#ifdef __cplusplus
extern "C" {
#endif
static int _wrap_new_string__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::string *result = 0 ;
  
  SWIG_check_num_args("std::string::string",0,0)
  result = (std::string *)new std::string();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_string__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  std::string *result = 0 ;
  
  SWIG_check_num_args("std::string::string",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("std::string::string",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  result = (std::string *)new std::string((char const *)arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_string(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_string__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_string__SWIG_1(L);
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_string'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::string::string()\n"
    "    std::string::string(char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_string_size(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::string::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::size",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_size",1,SWIGTYPE_p_std__string);
  }
  
  result = (unsigned int)((std::string const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_length(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::string::length",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::length",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_length",1,SWIGTYPE_p_std__string);
  }
  
  result = (unsigned int)((std::string const *)arg1)->length();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::string::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::empty",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_empty",1,SWIGTYPE_p_std__string);
  }
  
  result = (bool)((std::string const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_c_str(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("std::string::c_str",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::c_str",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_c_str",1,SWIGTYPE_p_std__string);
  }
  
  result = (char *)((std::string const *)arg1)->c_str();
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_data(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("std::string::data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::data",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_data",1,SWIGTYPE_p_std__string);
  }
  
  result = (char *)((std::string const *)arg1)->data();
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_assign(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("std::string::assign",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::assign",1,"std::string *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("std::string::assign",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_assign",1,SWIGTYPE_p_std__string);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  (arg1)->assign((char const *)arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_string(void *obj) {
std::string *arg1 = (std::string *) obj;
delete arg1;
}
static swig_lua_method swig_std_string_methods[] = {
    {"size", _wrap_string_size}, 
    {"length", _wrap_string_length}, 
    {"empty", _wrap_string_empty}, 
    {"c_str", _wrap_string_c_str}, 
    {"data", _wrap_string_data}, 
    {"assign", _wrap_string_assign}, 
    {0,0}
};
static swig_lua_attribute swig_std_string_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_string_bases[] = {0};
static const char *swig_std_string_base_names[] = {0};
static swig_lua_class _wrap_class_std_string = { "string", &SWIGTYPE_p_std__string,_wrap_new_string, swig_delete_string, swig_std_string_methods, swig_std_string_attributes, swig_std_string_bases, swig_std_string_base_names };

static int _wrap_new_Position__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  Position *result = 0 ;
  
  SWIG_check_num_args("Position::Position",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Position::Position",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Position::Position",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Position::Position",3,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (Position *)new Position(arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Position,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Position__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Position *result = 0 ;
  
  SWIG_check_num_args("Position::Position",0,0)
  result = (Position *)new Position();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Position,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Position(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Position__SWIG_1(L);
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_Position__SWIG_0(L);
        }
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_Position'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Position::Position(float,float,float)\n"
    "    Position::Position()\n");
  lua_error(L);return 0;
}


static int _wrap_Position_x_set(lua_State* L) {
  int SWIG_arg = 0;
  Position *arg1 = (Position *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Position::x",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Position::x",1,"Position *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Position::x",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("Position_x_set",1,SWIGTYPE_p_Position);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->x = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Position_x_get(lua_State* L) {
  int SWIG_arg = 0;
  Position *arg1 = (Position *) 0 ;
  float result;
  
  SWIG_check_num_args("Position::x",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Position::x",1,"Position *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("Position_x_get",1,SWIGTYPE_p_Position);
  }
  
  result = (float) ((arg1)->x);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Position_y_set(lua_State* L) {
  int SWIG_arg = 0;
  Position *arg1 = (Position *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Position::y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Position::y",1,"Position *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Position::y",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("Position_y_set",1,SWIGTYPE_p_Position);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Position_y_get(lua_State* L) {
  int SWIG_arg = 0;
  Position *arg1 = (Position *) 0 ;
  float result;
  
  SWIG_check_num_args("Position::y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Position::y",1,"Position *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("Position_y_get",1,SWIGTYPE_p_Position);
  }
  
  result = (float) ((arg1)->y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Position_z_set(lua_State* L) {
  int SWIG_arg = 0;
  Position *arg1 = (Position *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Position::z",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Position::z",1,"Position *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Position::z",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("Position_z_set",1,SWIGTYPE_p_Position);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->z = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Position_z_get(lua_State* L) {
  int SWIG_arg = 0;
  Position *arg1 = (Position *) 0 ;
  float result;
  
  SWIG_check_num_args("Position::z",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Position::z",1,"Position *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("Position_z_get",1,SWIGTYPE_p_Position);
  }
  
  result = (float) ((arg1)->z);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Position(void *obj) {
Position *arg1 = (Position *) obj;
delete arg1;
}
static swig_lua_method swig_Position_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_Position_attributes[] = {
    { "x", _wrap_Position_x_get, _wrap_Position_x_set},
    { "y", _wrap_Position_y_get, _wrap_Position_y_set},
    { "z", _wrap_Position_z_get, _wrap_Position_z_set},
    {0,0,0}
};
static swig_lua_class *swig_Position_bases[] = {0};
static const char *swig_Position_base_names[] = {0};
static swig_lua_class _wrap_class_Position = { "Position", &SWIGTYPE_p_Position,_wrap_new_Position, swig_delete_Position, swig_Position_methods, swig_Position_attributes, swig_Position_bases, swig_Position_base_names };

static int _wrap_new_SResourceData(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *result = 0 ;
  
  SWIG_check_num_args("SResourceData::SResourceData",0,0)
  result = (SResourceData *)new SResourceData();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_SResourceData,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_id_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("SResourceData::id",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::id",1,"SResourceData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceData::id",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_id_set",1,SWIGTYPE_p_SResourceData);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->id = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_id_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int result;
  
  SWIG_check_num_args("SResourceData::id",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::id",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_id_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (int) ((arg1)->id);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_name_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  
  SWIG_check_num_args("SResourceData::name",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::name",1,"SResourceData *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("SResourceData::name",2,"std::string const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_name_set",1,SWIGTYPE_p_SResourceData);
  }
  
  temp2.assign(lua_tostring(L,2),lua_strlen(L,2)); arg2=&temp2;
  if (arg1) (arg1)->name = *arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_name_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  std::string *result = 0 ;
  
  SWIG_check_num_args("SResourceData::name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::name",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_name_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (std::string *) & ((arg1)->name);
  lua_pushlstring(L,result->data(),result->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_income_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  double arg2 ;
  
  SWIG_check_num_args("SResourceData::income",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::income",1,"SResourceData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceData::income",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_income_set",1,SWIGTYPE_p_SResourceData);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->income = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_income_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  double result;
  
  SWIG_check_num_args("SResourceData::income",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::income",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_income_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (double) ((arg1)->income);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_usage_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  double arg2 ;
  
  SWIG_check_num_args("SResourceData::usage",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::usage",1,"SResourceData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceData::usage",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_usage_set",1,SWIGTYPE_p_SResourceData);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->usage = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_usage_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  double result;
  
  SWIG_check_num_args("SResourceData::usage",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::usage",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_usage_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (double) ((arg1)->usage);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_capacity_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("SResourceData::capacity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::capacity",1,"SResourceData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceData::capacity",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_capacity_set",1,SWIGTYPE_p_SResourceData);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->capacity = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_capacity_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int result;
  
  SWIG_check_num_args("SResourceData::capacity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::capacity",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_capacity_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (int) ((arg1)->capacity);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_reserves_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("SResourceData::reserves",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::reserves",1,"SResourceData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceData::reserves",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_reserves_set",1,SWIGTYPE_p_SResourceData);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->reserves = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_reserves_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int result;
  
  SWIG_check_num_args("SResourceData::reserves",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::reserves",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_reserves_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (int) ((arg1)->reserves);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_gameframe_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("SResourceData::gameframe",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::gameframe",1,"SResourceData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceData::gameframe",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_gameframe_set",1,SWIGTYPE_p_SResourceData);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->gameframe = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceData_gameframe_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceData *arg1 = (SResourceData *) 0 ;
  int result;
  
  SWIG_check_num_args("SResourceData::gameframe",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceData::gameframe",1,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceData_gameframe_get",1,SWIGTYPE_p_SResourceData);
  }
  
  result = (int) ((arg1)->gameframe);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SResourceData(void *obj) {
SResourceData *arg1 = (SResourceData *) obj;
delete arg1;
}
static swig_lua_method swig_SResourceData_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_SResourceData_attributes[] = {
    { "id", _wrap_SResourceData_id_get, _wrap_SResourceData_id_set},
    { "name", _wrap_SResourceData_name_get, _wrap_SResourceData_name_set},
    { "income", _wrap_SResourceData_income_get, _wrap_SResourceData_income_set},
    { "usage", _wrap_SResourceData_usage_get, _wrap_SResourceData_usage_set},
    { "capacity", _wrap_SResourceData_capacity_get, _wrap_SResourceData_capacity_set},
    { "reserves", _wrap_SResourceData_reserves_get, _wrap_SResourceData_reserves_set},
    { "gameframe", _wrap_SResourceData_gameframe_get, _wrap_SResourceData_gameframe_set},
    {0,0,0}
};
static swig_lua_class *swig_SResourceData_bases[] = {0};
static const char *swig_SResourceData_base_names[] = {0};
static swig_lua_class _wrap_class_SResourceData = { "SResourceData", &SWIGTYPE_p_SResourceData,_wrap_new_SResourceData, swig_delete_SResourceData, swig_SResourceData_methods, swig_SResourceData_attributes, swig_SResourceData_bases, swig_SResourceData_base_names };

static int _wrap_new_SResourceTransfer(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *result = 0 ;
  
  SWIG_check_num_args("SResourceTransfer::SResourceTransfer",0,0)
  result = (SResourceTransfer *)new SResourceTransfer();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_SResourceTransfer,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_resource_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  SResourceData *arg2 = (SResourceData *) 0 ;
  
  SWIG_check_num_args("SResourceTransfer::resource",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::resource",1,"SResourceTransfer *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("SResourceTransfer::resource",2,"SResourceData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_resource_set",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_SResourceData,0))){
    SWIG_fail_ptr("SResourceTransfer_resource_set",2,SWIGTYPE_p_SResourceData);
  }
  
  if (arg1) (arg1)->resource = *arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_resource_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  SResourceData *result = 0 ;
  
  SWIG_check_num_args("SResourceTransfer::resource",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::resource",1,"SResourceTransfer *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_resource_get",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  result = (SResourceData *)& ((arg1)->resource);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_SResourceData,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_rate_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("SResourceTransfer::rate",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::rate",1,"SResourceTransfer *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceTransfer::rate",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_rate_set",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->rate = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_rate_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("SResourceTransfer::rate",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::rate",1,"SResourceTransfer *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_rate_get",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  result = (unsigned int) ((arg1)->rate);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_consumption_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  double arg2 ;
  
  SWIG_check_num_args("SResourceTransfer::consumption",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::consumption",1,"SResourceTransfer *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceTransfer::consumption",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_consumption_set",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->consumption = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_consumption_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  double result;
  
  SWIG_check_num_args("SResourceTransfer::consumption",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::consumption",1,"SResourceTransfer *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_consumption_get",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  result = (double) ((arg1)->consumption);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_generation_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  double arg2 ;
  
  SWIG_check_num_args("SResourceTransfer::generation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::generation",1,"SResourceTransfer *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceTransfer::generation",2,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_generation_set",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  arg2 = (double)lua_tonumber(L, 2);
  if (arg1) (arg1)->generation = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_generation_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  double result;
  
  SWIG_check_num_args("SResourceTransfer::generation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::generation",1,"SResourceTransfer *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_generation_get",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  result = (double) ((arg1)->generation);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_gameframe_set(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("SResourceTransfer::gameframe",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::gameframe",1,"SResourceTransfer *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("SResourceTransfer::gameframe",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_gameframe_set",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->gameframe = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SResourceTransfer_gameframe_get(lua_State* L) {
  int SWIG_arg = 0;
  SResourceTransfer *arg1 = (SResourceTransfer *) 0 ;
  int result;
  
  SWIG_check_num_args("SResourceTransfer::gameframe",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SResourceTransfer::gameframe",1,"SResourceTransfer *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SResourceTransfer,0))){
    SWIG_fail_ptr("SResourceTransfer_gameframe_get",1,SWIGTYPE_p_SResourceTransfer);
  }
  
  result = (int) ((arg1)->gameframe);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SResourceTransfer(void *obj) {
SResourceTransfer *arg1 = (SResourceTransfer *) obj;
delete arg1;
}
static swig_lua_method swig_SResourceTransfer_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_SResourceTransfer_attributes[] = {
    { "resource", _wrap_SResourceTransfer_resource_get, _wrap_SResourceTransfer_resource_set},
    { "rate", _wrap_SResourceTransfer_rate_get, _wrap_SResourceTransfer_rate_set},
    { "consumption", _wrap_SResourceTransfer_consumption_get, _wrap_SResourceTransfer_consumption_set},
    { "generation", _wrap_SResourceTransfer_generation_get, _wrap_SResourceTransfer_generation_set},
    { "gameframe", _wrap_SResourceTransfer_gameframe_get, _wrap_SResourceTransfer_gameframe_set},
    {0,0,0}
};
static swig_lua_class *swig_SResourceTransfer_bases[] = {0};
static const char *swig_SResourceTransfer_base_names[] = {0};
static swig_lua_class _wrap_class_SResourceTransfer = { "SResourceTransfer", &SWIGTYPE_p_SResourceTransfer,_wrap_new_SResourceTransfer, swig_delete_SResourceTransfer, swig_SResourceTransfer_methods, swig_SResourceTransfer_attributes, swig_SResourceTransfer_bases, swig_SResourceTransfer_base_names };

static int _wrap_IDamage_Damage(lua_State* L) {
  int SWIG_arg = 0;
  IDamage *arg1 = (IDamage *) 0 ;
  float result;
  
  SWIG_check_num_args("IDamage::Damage",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Damage",1,"IDamage *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IDamage,0))){
    SWIG_fail_ptr("IDamage_Damage",1,SWIGTYPE_p_IDamage);
  }
  
  result = (float)(arg1)->Damage();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDamage_Direction(lua_State* L) {
  int SWIG_arg = 0;
  IDamage *arg1 = (IDamage *) 0 ;
  Position result;
  
  SWIG_check_num_args("IDamage::Direction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Direction",1,"IDamage *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IDamage,0))){
    SWIG_fail_ptr("IDamage_Direction",1,SWIGTYPE_p_IDamage);
  }
  
  result = (arg1)->Direction();
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDamage_DamageType(lua_State* L) {
  int SWIG_arg = 0;
  IDamage *arg1 = (IDamage *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IDamage::DamageType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::DamageType",1,"IDamage *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IDamage,0))){
    SWIG_fail_ptr("IDamage_DamageType",1,SWIGTYPE_p_IDamage);
  }
  
  result = (arg1)->DamageType();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDamage_WeaponType(lua_State* L) {
  int SWIG_arg = 0;
  IDamage *arg1 = (IDamage *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IDamage::WeaponType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::WeaponType",1,"IDamage *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IDamage,0))){
    SWIG_fail_ptr("IDamage_WeaponType",1,SWIGTYPE_p_IDamage);
  }
  
  result = (arg1)->WeaponType();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDamage_Attacker(lua_State* L) {
  int SWIG_arg = 0;
  IDamage *arg1 = (IDamage *) 0 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("IDamage::Attacker",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Attacker",1,"IDamage *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IDamage,0))){
    SWIG_fail_ptr("IDamage_Attacker",1,SWIGTYPE_p_IDamage);
  }
  
  result = (IUnit *)(arg1)->Attacker();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDamage_Effects(lua_State* L) {
  int SWIG_arg = 0;
  IDamage *arg1 = (IDamage *) 0 ;
  SwigValueWrapper< std::vector< std::string > > result;
  
  SWIG_check_num_args("IDamage::Effects",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Effects",1,"IDamage *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IDamage,0))){
    SWIG_fail_ptr("IDamage_Effects",1,SWIGTYPE_p_IDamage);
  }
  
  result = (arg1)->Effects();
  {
    std::vector< std::string > * resultptr = new std::vector< std::string >((const std::vector< std::string > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_std__string_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDamage(void *obj) {
IDamage *arg1 = (IDamage *) obj;
delete arg1;
}
static swig_lua_method swig_IDamage_methods[] = {
    {"Damage", _wrap_IDamage_Damage}, 
    {"Direction", _wrap_IDamage_Direction}, 
    {"DamageType", _wrap_IDamage_DamageType}, 
    {"WeaponType", _wrap_IDamage_WeaponType}, 
    {"Attacker", _wrap_IDamage_Attacker}, 
    {"Effects", _wrap_IDamage_Effects}, 
    {0,0}
};
static swig_lua_attribute swig_IDamage_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IDamage_bases[] = {0};
static const char *swig_IDamage_base_names[] = {0};
static swig_lua_class _wrap_class_IDamage = { "IDamage", &SWIGTYPE_p_IDamage,0, swig_delete_IDamage, swig_IDamage_methods, swig_IDamage_attributes, swig_IDamage_bases, swig_IDamage_base_names };

static int _wrap_IMapFeature_ID(lua_State* L) {
  int SWIG_arg = 0;
  IMapFeature *arg1 = (IMapFeature *) 0 ;
  int result;
  
  SWIG_check_num_args("IMapFeature::ID",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMapFeature::ID",1,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("IMapFeature_ID",1,SWIGTYPE_p_IMapFeature);
  }
  
  result = (int)(arg1)->ID();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMapFeature_Name(lua_State* L) {
  int SWIG_arg = 0;
  IMapFeature *arg1 = (IMapFeature *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IMapFeature::Name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMapFeature::Name",1,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("IMapFeature_Name",1,SWIGTYPE_p_IMapFeature);
  }
  
  result = (arg1)->Name();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMapFeature_GetPosition(lua_State* L) {
  int SWIG_arg = 0;
  IMapFeature *arg1 = (IMapFeature *) 0 ;
  Position result;
  
  SWIG_check_num_args("IMapFeature::GetPosition",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMapFeature::GetPosition",1,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("IMapFeature_GetPosition",1,SWIGTYPE_p_IMapFeature);
  }
  
  result = (arg1)->GetPosition();
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMapFeature_ResourceValue(lua_State* L) {
  int SWIG_arg = 0;
  IMapFeature *arg1 = (IMapFeature *) 0 ;
  int arg2 ;
  float result;
  
  SWIG_check_num_args("IMapFeature::ResourceValue",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMapFeature::ResourceValue",1,"IMapFeature *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IMapFeature::ResourceValue",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("IMapFeature_ResourceValue",1,SWIGTYPE_p_IMapFeature);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (float)(arg1)->ResourceValue(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMapFeature_Reclaimable(lua_State* L) {
  int SWIG_arg = 0;
  IMapFeature *arg1 = (IMapFeature *) 0 ;
  bool result;
  
  SWIG_check_num_args("IMapFeature::Reclaimable",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMapFeature::Reclaimable",1,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("IMapFeature_Reclaimable",1,SWIGTYPE_p_IMapFeature);
  }
  
  result = (bool)(arg1)->Reclaimable();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IMapFeature(void *obj) {
IMapFeature *arg1 = (IMapFeature *) obj;
delete arg1;
}
static swig_lua_method swig_IMapFeature_methods[] = {
    {"ID", _wrap_IMapFeature_ID}, 
    {"Name", _wrap_IMapFeature_Name}, 
    {"GetPosition", _wrap_IMapFeature_GetPosition}, 
    {"ResourceValue", _wrap_IMapFeature_ResourceValue}, 
    {"Reclaimable", _wrap_IMapFeature_Reclaimable}, 
    {0,0}
};
static swig_lua_attribute swig_IMapFeature_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IMapFeature_bases[] = {0};
static const char *swig_IMapFeature_base_names[] = {0};
static swig_lua_class _wrap_class_IMapFeature = { "IMapFeature", &SWIGTYPE_p_IMapFeature,0, swig_delete_IMapFeature, swig_IMapFeature_methods, swig_IMapFeature_attributes, swig_IMapFeature_bases, swig_IMapFeature_base_names };

static int _wrap_IMap_MapName(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IMap::MapName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::MapName",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_MapName",1,SWIGTYPE_p_IMap);
  }
  
  result = (arg1)->MapName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_SpotCount(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  int result;
  
  SWIG_check_num_args("IMap::SpotCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::SpotCount",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_SpotCount",1,SWIGTYPE_p_IMap);
  }
  
  result = (int)(arg1)->SpotCount();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_GetSpot(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  int arg2 ;
  Position result;
  
  SWIG_check_num_args("IMap::GetSpot",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::GetSpot",1,"IMap *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IMap::GetSpot",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_GetSpot",1,SWIGTYPE_p_IMap);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (arg1)->GetSpot(arg2);
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_GetMetalSpots(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  std::vector< Position > *result = 0 ;
  
  SWIG_check_num_args("IMap::GetMetalSpots",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::GetMetalSpots",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_GetMetalSpots",1,SWIGTYPE_p_IMap);
  }
  
  result = (std::vector< Position > *) &(arg1)->GetMetalSpots();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_Position_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_MapDimensions(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  Position result;
  
  SWIG_check_num_args("IMap::MapDimensions",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::MapDimensions",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_MapDimensions",1,SWIGTYPE_p_IMap);
  }
  
  result = (arg1)->MapDimensions();
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_GetMapFeatures(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  std::vector< IMapFeature * > result;
  
  SWIG_check_num_args("IMap::GetMapFeatures",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::GetMapFeatures",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_GetMapFeatures",1,SWIGTYPE_p_IMap);
  }
  
  result = (arg1)->GetMapFeatures();
  {
    std::vector< IMapFeature * > * resultptr = new std::vector< IMapFeature * >((const std::vector< IMapFeature * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_GetMapFeaturesAt(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  Position arg2 ;
  double arg3 ;
  Position *argp2 ;
  std::vector< IMapFeature * > result;
  
  SWIG_check_num_args("IMap::GetMapFeaturesAt",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::GetMapFeaturesAt",1,"IMap *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IMap::GetMapFeaturesAt",2,"Position");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("IMap::GetMapFeaturesAt",3,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_GetMapFeaturesAt",1,SWIGTYPE_p_IMap);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IMap_GetMapFeaturesAt",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  arg3 = (double)lua_tonumber(L, 3);
  result = (arg1)->GetMapFeaturesAt(arg2,arg3);
  {
    std::vector< IMapFeature * > * resultptr = new std::vector< IMapFeature * >((const std::vector< IMapFeature * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_MinimumWindSpeed(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  double result;
  
  SWIG_check_num_args("IMap::MinimumWindSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::MinimumWindSpeed",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_MinimumWindSpeed",1,SWIGTYPE_p_IMap);
  }
  
  result = (double)(arg1)->MinimumWindSpeed();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_MaximumWindSpeed(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  double result;
  
  SWIG_check_num_args("IMap::MaximumWindSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::MaximumWindSpeed",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_MaximumWindSpeed",1,SWIGTYPE_p_IMap);
  }
  
  result = (double)(arg1)->MaximumWindSpeed();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_AverageWind(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  double result;
  
  SWIG_check_num_args("IMap::AverageWind",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::AverageWind",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_AverageWind",1,SWIGTYPE_p_IMap);
  }
  
  result = (double)(arg1)->AverageWind();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_MaximumHeight(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  float result;
  
  SWIG_check_num_args("IMap::MaximumHeight",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::MaximumHeight",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_MaximumHeight",1,SWIGTYPE_p_IMap);
  }
  
  result = (float)(arg1)->MaximumHeight();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_MinimumHeight(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  float result;
  
  SWIG_check_num_args("IMap::MinimumHeight",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::MinimumHeight",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_MinimumHeight",1,SWIGTYPE_p_IMap);
  }
  
  result = (float)(arg1)->MinimumHeight();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_TidalStrength(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  double result;
  
  SWIG_check_num_args("IMap::TidalStrength",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::TidalStrength",1,"IMap *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_TidalStrength",1,SWIGTYPE_p_IMap);
  }
  
  result = (double)(arg1)->TidalStrength();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_FindClosestBuildSite(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  double arg4 ;
  double arg5 ;
  Position *argp3 ;
  Position result;
  
  SWIG_check_num_args("IMap::FindClosestBuildSite",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::FindClosestBuildSite",1,"IMap *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IMap::FindClosestBuildSite",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IMap::FindClosestBuildSite",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IMap::FindClosestBuildSite",4,"double");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("IMap::FindClosestBuildSite",5,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_FindClosestBuildSite",1,SWIGTYPE_p_IMap);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IMap_FindClosestBuildSite",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IMap_FindClosestBuildSite",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (double)lua_tonumber(L, 4);
  arg5 = (double)lua_tonumber(L, 5);
  result = (arg1)->FindClosestBuildSite(arg2,arg3,arg4,arg5);
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_FindClosestBuildSiteFacing(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  Position *argp3 ;
  Position result;
  
  SWIG_check_num_args("IMap::FindClosestBuildSiteFacing",6,6)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::FindClosestBuildSiteFacing",1,"IMap *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IMap::FindClosestBuildSiteFacing",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IMap::FindClosestBuildSiteFacing",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IMap::FindClosestBuildSiteFacing",4,"double");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("IMap::FindClosestBuildSiteFacing",5,"double");
  if(!lua_isnumber(L,6)) SWIG_fail_arg("IMap::FindClosestBuildSiteFacing",6,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_FindClosestBuildSiteFacing",1,SWIGTYPE_p_IMap);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IMap_FindClosestBuildSiteFacing",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IMap_FindClosestBuildSiteFacing",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (double)lua_tonumber(L, 4);
  arg5 = (double)lua_tonumber(L, 5);
  arg6 = (int)lua_tonumber(L, 6);
  result = (arg1)->FindClosestBuildSiteFacing(arg2,arg3,arg4,arg5,arg6);
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_CanBuildHere(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IMap::CanBuildHere",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::CanBuildHere",1,"IMap *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IMap::CanBuildHere",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IMap::CanBuildHere",3,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_CanBuildHere",1,SWIGTYPE_p_IMap);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IMap_CanBuildHere",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IMap_CanBuildHere",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  result = (bool)(arg1)->CanBuildHere(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IMap_CanBuildHereFacing(lua_State* L) {
  int SWIG_arg = 0;
  IMap *arg1 = (IMap *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  int arg4 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IMap::CanBuildHereFacing",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IMap::CanBuildHereFacing",1,"IMap *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IMap::CanBuildHereFacing",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IMap::CanBuildHereFacing",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IMap::CanBuildHereFacing",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IMap,0))){
    SWIG_fail_ptr("IMap_CanBuildHereFacing",1,SWIGTYPE_p_IMap);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IMap_CanBuildHereFacing",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IMap_CanBuildHereFacing",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (int)lua_tonumber(L, 4);
  result = (bool)(arg1)->CanBuildHereFacing(arg2,arg3,arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IMap(void *obj) {
IMap *arg1 = (IMap *) obj;
delete arg1;
}
static swig_lua_method swig_IMap_methods[] = {
    {"MapName", _wrap_IMap_MapName}, 
    {"SpotCount", _wrap_IMap_SpotCount}, 
    {"GetSpot", _wrap_IMap_GetSpot}, 
    {"GetMetalSpots", _wrap_IMap_GetMetalSpots}, 
    {"MapDimensions", _wrap_IMap_MapDimensions}, 
    {"GetMapFeatures", _wrap_IMap_GetMapFeatures}, 
    {"GetMapFeaturesAt", _wrap_IMap_GetMapFeaturesAt}, 
    {"MinimumWindSpeed", _wrap_IMap_MinimumWindSpeed}, 
    {"MaximumWindSpeed", _wrap_IMap_MaximumWindSpeed}, 
    {"AverageWind", _wrap_IMap_AverageWind}, 
    {"MaximumHeight", _wrap_IMap_MaximumHeight}, 
    {"MinimumHeight", _wrap_IMap_MinimumHeight}, 
    {"TidalStrength", _wrap_IMap_TidalStrength}, 
    {"FindClosestBuildSite", _wrap_IMap_FindClosestBuildSite}, 
    {"FindClosestBuildSiteFacing", _wrap_IMap_FindClosestBuildSiteFacing}, 
    {"CanBuildHere", _wrap_IMap_CanBuildHere}, 
    {"CanBuildHereFacing", _wrap_IMap_CanBuildHereFacing}, 
    {0,0}
};
static swig_lua_attribute swig_IMap_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IMap_bases[] = {0};
static const char *swig_IMap_base_names[] = {0};
static swig_lua_class _wrap_class_IMap = { "IMap", &SWIGTYPE_p_IMap,0, swig_delete_IMap, swig_IMap_methods, swig_IMap_attributes, swig_IMap_bases, swig_IMap_base_names };

static int _wrap_IUnitType_Name(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IUnitType::Name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::Name",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_Name",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (arg1)->Name();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_ReclaimSpeed(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnitType::ReclaimSpeed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::ReclaimSpeed",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_ReclaimSpeed",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (float)(arg1)->ReclaimSpeed();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_Extractor(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnitType::Extractor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::Extractor",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_Extractor",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(arg1)->Extractor();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_ResourceCost(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  int arg2 ;
  float result;
  
  SWIG_check_num_args("IUnitType::ResourceCost",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::ResourceCost",1,"IUnitType *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnitType::ResourceCost",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_ResourceCost",1,SWIGTYPE_p_IUnitType);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (float)(arg1)->ResourceCost(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_GetMaxHealth(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnitType::GetMaxHealth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::GetMaxHealth",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_GetMaxHealth",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (float)(arg1)->GetMaxHealth();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_WeaponCount(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnitType::WeaponCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::WeaponCount",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_WeaponCount",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (int)(arg1)->WeaponCount();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_MaxWeaponDamage(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnitType::MaxWeaponDamage",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::MaxWeaponDamage",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_MaxWeaponDamage",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (float)(arg1)->MaxWeaponDamage();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnitType_BuildOptions(lua_State* L) {
  int SWIG_arg = 0;
  IUnitType *arg1 = (IUnitType *) 0 ;
  std::vector< IUnitType * > result;
  
  SWIG_check_num_args("IUnitType::BuildOptions",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnitType::BuildOptions",1,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnitType_BuildOptions",1,SWIGTYPE_p_IUnitType);
  }
  
  result = (arg1)->BuildOptions();
  {
    std::vector< IUnitType * > * resultptr = new std::vector< IUnitType * >((const std::vector< IUnitType * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_IUnitType_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IUnitType(void *obj) {
IUnitType *arg1 = (IUnitType *) obj;
delete arg1;
}
static swig_lua_method swig_IUnitType_methods[] = {
    {"Name", _wrap_IUnitType_Name}, 
    {"ReclaimSpeed", _wrap_IUnitType_ReclaimSpeed}, 
    {"Extractor", _wrap_IUnitType_Extractor}, 
    {"ResourceCost", _wrap_IUnitType_ResourceCost}, 
    {"GetMaxHealth", _wrap_IUnitType_GetMaxHealth}, 
    {"WeaponCount", _wrap_IUnitType_WeaponCount}, 
    {"MaxWeaponDamage", _wrap_IUnitType_MaxWeaponDamage}, 
    {"BuildOptions", _wrap_IUnitType_BuildOptions}, 
    {0,0}
};
static swig_lua_attribute swig_IUnitType_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IUnitType_bases[] = {0};
static const char *swig_IUnitType_base_names[] = {0};
static swig_lua_class _wrap_class_IUnitType = { "IUnitType", &SWIGTYPE_p_IUnitType,0, swig_delete_IUnitType, swig_IUnitType_methods, swig_IUnitType_attributes, swig_IUnitType_bases, swig_IUnitType_base_names };

static int _wrap_IUnit_ID(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnit::ID",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ID",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_ID",1,SWIGTYPE_p_IUnit);
  }
  
  result = (int)(arg1)->ID();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Team(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnit::Team",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Team",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Team",1,SWIGTYPE_p_IUnit);
  }
  
  result = (int)(arg1)->Team();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Name(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IUnit::Name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Name",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Name",1,SWIGTYPE_p_IUnit);
  }
  
  result = (arg1)->Name();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_IsAlive(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::IsAlive",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::IsAlive",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_IsAlive",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->IsAlive();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_IsCloaked(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::IsCloaked",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::IsCloaked",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_IsCloaked",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->IsCloaked();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Type(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnitType *result = 0 ;
  
  SWIG_check_num_args("IUnit::Type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Type",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Type",1,SWIGTYPE_p_IUnit);
  }
  
  result = (IUnitType *)(arg1)->Type();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnitType,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanMove(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanMove",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanMove",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanMove",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanMove();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanDeploy(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanDeploy",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanDeploy",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanDeploy",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanDeploy();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanBuild__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuild",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuild",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanBuild",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanBuild();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_IsBeingBuilt(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::IsBeingBuilt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::IsBeingBuilt",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_IsBeingBuilt",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->IsBeingBuilt();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanAssistBuilding(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanAssistBuilding",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanAssistBuilding",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::CanAssistBuilding",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanAssistBuilding",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanAssistBuilding",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanAssistBuilding(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanMoveWhenDeployed(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanMoveWhenDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanMoveWhenDeployed",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanMoveWhenDeployed",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanMoveWhenDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanFireWhenDeployed(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanFireWhenDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanFireWhenDeployed",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanFireWhenDeployed",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanFireWhenDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanBuildWhenDeployed(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuildWhenDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuildWhenDeployed",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanBuildWhenDeployed",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanBuildWhenDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanBuildWhenNotDeployed(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuildWhenNotDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuildWhenNotDeployed",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanBuildWhenNotDeployed",1,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->CanBuildWhenNotDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Wait(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("IUnit::Wait",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Wait",1,"IUnit *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::Wait",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Wait",1,SWIGTYPE_p_IUnit);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->Wait(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Stop(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IUnit::Stop",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Stop",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Stop",1,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->Stop();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Move(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  Position arg2 ;
  Position *argp2 ;
  
  SWIG_check_num_args("IUnit::Move",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Move",1,"IUnit *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IUnit::Move",2,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Move",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_Move",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  (arg1)->Move(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_MoveAndFire(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  Position arg2 ;
  Position *argp2 ;
  
  SWIG_check_num_args("IUnit::MoveAndFire",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::MoveAndFire",1,"IUnit *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IUnit::MoveAndFire",2,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_MoveAndFire",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_MoveAndFire",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  (arg1)->MoveAndFire(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Build",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Build",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnit_Build",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(arg1)->Build(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  std::string arg2 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"IUnit *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IUnit::Build",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Build",1,SWIGTYPE_p_IUnit);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (bool)(arg1)->Build(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  std::string arg2 ;
  Position arg3 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"IUnit *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IUnit::Build",2,"std::string");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Build",1,SWIGTYPE_p_IUnit);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  result = (bool)(arg1)->Build(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Build",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Build",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnit_Build",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  result = (bool)(arg1)->Build(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  std::string arg2 ;
  Position arg3 ;
  int arg4 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"IUnit *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IUnit::Build",2,"std::string");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::Build",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Build",1,SWIGTYPE_p_IUnit);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (int)lua_tonumber(L, 4);
  result = (bool)(arg1)->Build(arg2,arg3,arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  int arg4 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Build",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::Build",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Build",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnit_Build",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (int)lua_tonumber(L, 4);
  result = (bool)(arg1)->Build(arg2,arg3,arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Build(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IUnit_Build__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_IUnit_Build__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IUnit_Build__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IUnit_Build__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_IUnit_Build__SWIG_5(L);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_IUnit_Build__SWIG_4(L);
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'IUnit_Build'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::Build(IUnitType *)\n"
    "    IUnit::Build(std::string)\n"
    "    IUnit::Build(std::string,Position)\n"
    "    IUnit::Build(IUnitType *,Position)\n"
    "    IUnit::Build(std::string,Position,int)\n"
    "    IUnit::Build(IUnitType *,Position,int)\n");
  lua_error(L);return 0;
}


static int _wrap_IUnit_AreaReclaim(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  Position arg2 ;
  double arg3 ;
  Position *argp2 ;
  bool result;
  
  SWIG_check_num_args("IUnit::AreaReclaim",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::AreaReclaim",1,"IUnit *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IUnit::AreaReclaim",2,"Position");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("IUnit::AreaReclaim",3,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_AreaReclaim",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IUnit_AreaReclaim",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  arg3 = (double)lua_tonumber(L, 3);
  result = (bool)(arg1)->AreaReclaim(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Reclaim__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IMapFeature *arg2 = (IMapFeature *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Reclaim",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Reclaim",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Reclaim",2,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Reclaim",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("IUnit_Reclaim",2,SWIGTYPE_p_IMapFeature);
  }
  
  result = (bool)(arg1)->Reclaim(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Reclaim__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Reclaim",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Reclaim",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Reclaim",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Reclaim",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Reclaim",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->Reclaim(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Reclaim(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IMapFeature, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IUnit_Reclaim__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IUnit_Reclaim__SWIG_1(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'IUnit_Reclaim'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::Reclaim(IMapFeature *)\n"
    "    IUnit::Reclaim(IUnit *)\n");
  lua_error(L);return 0;
}


static int _wrap_IUnit_Attack(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Attack",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Attack",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Attack",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Attack",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Attack",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->Attack(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_Repair(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Repair",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Repair",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Repair",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Repair",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_Repair",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(arg1)->Repair(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_MorphInto(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::MorphInto",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::MorphInto",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::MorphInto",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_MorphInto",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnit_MorphInto",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(arg1)->MorphInto(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_GetPosition(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  Position result;
  
  SWIG_check_num_args("IUnit::GetPosition",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetPosition",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_GetPosition",1,SWIGTYPE_p_IUnit);
  }
  
  result = (arg1)->GetPosition();
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_GetHealth(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnit::GetHealth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetHealth",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_GetHealth",1,SWIGTYPE_p_IUnit);
  }
  
  result = (float)(arg1)->GetHealth();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_GetMaxHealth(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnit::GetMaxHealth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetMaxHealth",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_GetMaxHealth",1,SWIGTYPE_p_IUnit);
  }
  
  result = (float)(arg1)->GetMaxHealth();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_WeaponCount(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnit::WeaponCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::WeaponCount",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_WeaponCount",1,SWIGTYPE_p_IUnit);
  }
  
  result = (int)(arg1)->WeaponCount();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_MaxWeaponsRange(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnit::MaxWeaponsRange",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::MaxWeaponsRange",1,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_MaxWeaponsRange",1,SWIGTYPE_p_IUnit);
  }
  
  result = (float)(arg1)->MaxWeaponsRange();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanBuild__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuild",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuild",1,"IUnit *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::CanBuild",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_CanBuild",1,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("IUnit_CanBuild",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(arg1)->CanBuild(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_CanBuild(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IUnit_CanBuild__SWIG_0(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IUnit_CanBuild__SWIG_1(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'IUnit_CanBuild'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::CanBuild()\n"
    "    IUnit::CanBuild(IUnitType *)\n");
  lua_error(L);return 0;
}


static int _wrap_IUnit_GetResourceUsage(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int arg2 ;
  SResourceTransfer result;
  
  SWIG_check_num_args("IUnit::GetResourceUsage",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetResourceUsage",1,"IUnit *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::GetResourceUsage",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_GetResourceUsage",1,SWIGTYPE_p_IUnit);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (arg1)->GetResourceUsage(arg2);
  {
    SResourceTransfer * resultptr = new SResourceTransfer((const SResourceTransfer &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_SResourceTransfer,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_ExecuteCustomCommand__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int arg2 ;
  std::vector< float > arg3 ;
  short arg4 ;
  int arg5 ;
  std::vector< float > *argp3 ;
  
  SWIG_check_num_args("IUnit::ExecuteCustomCommand",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",1,"IUnit *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",2,"int");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",3,"std::vector< float >");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",4,"short");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",5,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_ExecuteCustomCommand",1,SWIGTYPE_p_IUnit);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("IUnit_ExecuteCustomCommand",3,SWIGTYPE_p_std__vectorT_float_t);
  }
  arg3 = *argp3;
  
  arg4 = (short)lua_tonumber(L, 4);
  arg5 = (int)lua_tonumber(L, 5);
  (arg1)->ExecuteCustomCommand(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_ExecuteCustomCommand__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int arg2 ;
  std::vector< float > arg3 ;
  short arg4 ;
  std::vector< float > *argp3 ;
  
  SWIG_check_num_args("IUnit::ExecuteCustomCommand",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",1,"IUnit *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",2,"int");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",3,"std::vector< float >");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",4,"short");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_ExecuteCustomCommand",1,SWIGTYPE_p_IUnit);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("IUnit_ExecuteCustomCommand",3,SWIGTYPE_p_std__vectorT_float_t);
  }
  arg3 = *argp3;
  
  arg4 = (short)lua_tonumber(L, 4);
  (arg1)->ExecuteCustomCommand(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_ExecuteCustomCommand__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  IUnit *arg1 = (IUnit *) 0 ;
  int arg2 ;
  std::vector< float > arg3 ;
  std::vector< float > *argp3 ;
  
  SWIG_check_num_args("IUnit::ExecuteCustomCommand",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",1,"IUnit *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",2,"int");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",3,"std::vector< float >");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IUnit_ExecuteCustomCommand",1,SWIGTYPE_p_IUnit);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("IUnit_ExecuteCustomCommand",3,SWIGTYPE_p_std__vectorT_float_t);
  }
  arg3 = *argp3;
  
  (arg1)->ExecuteCustomCommand(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IUnit_ExecuteCustomCommand(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IUnit_ExecuteCustomCommand__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_IUnit_ExecuteCustomCommand__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_IUnit_ExecuteCustomCommand__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'IUnit_ExecuteCustomCommand'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::ExecuteCustomCommand(int,std::vector< float >,short,int)\n"
    "    IUnit::ExecuteCustomCommand(int,std::vector< float >,short)\n"
    "    IUnit::ExecuteCustomCommand(int,std::vector< float >)\n");
  lua_error(L);return 0;
}


static void swig_delete_IUnit(void *obj) {
IUnit *arg1 = (IUnit *) obj;
delete arg1;
}
static swig_lua_method swig_IUnit_methods[] = {
    {"ID", _wrap_IUnit_ID}, 
    {"Team", _wrap_IUnit_Team}, 
    {"Name", _wrap_IUnit_Name}, 
    {"IsAlive", _wrap_IUnit_IsAlive}, 
    {"IsCloaked", _wrap_IUnit_IsCloaked}, 
    {"Type", _wrap_IUnit_Type}, 
    {"CanMove", _wrap_IUnit_CanMove}, 
    {"CanDeploy", _wrap_IUnit_CanDeploy}, 
    {"IsBeingBuilt", _wrap_IUnit_IsBeingBuilt}, 
    {"CanAssistBuilding", _wrap_IUnit_CanAssistBuilding}, 
    {"CanMoveWhenDeployed", _wrap_IUnit_CanMoveWhenDeployed}, 
    {"CanFireWhenDeployed", _wrap_IUnit_CanFireWhenDeployed}, 
    {"CanBuildWhenDeployed", _wrap_IUnit_CanBuildWhenDeployed}, 
    {"CanBuildWhenNotDeployed", _wrap_IUnit_CanBuildWhenNotDeployed}, 
    {"Wait", _wrap_IUnit_Wait}, 
    {"Stop", _wrap_IUnit_Stop}, 
    {"Move", _wrap_IUnit_Move}, 
    {"MoveAndFire", _wrap_IUnit_MoveAndFire}, 
    {"Build", _wrap_IUnit_Build}, 
    {"AreaReclaim", _wrap_IUnit_AreaReclaim}, 
    {"Reclaim", _wrap_IUnit_Reclaim}, 
    {"Attack", _wrap_IUnit_Attack}, 
    {"Repair", _wrap_IUnit_Repair}, 
    {"MorphInto", _wrap_IUnit_MorphInto}, 
    {"GetPosition", _wrap_IUnit_GetPosition}, 
    {"GetHealth", _wrap_IUnit_GetHealth}, 
    {"GetMaxHealth", _wrap_IUnit_GetMaxHealth}, 
    {"WeaponCount", _wrap_IUnit_WeaponCount}, 
    {"MaxWeaponsRange", _wrap_IUnit_MaxWeaponsRange}, 
    {"CanBuild", _wrap_IUnit_CanBuild}, 
    {"GetResourceUsage", _wrap_IUnit_GetResourceUsage}, 
    {"ExecuteCustomCommand", _wrap_IUnit_ExecuteCustomCommand}, 
    {0,0}
};
static swig_lua_attribute swig_IUnit_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IUnit_bases[] = {0};
static const char *swig_IUnit_base_names[] = {0};
static swig_lua_class _wrap_class_IUnit = { "IUnit", &SWIGTYPE_p_IUnit,0, swig_delete_IUnit, swig_IUnit_methods, swig_IUnit_attributes, swig_IUnit_bases, swig_IUnit_base_names };

static int _wrap_IGame_SendToConsole(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string arg2 ;
  
  SWIG_check_num_args("IGame::SendToConsole",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::SendToConsole",1,"IGame *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IGame::SendToConsole",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_SendToConsole",1,SWIGTYPE_p_IGame);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  (arg1)->SendToConsole(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_Frame(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  int result;
  
  SWIG_check_num_args("IGame::Frame",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::Frame",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_Frame",1,SWIGTYPE_p_IGame);
  }
  
  result = (int)(arg1)->Frame();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_IsPaused(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  bool result;
  
  SWIG_check_num_args("IGame::IsPaused",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::IsPaused",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_IsPaused",1,SWIGTYPE_p_IGame);
  }
  
  result = (bool)(arg1)->IsPaused();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_Map(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  IMap *result = 0 ;
  
  SWIG_check_num_args("IGame::Map",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::Map",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_Map",1,SWIGTYPE_p_IGame);
  }
  
  result = (IMap *)(arg1)->Map();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IMap,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetTypeByName(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string arg2 ;
  IUnitType *result = 0 ;
  
  SWIG_check_num_args("IGame::GetTypeByName",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetTypeByName",1,"IGame *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IGame::GetTypeByName",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetTypeByName",1,SWIGTYPE_p_IGame);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (IUnitType *)(arg1)->GetTypeByName(arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnitType,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_ConfigFolderPath(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("IGame::ConfigFolderPath",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::ConfigFolderPath",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_ConfigFolderPath",1,SWIGTYPE_p_IGame);
  }
  
  result = (char *)(arg1)->ConfigFolderPath();
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_ReadFile(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string arg2 ;
  std::string result;
  
  SWIG_check_num_args("IGame::ReadFile",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::ReadFile",1,"IGame *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IGame::ReadFile",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_ReadFile",1,SWIGTYPE_p_IGame);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (arg1)->ReadFile(arg2);
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_LocatePath(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("IGame::LocatePath",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::LocatePath",1,"IGame *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IGame::LocatePath",2,"std::string &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_LocatePath",1,SWIGTYPE_p_IGame);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("IGame_LocatePath",2,SWIGTYPE_p_std__string);
  }
  
  result = (bool)(arg1)->LocatePath(*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetTeamID(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  int result;
  
  SWIG_check_num_args("IGame::GetTeamID",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetTeamID",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetTeamID",1,SWIGTYPE_p_IGame);
  }
  
  result = (int)(arg1)->GetTeamID();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_HasEnemies(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  bool result;
  
  SWIG_check_num_args("IGame::HasEnemies",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::HasEnemies",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_HasEnemies",1,SWIGTYPE_p_IGame);
  }
  
  result = (bool)(arg1)->HasEnemies();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_HasFriendlies(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  bool result;
  
  SWIG_check_num_args("IGame::HasFriendlies",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::HasFriendlies",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_HasFriendlies",1,SWIGTYPE_p_IGame);
  }
  
  result = (bool)(arg1)->HasFriendlies();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetEnemies(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::vector< IUnit * > result;
  
  SWIG_check_num_args("IGame::GetEnemies",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetEnemies",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetEnemies",1,SWIGTYPE_p_IGame);
  }
  
  result = (arg1)->GetEnemies();
  {
    std::vector< IUnit * > * resultptr = new std::vector< IUnit * >((const std::vector< IUnit * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetFriendlies(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::vector< IUnit * > result;
  
  SWIG_check_num_args("IGame::GetFriendlies",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetFriendlies",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetFriendlies",1,SWIGTYPE_p_IGame);
  }
  
  result = (arg1)->GetFriendlies();
  {
    std::vector< IUnit * > * resultptr = new std::vector< IUnit * >((const std::vector< IUnit * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetUnits(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::vector< IUnit * > result;
  
  SWIG_check_num_args("IGame::GetUnits",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetUnits",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetUnits",1,SWIGTYPE_p_IGame);
  }
  
  result = (arg1)->GetUnits();
  {
    std::vector< IUnit * > * resultptr = new std::vector< IUnit * >((const std::vector< IUnit * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GameName(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IGame::GameName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GameName",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GameName",1,SWIGTYPE_p_IGame);
  }
  
  result = (arg1)->GameName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_FileExists(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string arg2 ;
  bool result;
  
  SWIG_check_num_args("IGame::FileExists",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::FileExists",1,"IGame *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IGame::FileExists",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_FileExists",1,SWIGTYPE_p_IGame);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (bool)(arg1)->FileExists(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_AddMarker(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  Position arg2 ;
  std::string arg3 ;
  Position *argp2 ;
  
  SWIG_check_num_args("IGame::AddMarker",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::AddMarker",1,"IGame *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IGame::AddMarker",2,"Position");
  if(!lua_isstring(L,3)) SWIG_fail_arg("IGame::AddMarker",3,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_AddMarker",1,SWIGTYPE_p_IGame);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("IGame_AddMarker",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  (&arg3)->assign(lua_tostring(L,3),lua_strlen(L,3));
  (arg1)->AddMarker(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_SendToContent(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string arg2 ;
  std::string result;
  
  SWIG_check_num_args("IGame::SendToContent",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::SendToContent",1,"IGame *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IGame::SendToContent",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_SendToContent",1,SWIGTYPE_p_IGame);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (arg1)->SendToContent(arg2);
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetResource(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  int arg2 ;
  SResourceData result;
  
  SWIG_check_num_args("IGame::GetResource",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetResource",1,"IGame *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IGame::GetResource",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetResource",1,SWIGTYPE_p_IGame);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (arg1)->GetResource(arg2);
  {
    SResourceData * resultptr = new SResourceData((const SResourceData &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_SResourceData,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetResourceCount(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  int result;
  
  SWIG_check_num_args("IGame::GetResourceCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetResourceCount",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetResourceCount",1,SWIGTYPE_p_IGame);
  }
  
  result = (int)(arg1)->GetResourceCount();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_GetResourceByName(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  std::string arg2 ;
  SResourceData result;
  
  SWIG_check_num_args("IGame::GetResourceByName",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::GetResourceByName",1,"IGame *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IGame::GetResourceByName",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_GetResourceByName",1,SWIGTYPE_p_IGame);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (arg1)->GetResourceByName(arg2);
  {
    SResourceData * resultptr = new SResourceData((const SResourceData &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_SResourceData,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_Me(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  IAI *result = 0 ;
  
  SWIG_check_num_args("IGame::Me",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::Me",1,"IGame *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_Me",1,SWIGTYPE_p_IGame);
  }
  
  result = (IAI *)(arg1)->Me();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IAI,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IGame_getUnitByID(lua_State* L) {
  int SWIG_arg = 0;
  IGame *arg1 = (IGame *) 0 ;
  int arg2 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("IGame::getUnitByID",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IGame::getUnitByID",1,"IGame *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IGame::getUnitByID",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IGame,0))){
    SWIG_fail_ptr("IGame_getUnitByID",1,SWIGTYPE_p_IGame);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (IUnit *)(arg1)->getUnitByID(arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IGame(void *obj) {
IGame *arg1 = (IGame *) obj;
delete arg1;
}
static swig_lua_method swig_IGame_methods[] = {
    {"SendToConsole", _wrap_IGame_SendToConsole}, 
    {"Frame", _wrap_IGame_Frame}, 
    {"IsPaused", _wrap_IGame_IsPaused}, 
    {"Map", _wrap_IGame_Map}, 
    {"GetTypeByName", _wrap_IGame_GetTypeByName}, 
    {"ConfigFolderPath", _wrap_IGame_ConfigFolderPath}, 
    {"ReadFile", _wrap_IGame_ReadFile}, 
    {"LocatePath", _wrap_IGame_LocatePath}, 
    {"GetTeamID", _wrap_IGame_GetTeamID}, 
    {"HasEnemies", _wrap_IGame_HasEnemies}, 
    {"HasFriendlies", _wrap_IGame_HasFriendlies}, 
    {"GetEnemies", _wrap_IGame_GetEnemies}, 
    {"GetFriendlies", _wrap_IGame_GetFriendlies}, 
    {"GetUnits", _wrap_IGame_GetUnits}, 
    {"GameName", _wrap_IGame_GameName}, 
    {"FileExists", _wrap_IGame_FileExists}, 
    {"AddMarker", _wrap_IGame_AddMarker}, 
    {"SendToContent", _wrap_IGame_SendToContent}, 
    {"GetResource", _wrap_IGame_GetResource}, 
    {"GetResourceCount", _wrap_IGame_GetResourceCount}, 
    {"GetResourceByName", _wrap_IGame_GetResourceByName}, 
    {"Me", _wrap_IGame_Me}, 
    {"getUnitByID", _wrap_IGame_getUnitByID}, 
    {0,0}
};
static swig_lua_attribute swig_IGame_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IGame_bases[] = {0};
static const char *swig_IGame_base_names[] = {0};
static swig_lua_class _wrap_class_IGame = { "IGame", &SWIGTYPE_p_IGame,0, swig_delete_IGame, swig_IGame_methods, swig_IGame_attributes, swig_IGame_bases, swig_IGame_base_names };

static int _wrap_IAI_Init(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  
  SWIG_check_num_args("IAI::Init",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::Init",1,"IAI *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_Init",1,SWIGTYPE_p_IAI);
  }
  
  (arg1)->Init();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_Update(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  
  SWIG_check_num_args("IAI::Update",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::Update",1,"IAI *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_Update",1,SWIGTYPE_p_IAI);
  }
  
  (arg1)->Update();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_GameEnd(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  
  SWIG_check_num_args("IAI::GameEnd",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::GameEnd",1,"IAI *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_GameEnd",1,SWIGTYPE_p_IAI);
  }
  
  (arg1)->GameEnd();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_GameMessage(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("IAI::GameMessage",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::GameMessage",1,"IAI *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("IAI::GameMessage",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_GameMessage",1,SWIGTYPE_p_IAI);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  (arg1)->GameMessage((char const *)arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitCreated(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IAI::UnitCreated",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitCreated",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitCreated",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitCreated",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitCreated",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->UnitCreated(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitBuilt(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IAI::UnitBuilt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitBuilt",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitBuilt",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitBuilt",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitBuilt",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->UnitBuilt(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitDead(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IAI::UnitDead",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitDead",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitDead",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitDead",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitDead",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->UnitDead(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitIdle(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IAI::UnitIdle",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitIdle",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitIdle",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitIdle",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitIdle",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->UnitIdle(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitMoveFailed(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IAI::UnitMoveFailed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitMoveFailed",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitMoveFailed",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitMoveFailed",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitMoveFailed",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->UnitMoveFailed(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitGiven(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("IAI::UnitGiven",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitGiven",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitGiven",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitGiven",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitGiven",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->UnitGiven(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IAI_UnitDamaged(lua_State* L) {
  int SWIG_arg = 0;
  IAI *arg1 = (IAI *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  IUnit *arg3 = (IUnit *) 0 ;
  IDamage::Ptr arg4 ;
  IDamage::Ptr *argp4 ;
  
  SWIG_check_num_args("IAI::UnitDamaged",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IAI::UnitDamaged",1,"IAI *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IAI::UnitDamaged",2,"IUnit *");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("IAI::UnitDamaged",3,"IUnit *");
  if(!lua_isuserdata(L,4)) SWIG_fail_arg("IAI::UnitDamaged",4,"IDamage::Ptr");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IAI,0))){
    SWIG_fail_ptr("IAI_UnitDamaged",1,SWIGTYPE_p_IAI);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitDamaged",2,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("IAI_UnitDamaged",3,SWIGTYPE_p_IUnit);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&argp4,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("IAI_UnitDamaged",4,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  arg4 = *argp4;
  
  (arg1)->UnitDamaged(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IAI(void *obj) {
IAI *arg1 = (IAI *) obj;
delete arg1;
}
static swig_lua_method swig_IAI_methods[] = {
    {"Init", _wrap_IAI_Init}, 
    {"Update", _wrap_IAI_Update}, 
    {"GameEnd", _wrap_IAI_GameEnd}, 
    {"GameMessage", _wrap_IAI_GameMessage}, 
    {"UnitCreated", _wrap_IAI_UnitCreated}, 
    {"UnitBuilt", _wrap_IAI_UnitBuilt}, 
    {"UnitDead", _wrap_IAI_UnitDead}, 
    {"UnitIdle", _wrap_IAI_UnitIdle}, 
    {"UnitMoveFailed", _wrap_IAI_UnitMoveFailed}, 
    {"UnitGiven", _wrap_IAI_UnitGiven}, 
    {"UnitDamaged", _wrap_IAI_UnitDamaged}, 
    {0,0}
};
static swig_lua_attribute swig_IAI_attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_IAI_bases[] = {0};
static const char *swig_IAI_base_names[] = {0};
static swig_lua_class _wrap_class_IAI = { "IAI", &SWIGTYPE_p_IAI,0, swig_delete_IAI, swig_IAI_methods, swig_IAI_attributes, swig_IAI_bases, swig_IAI_base_names };

static int _wrap_damagePtr___deref__(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  IDamage *result = 0 ;
  
  SWIG_check_num_args("std::shared_ptr< IDamage >::operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::shared_ptr< IDamage >::operator ->",1,"std::shared_ptr< IDamage > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr___deref__",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (IDamage *)((std::shared_ptr< IDamage > const *)arg1)->operator ->();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IDamage,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_damagePtr(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *result = 0 ;
  
  SWIG_check_num_args("std::shared_ptr< IDamage >::shared_ptr",0,0)
  result = (std::shared_ptr< IDamage > *)new std::shared_ptr< IDamage >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__shared_ptrT_IDamage_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_damagePtr_Damage(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  float result;
  
  SWIG_check_num_args("IDamage::Damage",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Damage",1,"std::shared_ptr< IDamage > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr_Damage",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (float)(*arg1)->Damage();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_damagePtr_Direction(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  Position result;
  
  SWIG_check_num_args("IDamage::Direction",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Direction",1,"std::shared_ptr< IDamage > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr_Direction",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (*arg1)->Direction();
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_damagePtr_DamageType(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IDamage::DamageType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::DamageType",1,"std::shared_ptr< IDamage > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr_DamageType",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (*arg1)->DamageType();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_damagePtr_WeaponType(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IDamage::WeaponType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::WeaponType",1,"std::shared_ptr< IDamage > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr_WeaponType",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (*arg1)->WeaponType();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_damagePtr_Attacker(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("IDamage::Attacker",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Attacker",1,"std::shared_ptr< IDamage > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr_Attacker",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (IUnit *)(*arg1)->Attacker();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_damagePtr_Effects(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) 0 ;
  SwigValueWrapper< std::vector< std::string > > result;
  
  SWIG_check_num_args("IDamage::Effects",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IDamage::Effects",1,"std::shared_ptr< IDamage > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IDamage_t,0))){
    SWIG_fail_ptr("damagePtr_Effects",1,SWIGTYPE_p_std__shared_ptrT_IDamage_t);
  }
  
  result = (*arg1)->Effects();
  {
    std::vector< std::string > * resultptr = new std::vector< std::string >((const std::vector< std::string > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_std__string_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_damagePtr(void *obj) {
std::shared_ptr< IDamage > *arg1 = (std::shared_ptr< IDamage > *) obj;
delete arg1;
}
static swig_lua_method swig_std_shared_ptr_Sl_IDamage_Sg__methods[] = {
    {"__deref__", _wrap_damagePtr___deref__}, 
    {"Damage", _wrap_damagePtr_Damage}, 
    {"Direction", _wrap_damagePtr_Direction}, 
    {"DamageType", _wrap_damagePtr_DamageType}, 
    {"WeaponType", _wrap_damagePtr_WeaponType}, 
    {"Attacker", _wrap_damagePtr_Attacker}, 
    {"Effects", _wrap_damagePtr_Effects}, 
    {0,0}
};
static swig_lua_attribute swig_std_shared_ptr_Sl_IDamage_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_shared_ptr_Sl_IDamage_Sg__bases[] = {0};
static const char *swig_std_shared_ptr_Sl_IDamage_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_shared_ptr_Sl_IDamage_Sg_ = { "damagePtr", &SWIGTYPE_p_std__shared_ptrT_IDamage_t,_wrap_new_damagePtr, swig_delete_damagePtr, swig_std_shared_ptr_Sl_IDamage_Sg__methods, swig_std_shared_ptr_Sl_IDamage_Sg__attributes, swig_std_shared_ptr_Sl_IDamage_Sg__bases, swig_std_shared_ptr_Sl_IDamage_Sg__base_names };

static int _wrap_unitPtr___deref__(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("std::shared_ptr< IUnit >::operator ->",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::shared_ptr< IUnit >::operator ->",1,"std::shared_ptr< IUnit > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr___deref__",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (IUnit *)((std::shared_ptr< IUnit > const *)arg1)->operator ->();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_unitPtr(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *result = 0 ;
  
  SWIG_check_num_args("std::shared_ptr< IUnit >::shared_ptr",0,0)
  result = (std::shared_ptr< IUnit > *)new std::shared_ptr< IUnit >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__shared_ptrT_IUnit_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_ID(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnit::ID",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ID",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_ID",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (int)(*arg1)->ID();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Team(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnit::Team",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Team",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Team",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (int)(*arg1)->Team();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Name(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  std::string result;
  
  SWIG_check_num_args("IUnit::Name",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Name",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Name",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (*arg1)->Name();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_IsAlive(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::IsAlive",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::IsAlive",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_IsAlive",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->IsAlive();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_IsCloaked(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::IsCloaked",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::IsCloaked",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_IsCloaked",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->IsCloaked();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Type(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnitType *result = 0 ;
  
  SWIG_check_num_args("IUnit::Type",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Type",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Type",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (IUnitType *)(*arg1)->Type();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnitType,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanMove(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanMove",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanMove",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanMove",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanMove();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanDeploy(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanDeploy",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanDeploy",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanDeploy",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanDeploy();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanBuild__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuild",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuild",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanBuild",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanBuild();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanBuild__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuild",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuild",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::CanBuild",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanBuild",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("unitPtr_CanBuild",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(*arg1)->CanBuild(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanBuild(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_unitPtr_CanBuild__SWIG_0(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_unitPtr_CanBuild__SWIG_1(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'unitPtr_CanBuild'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::CanBuild()\n"
    "    IUnit::CanBuild(IUnitType *)\n");
  lua_error(L);return 0;
}


static int _wrap_unitPtr_IsBeingBuilt(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::IsBeingBuilt",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::IsBeingBuilt",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_IsBeingBuilt",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->IsBeingBuilt();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanAssistBuilding(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanAssistBuilding",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanAssistBuilding",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::CanAssistBuilding",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanAssistBuilding",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("unitPtr_CanAssistBuilding",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(*arg1)->CanAssistBuilding(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanMoveWhenDeployed(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanMoveWhenDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanMoveWhenDeployed",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanMoveWhenDeployed",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanMoveWhenDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanFireWhenDeployed(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanFireWhenDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanFireWhenDeployed",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanFireWhenDeployed",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanFireWhenDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanBuildWhenDeployed(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuildWhenDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuildWhenDeployed",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanBuildWhenDeployed",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanBuildWhenDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_CanBuildWhenNotDeployed(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::CanBuildWhenNotDeployed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::CanBuildWhenNotDeployed",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_CanBuildWhenNotDeployed",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (bool)(*arg1)->CanBuildWhenNotDeployed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Wait(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("IUnit::Wait",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Wait",1,"std::shared_ptr< IUnit > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::Wait",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Wait",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (*arg1)->Wait(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Stop(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  
  SWIG_check_num_args("IUnit::Stop",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Stop",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Stop",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  (*arg1)->Stop();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Move(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  Position arg2 ;
  Position *argp2 ;
  
  SWIG_check_num_args("IUnit::Move",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Move",1,"std::shared_ptr< IUnit > *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IUnit::Move",2,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Move",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_Move",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  (*arg1)->Move(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_MoveAndFire(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  Position arg2 ;
  Position *argp2 ;
  
  SWIG_check_num_args("IUnit::MoveAndFire",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::MoveAndFire",1,"std::shared_ptr< IUnit > *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IUnit::MoveAndFire",2,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_MoveAndFire",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_MoveAndFire",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  (*arg1)->MoveAndFire(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Build",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Build",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("unitPtr_Build",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(*arg1)->Build(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  std::string arg2 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"std::shared_ptr< IUnit > *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IUnit::Build",2,"std::string");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Build",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  result = (bool)(*arg1)->Build(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  std::string arg2 ;
  Position arg3 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"std::shared_ptr< IUnit > *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IUnit::Build",2,"std::string");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Build",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  result = (bool)(*arg1)->Build(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Build",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Build",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("unitPtr_Build",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  result = (bool)(*arg1)->Build(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  std::string arg2 ;
  Position arg3 ;
  int arg4 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"std::shared_ptr< IUnit > *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("IUnit::Build",2,"std::string");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::Build",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Build",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_strlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (int)lua_tonumber(L, 4);
  result = (bool)(*arg1)->Build(arg2,arg3,arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  Position arg3 ;
  int arg4 ;
  Position *argp3 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Build",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Build",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Build",2,"IUnitType *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::Build",3,"Position");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::Build",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Build",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("unitPtr_Build",2,SWIGTYPE_p_IUnitType);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_Build",3,SWIGTYPE_p_Position);
  }
  arg3 = *argp3;
  
  arg4 = (int)lua_tonumber(L, 4);
  result = (bool)(*arg1)->Build(arg2,arg3,arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Build(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_unitPtr_Build__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_unitPtr_Build__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_unitPtr_Build__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_unitPtr_Build__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_unitPtr_Build__SWIG_5(L);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Position, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_unitPtr_Build__SWIG_4(L);
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'unitPtr_Build'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::Build(IUnitType *)\n"
    "    IUnit::Build(std::string)\n"
    "    IUnit::Build(std::string,Position)\n"
    "    IUnit::Build(IUnitType *,Position)\n"
    "    IUnit::Build(std::string,Position,int)\n"
    "    IUnit::Build(IUnitType *,Position,int)\n");
  lua_error(L);return 0;
}


static int _wrap_unitPtr_AreaReclaim(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  Position arg2 ;
  double arg3 ;
  Position *argp2 ;
  bool result;
  
  SWIG_check_num_args("IUnit::AreaReclaim",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::AreaReclaim",1,"std::shared_ptr< IUnit > *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("IUnit::AreaReclaim",2,"Position");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("IUnit::AreaReclaim",3,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_AreaReclaim",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Position,0))){
    SWIG_fail_ptr("unitPtr_AreaReclaim",2,SWIGTYPE_p_Position);
  }
  arg2 = *argp2;
  
  arg3 = (double)lua_tonumber(L, 3);
  result = (bool)(*arg1)->AreaReclaim(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Reclaim__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IMapFeature *arg2 = (IMapFeature *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Reclaim",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Reclaim",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Reclaim",2,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Reclaim",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("unitPtr_Reclaim",2,SWIGTYPE_p_IMapFeature);
  }
  
  result = (bool)(*arg1)->Reclaim(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Reclaim__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Reclaim",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Reclaim",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Reclaim",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Reclaim",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("unitPtr_Reclaim",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(*arg1)->Reclaim(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Reclaim(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IMapFeature, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_unitPtr_Reclaim__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_unitPtr_Reclaim__SWIG_1(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'unitPtr_Reclaim'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::Reclaim(IMapFeature *)\n"
    "    IUnit::Reclaim(IUnit *)\n");
  lua_error(L);return 0;
}


static int _wrap_unitPtr_Attack(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Attack",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Attack",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Attack",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Attack",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("unitPtr_Attack",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(*arg1)->Attack(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_Repair(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::Repair",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::Repair",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::Repair",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_Repair",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("unitPtr_Repair",2,SWIGTYPE_p_IUnit);
  }
  
  result = (bool)(*arg1)->Repair(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_MorphInto(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  bool result;
  
  SWIG_check_num_args("IUnit::MorphInto",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::MorphInto",1,"std::shared_ptr< IUnit > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("IUnit::MorphInto",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_MorphInto",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("unitPtr_MorphInto",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (bool)(*arg1)->MorphInto(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_GetPosition(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  Position result;
  
  SWIG_check_num_args("IUnit::GetPosition",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetPosition",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_GetPosition",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (*arg1)->GetPosition();
  {
    Position * resultptr = new Position((const Position &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Position,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_GetHealth(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnit::GetHealth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetHealth",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_GetHealth",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (float)(*arg1)->GetHealth();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_GetMaxHealth(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnit::GetMaxHealth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetMaxHealth",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_GetMaxHealth",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (float)(*arg1)->GetMaxHealth();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_WeaponCount(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int result;
  
  SWIG_check_num_args("IUnit::WeaponCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::WeaponCount",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_WeaponCount",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (int)(*arg1)->WeaponCount();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_MaxWeaponsRange(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  float result;
  
  SWIG_check_num_args("IUnit::MaxWeaponsRange",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::MaxWeaponsRange",1,"std::shared_ptr< IUnit > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_MaxWeaponsRange",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  result = (float)(*arg1)->MaxWeaponsRange();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_GetResourceUsage(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int arg2 ;
  SResourceTransfer result;
  
  SWIG_check_num_args("IUnit::GetResourceUsage",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::GetResourceUsage",1,"std::shared_ptr< IUnit > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::GetResourceUsage",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_GetResourceUsage",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (*arg1)->GetResourceUsage(arg2);
  {
    SResourceTransfer * resultptr = new SResourceTransfer((const SResourceTransfer &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_SResourceTransfer,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_ExecuteCustomCommand__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int arg2 ;
  std::vector< float > arg3 ;
  short arg4 ;
  int arg5 ;
  std::vector< float > *argp3 ;
  
  SWIG_check_num_args("IUnit::ExecuteCustomCommand",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",1,"std::shared_ptr< IUnit > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",2,"int");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",3,"std::vector< float >");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",4,"short");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",5,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_ExecuteCustomCommand",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("unitPtr_ExecuteCustomCommand",3,SWIGTYPE_p_std__vectorT_float_t);
  }
  arg3 = *argp3;
  
  arg4 = (short)lua_tonumber(L, 4);
  arg5 = (int)lua_tonumber(L, 5);
  (*arg1)->ExecuteCustomCommand(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_ExecuteCustomCommand__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int arg2 ;
  std::vector< float > arg3 ;
  short arg4 ;
  std::vector< float > *argp3 ;
  
  SWIG_check_num_args("IUnit::ExecuteCustomCommand",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",1,"std::shared_ptr< IUnit > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",2,"int");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",3,"std::vector< float >");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",4,"short");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_ExecuteCustomCommand",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("unitPtr_ExecuteCustomCommand",3,SWIGTYPE_p_std__vectorT_float_t);
  }
  arg3 = *argp3;
  
  arg4 = (short)lua_tonumber(L, 4);
  (*arg1)->ExecuteCustomCommand(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_ExecuteCustomCommand__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) 0 ;
  int arg2 ;
  std::vector< float > arg3 ;
  std::vector< float > *argp3 ;
  
  SWIG_check_num_args("IUnit::ExecuteCustomCommand",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",1,"std::shared_ptr< IUnit > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",2,"int");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("IUnit::ExecuteCustomCommand",3,"std::vector< float >");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__shared_ptrT_IUnit_t,0))){
    SWIG_fail_ptr("unitPtr_ExecuteCustomCommand",1,SWIGTYPE_p_std__shared_ptrT_IUnit_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("unitPtr_ExecuteCustomCommand",3,SWIGTYPE_p_std__vectorT_float_t);
  }
  arg3 = *argp3;
  
  (*arg1)->ExecuteCustomCommand(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_unitPtr_ExecuteCustomCommand(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_unitPtr_ExecuteCustomCommand__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_unitPtr_ExecuteCustomCommand__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__shared_ptrT_IUnit_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_unitPtr_ExecuteCustomCommand__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'unitPtr_ExecuteCustomCommand'\n"
    "  Possible C/C++ prototypes are:\n"
    "    IUnit::ExecuteCustomCommand(int,std::vector< float >,short,int)\n"
    "    IUnit::ExecuteCustomCommand(int,std::vector< float >,short)\n"
    "    IUnit::ExecuteCustomCommand(int,std::vector< float >)\n");
  lua_error(L);return 0;
}


static void swig_delete_unitPtr(void *obj) {
std::shared_ptr< IUnit > *arg1 = (std::shared_ptr< IUnit > *) obj;
delete arg1;
}
static swig_lua_method swig_std_shared_ptr_Sl_IUnit_Sg__methods[] = {
    {"__deref__", _wrap_unitPtr___deref__}, 
    {"ID", _wrap_unitPtr_ID}, 
    {"Team", _wrap_unitPtr_Team}, 
    {"Name", _wrap_unitPtr_Name}, 
    {"IsAlive", _wrap_unitPtr_IsAlive}, 
    {"IsCloaked", _wrap_unitPtr_IsCloaked}, 
    {"Type", _wrap_unitPtr_Type}, 
    {"CanMove", _wrap_unitPtr_CanMove}, 
    {"CanDeploy", _wrap_unitPtr_CanDeploy}, 
    {"CanBuild", _wrap_unitPtr_CanBuild}, 
    {"IsBeingBuilt", _wrap_unitPtr_IsBeingBuilt}, 
    {"CanAssistBuilding", _wrap_unitPtr_CanAssistBuilding}, 
    {"CanMoveWhenDeployed", _wrap_unitPtr_CanMoveWhenDeployed}, 
    {"CanFireWhenDeployed", _wrap_unitPtr_CanFireWhenDeployed}, 
    {"CanBuildWhenDeployed", _wrap_unitPtr_CanBuildWhenDeployed}, 
    {"CanBuildWhenNotDeployed", _wrap_unitPtr_CanBuildWhenNotDeployed}, 
    {"Wait", _wrap_unitPtr_Wait}, 
    {"Stop", _wrap_unitPtr_Stop}, 
    {"Move", _wrap_unitPtr_Move}, 
    {"MoveAndFire", _wrap_unitPtr_MoveAndFire}, 
    {"Build", _wrap_unitPtr_Build}, 
    {"AreaReclaim", _wrap_unitPtr_AreaReclaim}, 
    {"Reclaim", _wrap_unitPtr_Reclaim}, 
    {"Attack", _wrap_unitPtr_Attack}, 
    {"Repair", _wrap_unitPtr_Repair}, 
    {"MorphInto", _wrap_unitPtr_MorphInto}, 
    {"GetPosition", _wrap_unitPtr_GetPosition}, 
    {"GetHealth", _wrap_unitPtr_GetHealth}, 
    {"GetMaxHealth", _wrap_unitPtr_GetMaxHealth}, 
    {"WeaponCount", _wrap_unitPtr_WeaponCount}, 
    {"MaxWeaponsRange", _wrap_unitPtr_MaxWeaponsRange}, 
    {"GetResourceUsage", _wrap_unitPtr_GetResourceUsage}, 
    {"ExecuteCustomCommand", _wrap_unitPtr_ExecuteCustomCommand}, 
    {0,0}
};
static swig_lua_attribute swig_std_shared_ptr_Sl_IUnit_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_shared_ptr_Sl_IUnit_Sg__bases[] = {0};
static const char *swig_std_shared_ptr_Sl_IUnit_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_shared_ptr_Sl_IUnit_Sg_ = { "unitPtr", &SWIGTYPE_p_std__shared_ptrT_IUnit_t,_wrap_new_unitPtr, swig_delete_unitPtr, swig_std_shared_ptr_Sl_IUnit_Sg__methods, swig_std_shared_ptr_Sl_IUnit_Sg__attributes, swig_std_shared_ptr_Sl_IUnit_Sg__bases, swig_std_shared_ptr_Sl_IUnit_Sg__base_names };

static int _wrap_new_vectorUnitTypes__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::vector",0,0)
  result = (std::vector< IUnitType * > *)new std::vector< IUnitType * >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnitType_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnitTypes__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  std::vector< IUnitType * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::vector",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::vector",1,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  result = (std::vector< IUnitType * > *)new std::vector< IUnitType * >(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnitType_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnitTypes__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = 0 ;
  std::vector< IUnitType * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::vector",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::vector",1,"std::vector< IUnitType * > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("new_vectorUnitTypes",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  result = (std::vector< IUnitType * > *)new std::vector< IUnitType * >((std::vector< IUnitType * > const &)*arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnitType_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnitTypes__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  std::vector< IUnitType * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::vector",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::vector",1,"unsigned int");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("std::vector< IUnitType * >::vector",2,"IUnitType *");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("new_vectorUnitTypes",2,SWIGTYPE_p_IUnitType);
  }
  
  result = (std::vector< IUnitType * > *)new std::vector< IUnitType * >(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnitType_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnitTypes(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_vectorUnitTypes__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__vectorT_IUnitType_p_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_vectorUnitTypes__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_vectorUnitTypes__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnitType, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_new_vectorUnitTypes__SWIG_3(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_vectorUnitTypes'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< IUnitType * >::vector()\n"
    "    std::vector< IUnitType * >::vector(unsigned int)\n"
    "    std::vector< IUnitType * >::vector(std::vector< IUnitType * > const &)\n"
    "    std::vector< IUnitType * >::vector(unsigned int,IUnitType *)\n");
  lua_error(L);return 0;
}


static int _wrap_vectorUnitTypes_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< IUnitType * >::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::size",1,"std::vector< IUnitType * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_size",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  result = (unsigned int)((std::vector< IUnitType * > const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_max_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< IUnitType * >::max_size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::max_size",1,"std::vector< IUnitType * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_max_size",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  result = (unsigned int)((std::vector< IUnitType * > const *)arg1)->max_size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::vector< IUnitType * >::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::empty",1,"std::vector< IUnitType * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_empty",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  result = (bool)((std::vector< IUnitType * > const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_clear(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::clear",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::clear",1,"std::vector< IUnitType * > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_clear",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  (arg1)->clear();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_push_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  IUnitType *arg2 = (IUnitType *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::push_back",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::push_back",1,"std::vector< IUnitType * > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("std::vector< IUnitType * >::push_back",2,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_push_back",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("vectorUnitTypes_push_back",2,SWIGTYPE_p_IUnitType);
  }
  
  (arg1)->push_back(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_pop_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::pop_back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::pop_back",1,"std::vector< IUnitType * > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_pop_back",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  (arg1)->pop_back();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_front(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  IUnitType *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::front",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::front",1,"std::vector< IUnitType * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_front",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  result = (IUnitType *)((std::vector< IUnitType * > const *)arg1)->front();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnitType,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  IUnitType *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::back",1,"std::vector< IUnitType * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes_back",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  result = (IUnitType *)((std::vector< IUnitType * > const *)arg1)->back();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnitType,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes___getitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  unsigned int arg2 ;
  IUnitType *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::__getitem__",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::__getitem__",1,"std::vector< IUnitType * > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< IUnitType * >::__getitem__",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes___getitem",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  try {
    result = (IUnitType *)std_vector_Sl_IUnitType_Sm__Sg____getitem__(arg1,arg2);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnitType,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnitTypes___setitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) 0 ;
  unsigned int arg2 ;
  IUnitType *arg3 = (IUnitType *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnitType * >::__setitem__",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnitType * >::__setitem__",1,"std::vector< IUnitType * > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< IUnitType * >::__setitem__",2,"unsigned int");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("std::vector< IUnitType * >::__setitem__",3,"IUnitType *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnitType_p_t,0))){
    SWIG_fail_ptr("vectorUnitTypes___setitem",1,SWIGTYPE_p_std__vectorT_IUnitType_p_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_IUnitType,0))){
    SWIG_fail_ptr("vectorUnitTypes___setitem",3,SWIGTYPE_p_IUnitType);
  }
  
  try {
    std_vector_Sl_IUnitType_Sm__Sg____setitem__(arg1,arg2,arg3);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_vectorUnitTypes(void *obj) {
std::vector< IUnitType * > *arg1 = (std::vector< IUnitType * > *) obj;
delete arg1;
}
static swig_lua_method swig_std_vector_Sl_IUnitType_Sm__Sg__methods[] = {
    {"size", _wrap_vectorUnitTypes_size}, 
    {"max_size", _wrap_vectorUnitTypes_max_size}, 
    {"empty", _wrap_vectorUnitTypes_empty}, 
    {"clear", _wrap_vectorUnitTypes_clear}, 
    {"push_back", _wrap_vectorUnitTypes_push_back}, 
    {"pop_back", _wrap_vectorUnitTypes_pop_back}, 
    {"front", _wrap_vectorUnitTypes_front}, 
    {"back", _wrap_vectorUnitTypes_back}, 
    {"__getitem", _wrap_vectorUnitTypes___getitem}, 
    {"__setitem", _wrap_vectorUnitTypes___setitem}, 
    {0,0}
};
static swig_lua_attribute swig_std_vector_Sl_IUnitType_Sm__Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_vector_Sl_IUnitType_Sm__Sg__bases[] = {0};
static const char *swig_std_vector_Sl_IUnitType_Sm__Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_vector_Sl_IUnitType_Sm__Sg_ = { "vectorUnitTypes", &SWIGTYPE_p_std__vectorT_IUnitType_p_t,_wrap_new_vectorUnitTypes, swig_delete_vectorUnitTypes, swig_std_vector_Sl_IUnitType_Sm__Sg__methods, swig_std_vector_Sl_IUnitType_Sm__Sg__attributes, swig_std_vector_Sl_IUnitType_Sm__Sg__bases, swig_std_vector_Sl_IUnitType_Sm__Sg__base_names };

static int _wrap_new_vectorUnits__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::vector",0,0)
  result = (std::vector< IUnit * > *)new std::vector< IUnit * >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnits__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  std::vector< IUnit * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::vector",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< IUnit * >::vector",1,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  result = (std::vector< IUnit * > *)new std::vector< IUnit * >(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnits__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = 0 ;
  std::vector< IUnit * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::vector",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("std::vector< IUnit * >::vector",1,"std::vector< IUnit * > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("new_vectorUnits",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  result = (std::vector< IUnit * > *)new std::vector< IUnit * >((std::vector< IUnit * > const &)*arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnits__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  IUnit *arg2 = (IUnit *) 0 ;
  std::vector< IUnit * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::vector",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< IUnit * >::vector",1,"unsigned int");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("std::vector< IUnit * >::vector",2,"IUnit *");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("new_vectorUnits",2,SWIGTYPE_p_IUnit);
  }
  
  result = (std::vector< IUnit * > *)new std::vector< IUnit * >(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IUnit_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorUnits(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_vectorUnits__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__vectorT_IUnit_p_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_vectorUnits__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_vectorUnits__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IUnit, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_new_vectorUnits__SWIG_3(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_vectorUnits'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< IUnit * >::vector()\n"
    "    std::vector< IUnit * >::vector(unsigned int)\n"
    "    std::vector< IUnit * >::vector(std::vector< IUnit * > const &)\n"
    "    std::vector< IUnit * >::vector(unsigned int,IUnit *)\n");
  lua_error(L);return 0;
}


static int _wrap_vectorUnits_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< IUnit * >::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::size",1,"std::vector< IUnit * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_size",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  result = (unsigned int)((std::vector< IUnit * > const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_max_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< IUnit * >::max_size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::max_size",1,"std::vector< IUnit * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_max_size",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  result = (unsigned int)((std::vector< IUnit * > const *)arg1)->max_size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::vector< IUnit * >::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::empty",1,"std::vector< IUnit * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_empty",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  result = (bool)((std::vector< IUnit * > const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_clear(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::clear",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::clear",1,"std::vector< IUnit * > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_clear",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  (arg1)->clear();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_push_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  IUnit *arg2 = (IUnit *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::push_back",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::push_back",1,"std::vector< IUnit * > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("std::vector< IUnit * >::push_back",2,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_push_back",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("vectorUnits_push_back",2,SWIGTYPE_p_IUnit);
  }
  
  (arg1)->push_back(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_pop_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::pop_back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::pop_back",1,"std::vector< IUnit * > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_pop_back",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  (arg1)->pop_back();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_front(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::front",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::front",1,"std::vector< IUnit * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_front",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  result = (IUnit *)((std::vector< IUnit * > const *)arg1)->front();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::back",1,"std::vector< IUnit * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits_back",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  result = (IUnit *)((std::vector< IUnit * > const *)arg1)->back();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits___getitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  unsigned int arg2 ;
  IUnit *result = 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::__getitem__",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::__getitem__",1,"std::vector< IUnit * > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< IUnit * >::__getitem__",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits___getitem",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  try {
    result = (IUnit *)std_vector_Sl_IUnit_Sm__Sg____getitem__(arg1,arg2);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IUnit,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorUnits___setitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) 0 ;
  unsigned int arg2 ;
  IUnit *arg3 = (IUnit *) 0 ;
  
  SWIG_check_num_args("std::vector< IUnit * >::__setitem__",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IUnit * >::__setitem__",1,"std::vector< IUnit * > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< IUnit * >::__setitem__",2,"unsigned int");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("std::vector< IUnit * >::__setitem__",3,"IUnit *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IUnit_p_t,0))){
    SWIG_fail_ptr("vectorUnits___setitem",1,SWIGTYPE_p_std__vectorT_IUnit_p_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_IUnit,0))){
    SWIG_fail_ptr("vectorUnits___setitem",3,SWIGTYPE_p_IUnit);
  }
  
  try {
    std_vector_Sl_IUnit_Sm__Sg____setitem__(arg1,arg2,arg3);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_vectorUnits(void *obj) {
std::vector< IUnit * > *arg1 = (std::vector< IUnit * > *) obj;
delete arg1;
}
static swig_lua_method swig_std_vector_Sl_IUnit_Sm__Sg__methods[] = {
    {"size", _wrap_vectorUnits_size}, 
    {"max_size", _wrap_vectorUnits_max_size}, 
    {"empty", _wrap_vectorUnits_empty}, 
    {"clear", _wrap_vectorUnits_clear}, 
    {"push_back", _wrap_vectorUnits_push_back}, 
    {"pop_back", _wrap_vectorUnits_pop_back}, 
    {"front", _wrap_vectorUnits_front}, 
    {"back", _wrap_vectorUnits_back}, 
    {"__getitem", _wrap_vectorUnits___getitem}, 
    {"__setitem", _wrap_vectorUnits___setitem}, 
    {0,0}
};
static swig_lua_attribute swig_std_vector_Sl_IUnit_Sm__Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_vector_Sl_IUnit_Sm__Sg__bases[] = {0};
static const char *swig_std_vector_Sl_IUnit_Sm__Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_vector_Sl_IUnit_Sm__Sg_ = { "vectorUnits", &SWIGTYPE_p_std__vectorT_IUnit_p_t,_wrap_new_vectorUnits, swig_delete_vectorUnits, swig_std_vector_Sl_IUnit_Sm__Sg__methods, swig_std_vector_Sl_IUnit_Sm__Sg__attributes, swig_std_vector_Sl_IUnit_Sm__Sg__bases, swig_std_vector_Sl_IUnit_Sm__Sg__base_names };

static int _wrap_new_vectorFloat__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *result = 0 ;
  
  SWIG_check_num_args("std::vector< float >::vector",0,0)
  result = (std::vector< float > *)new std::vector< float >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_float_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorFloat__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  std::vector< float > *result = 0 ;
  
  SWIG_check_num_args("std::vector< float >::vector",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< float >::vector",1,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  result = (std::vector< float > *)new std::vector< float >(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_float_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorFloat__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = 0 ;
  std::vector< float > *result = 0 ;
  
  SWIG_check_num_args("std::vector< float >::vector",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("std::vector< float >::vector",1,"std::vector< float > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("new_vectorFloat",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  result = (std::vector< float > *)new std::vector< float >((std::vector< float > const &)*arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_float_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorFloat__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  float arg2 ;
  std::vector< float > *result = 0 ;
  
  SWIG_check_num_args("std::vector< float >::vector",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< float >::vector",1,"unsigned int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< float >::vector",2,"float");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = (std::vector< float > *)new std::vector< float >(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_float_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorFloat(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_vectorFloat__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__vectorT_float_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_vectorFloat__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_vectorFloat__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_vectorFloat__SWIG_3(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_vectorFloat'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< float >::vector()\n"
    "    std::vector< float >::vector(unsigned int)\n"
    "    std::vector< float >::vector(std::vector< float > const &)\n"
    "    std::vector< float >::vector(unsigned int,float)\n");
  lua_error(L);return 0;
}


static int _wrap_vectorFloat_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< float >::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::size",1,"std::vector< float > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_size",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  result = (unsigned int)((std::vector< float > const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_max_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< float >::max_size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::max_size",1,"std::vector< float > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_max_size",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  result = (unsigned int)((std::vector< float > const *)arg1)->max_size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::vector< float >::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::empty",1,"std::vector< float > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_empty",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  result = (bool)((std::vector< float > const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_clear(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  
  SWIG_check_num_args("std::vector< float >::clear",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::clear",1,"std::vector< float > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_clear",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  (arg1)->clear();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_push_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("std::vector< float >::push_back",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::push_back",1,"std::vector< float > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< float >::push_back",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_push_back",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->push_back(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_pop_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  
  SWIG_check_num_args("std::vector< float >::pop_back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::pop_back",1,"std::vector< float > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_pop_back",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  (arg1)->pop_back();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_front(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  float result;
  
  SWIG_check_num_args("std::vector< float >::front",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::front",1,"std::vector< float > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_front",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  result = (float)((std::vector< float > const *)arg1)->front();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  float result;
  
  SWIG_check_num_args("std::vector< float >::back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::back",1,"std::vector< float > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat_back",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  result = (float)((std::vector< float > const *)arg1)->back();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat___getitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  unsigned int arg2 ;
  float result;
  
  SWIG_check_num_args("std::vector< float >::__getitem__",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::__getitem__",1,"std::vector< float > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< float >::__getitem__",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat___getitem",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  try {
    result = (float)std_vector_Sl_float_Sg____getitem__(arg1,arg2);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorFloat___setitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
  unsigned int arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("std::vector< float >::__setitem__",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< float >::__setitem__",1,"std::vector< float > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< float >::__setitem__",2,"unsigned int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("std::vector< float >::__setitem__",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_float_t,0))){
    SWIG_fail_ptr("vectorFloat___setitem",1,SWIGTYPE_p_std__vectorT_float_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  try {
    std_vector_Sl_float_Sg____setitem__(arg1,arg2,arg3);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_vectorFloat(void *obj) {
std::vector< float > *arg1 = (std::vector< float > *) obj;
delete arg1;
}
static swig_lua_method swig_std_vector_Sl_float_Sg__methods[] = {
    {"size", _wrap_vectorFloat_size}, 
    {"max_size", _wrap_vectorFloat_max_size}, 
    {"empty", _wrap_vectorFloat_empty}, 
    {"clear", _wrap_vectorFloat_clear}, 
    {"push_back", _wrap_vectorFloat_push_back}, 
    {"pop_back", _wrap_vectorFloat_pop_back}, 
    {"front", _wrap_vectorFloat_front}, 
    {"back", _wrap_vectorFloat_back}, 
    {"__getitem", _wrap_vectorFloat___getitem}, 
    {"__setitem", _wrap_vectorFloat___setitem}, 
    {0,0}
};
static swig_lua_attribute swig_std_vector_Sl_float_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_vector_Sl_float_Sg__bases[] = {0};
static const char *swig_std_vector_Sl_float_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_vector_Sl_float_Sg_ = { "vectorFloat", &SWIGTYPE_p_std__vectorT_float_t,_wrap_new_vectorFloat, swig_delete_vectorFloat, swig_std_vector_Sl_float_Sg__methods, swig_std_vector_Sl_float_Sg__attributes, swig_std_vector_Sl_float_Sg__bases, swig_std_vector_Sl_float_Sg__base_names };

static int _wrap_new_vectorInt__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *result = 0 ;
  
  SWIG_check_num_args("std::vector< int >::vector",0,0)
  result = (std::vector< int > *)new std::vector< int >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_int_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorInt__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  std::vector< int > *result = 0 ;
  
  SWIG_check_num_args("std::vector< int >::vector",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< int >::vector",1,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  result = (std::vector< int > *)new std::vector< int >(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_int_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorInt__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = 0 ;
  std::vector< int > *result = 0 ;
  
  SWIG_check_num_args("std::vector< int >::vector",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("std::vector< int >::vector",1,"std::vector< int > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("new_vectorInt",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_int_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorInt__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  int arg2 ;
  std::vector< int > *result = 0 ;
  
  SWIG_check_num_args("std::vector< int >::vector",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< int >::vector",1,"unsigned int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< int >::vector",2,"int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  result = (std::vector< int > *)new std::vector< int >(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_int_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorInt(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_vectorInt__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__vectorT_int_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_vectorInt__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_vectorInt__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_vectorInt__SWIG_3(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_vectorInt'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::vector()\n"
    "    std::vector< int >::vector(unsigned int)\n"
    "    std::vector< int >::vector(std::vector< int > const &)\n"
    "    std::vector< int >::vector(unsigned int,int)\n");
  lua_error(L);return 0;
}


static int _wrap_vectorInt_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< int >::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::size",1,"std::vector< int > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_size",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  result = (unsigned int)((std::vector< int > const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_max_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< int >::max_size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::max_size",1,"std::vector< int > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_max_size",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  result = (unsigned int)((std::vector< int > const *)arg1)->max_size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::vector< int >::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::empty",1,"std::vector< int > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_empty",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  result = (bool)((std::vector< int > const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_clear(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  
  SWIG_check_num_args("std::vector< int >::clear",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::clear",1,"std::vector< int > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_clear",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  (arg1)->clear();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_push_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("std::vector< int >::push_back",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::push_back",1,"std::vector< int > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< int >::push_back",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_push_back",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->push_back(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_pop_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  
  SWIG_check_num_args("std::vector< int >::pop_back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::pop_back",1,"std::vector< int > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_pop_back",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  (arg1)->pop_back();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_front(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  int result;
  
  SWIG_check_num_args("std::vector< int >::front",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::front",1,"std::vector< int > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_front",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  result = (int)((std::vector< int > const *)arg1)->front();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  int result;
  
  SWIG_check_num_args("std::vector< int >::back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::back",1,"std::vector< int > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt_back",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  result = (int)((std::vector< int > const *)arg1)->back();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt___getitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  unsigned int arg2 ;
  int result;
  
  SWIG_check_num_args("std::vector< int >::__getitem__",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::__getitem__",1,"std::vector< int > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< int >::__getitem__",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt___getitem",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  try {
    result = (int)std_vector_Sl_int_Sg____getitem__(arg1,arg2);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorInt___setitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  unsigned int arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("std::vector< int >::__setitem__",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< int >::__setitem__",1,"std::vector< int > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< int >::__setitem__",2,"unsigned int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("std::vector< int >::__setitem__",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_int_t,0))){
    SWIG_fail_ptr("vectorInt___setitem",1,SWIGTYPE_p_std__vectorT_int_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  try {
    std_vector_Sl_int_Sg____setitem__(arg1,arg2,arg3);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_vectorInt(void *obj) {
std::vector< int > *arg1 = (std::vector< int > *) obj;
delete arg1;
}
static swig_lua_method swig_std_vector_Sl_int_Sg__methods[] = {
    {"size", _wrap_vectorInt_size}, 
    {"max_size", _wrap_vectorInt_max_size}, 
    {"empty", _wrap_vectorInt_empty}, 
    {"clear", _wrap_vectorInt_clear}, 
    {"push_back", _wrap_vectorInt_push_back}, 
    {"pop_back", _wrap_vectorInt_pop_back}, 
    {"front", _wrap_vectorInt_front}, 
    {"back", _wrap_vectorInt_back}, 
    {"__getitem", _wrap_vectorInt___getitem}, 
    {"__setitem", _wrap_vectorInt___setitem}, 
    {0,0}
};
static swig_lua_attribute swig_std_vector_Sl_int_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_vector_Sl_int_Sg__bases[] = {0};
static const char *swig_std_vector_Sl_int_Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_vector_Sl_int_Sg_ = { "vectorInt", &SWIGTYPE_p_std__vectorT_int_t,_wrap_new_vectorInt, swig_delete_vectorInt, swig_std_vector_Sl_int_Sg__methods, swig_std_vector_Sl_int_Sg__attributes, swig_std_vector_Sl_int_Sg__bases, swig_std_vector_Sl_int_Sg__base_names };

static int _wrap_new_vectorMapFeature__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::vector",0,0)
  result = (std::vector< IMapFeature * > *)new std::vector< IMapFeature * >();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorMapFeature__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  std::vector< IMapFeature * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::vector",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::vector",1,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  result = (std::vector< IMapFeature * > *)new std::vector< IMapFeature * >(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorMapFeature__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = 0 ;
  std::vector< IMapFeature * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::vector",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::vector",1,"std::vector< IMapFeature * > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("new_vectorMapFeature",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  result = (std::vector< IMapFeature * > *)new std::vector< IMapFeature * >((std::vector< IMapFeature * > const &)*arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorMapFeature__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  IMapFeature *arg2 = (IMapFeature *) 0 ;
  std::vector< IMapFeature * > *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::vector",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::vector",1,"unsigned int");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("std::vector< IMapFeature * >::vector",2,"IMapFeature *");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("new_vectorMapFeature",2,SWIGTYPE_p_IMapFeature);
  }
  
  result = (std::vector< IMapFeature * > *)new std::vector< IMapFeature * >(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_vectorMapFeature(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_vectorMapFeature__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_std__vectorT_IMapFeature_p_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_vectorMapFeature__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_vectorMapFeature__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_IMapFeature, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_new_vectorMapFeature__SWIG_3(L);
      }
    }
  }
  
  lua_pushstring(L,"Wrong arguments for overloaded function 'new_vectorMapFeature'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< IMapFeature * >::vector()\n"
    "    std::vector< IMapFeature * >::vector(unsigned int)\n"
    "    std::vector< IMapFeature * >::vector(std::vector< IMapFeature * > const &)\n"
    "    std::vector< IMapFeature * >::vector(unsigned int,IMapFeature *)\n");
  lua_error(L);return 0;
}


static int _wrap_vectorMapFeature_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::size",1,"std::vector< IMapFeature * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_size",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  result = (unsigned int)((std::vector< IMapFeature * > const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_max_size(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::max_size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::max_size",1,"std::vector< IMapFeature * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_max_size",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  result = (unsigned int)((std::vector< IMapFeature * > const *)arg1)->max_size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::empty",1,"std::vector< IMapFeature * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_empty",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  result = (bool)((std::vector< IMapFeature * > const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_clear(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::clear",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::clear",1,"std::vector< IMapFeature * > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_clear",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  (arg1)->clear();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_push_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  IMapFeature *arg2 = (IMapFeature *) 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::push_back",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::push_back",1,"std::vector< IMapFeature * > *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("std::vector< IMapFeature * >::push_back",2,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_push_back",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("vectorMapFeature_push_back",2,SWIGTYPE_p_IMapFeature);
  }
  
  (arg1)->push_back(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_pop_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::pop_back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::pop_back",1,"std::vector< IMapFeature * > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_pop_back",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  (arg1)->pop_back();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_front(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  IMapFeature *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::front",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::front",1,"std::vector< IMapFeature * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_front",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  result = (IMapFeature *)((std::vector< IMapFeature * > const *)arg1)->front();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IMapFeature,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature_back(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  IMapFeature *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::back",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::back",1,"std::vector< IMapFeature * > const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature_back",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  result = (IMapFeature *)((std::vector< IMapFeature * > const *)arg1)->back();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IMapFeature,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature___getitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  unsigned int arg2 ;
  IMapFeature *result = 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::__getitem__",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::__getitem__",1,"std::vector< IMapFeature * > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< IMapFeature * >::__getitem__",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature___getitem",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  try {
    result = (IMapFeature *)std_vector_Sl_IMapFeature_Sm__Sg____getitem__(arg1,arg2);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_IMapFeature,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_vectorMapFeature___setitem(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) 0 ;
  unsigned int arg2 ;
  IMapFeature *arg3 = (IMapFeature *) 0 ;
  
  SWIG_check_num_args("std::vector< IMapFeature * >::__setitem__",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::vector< IMapFeature * >::__setitem__",1,"std::vector< IMapFeature * > *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("std::vector< IMapFeature * >::__setitem__",2,"unsigned int");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("std::vector< IMapFeature * >::__setitem__",3,"IMapFeature *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t,0))){
    SWIG_fail_ptr("vectorMapFeature___setitem",1,SWIGTYPE_p_std__vectorT_IMapFeature_p_t);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_IMapFeature,0))){
    SWIG_fail_ptr("vectorMapFeature___setitem",3,SWIGTYPE_p_IMapFeature);
  }
  
  try {
    std_vector_Sl_IMapFeature_Sm__Sg____setitem__(arg1,arg2,arg3);
  }
  catch(std::out_of_range &_e) {
    SWIG_exception(SWIG_IndexError, (&_e)->what());
  }
  
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_vectorMapFeature(void *obj) {
std::vector< IMapFeature * > *arg1 = (std::vector< IMapFeature * > *) obj;
delete arg1;
}
static swig_lua_method swig_std_vector_Sl_IMapFeature_Sm__Sg__methods[] = {
    {"size", _wrap_vectorMapFeature_size}, 
    {"max_size", _wrap_vectorMapFeature_max_size}, 
    {"empty", _wrap_vectorMapFeature_empty}, 
    {"clear", _wrap_vectorMapFeature_clear}, 
    {"push_back", _wrap_vectorMapFeature_push_back}, 
    {"pop_back", _wrap_vectorMapFeature_pop_back}, 
    {"front", _wrap_vectorMapFeature_front}, 
    {"back", _wrap_vectorMapFeature_back}, 
    {"__getitem", _wrap_vectorMapFeature___getitem}, 
    {"__setitem", _wrap_vectorMapFeature___setitem}, 
    {0,0}
};
static swig_lua_attribute swig_std_vector_Sl_IMapFeature_Sm__Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_class *swig_std_vector_Sl_IMapFeature_Sm__Sg__bases[] = {0};
static const char *swig_std_vector_Sl_IMapFeature_Sm__Sg__base_names[] = {0};
static swig_lua_class _wrap_class_std_vector_Sl_IMapFeature_Sm__Sg_ = { "vectorMapFeature", &SWIGTYPE_p_std__vectorT_IMapFeature_p_t,_wrap_new_vectorMapFeature, swig_delete_vectorMapFeature, swig_std_vector_Sl_IMapFeature_Sm__Sg__methods, swig_std_vector_Sl_IMapFeature_Sm__Sg__attributes, swig_std_vector_Sl_IMapFeature_Sm__Sg__bases, swig_std_vector_Sl_IMapFeature_Sm__Sg__base_names };

#ifdef __cplusplus
}
#endif

static const struct luaL_reg swig_commands[] = {
    {0,0}
};

static swig_lua_var_info swig_variables[] = {
    {0,0,0}
};

static swig_lua_const_info swig_constants[] = {
    {0,0,0,0,0,0}
};

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static swig_type_info _swigt__p_IAI = {"_p_IAI", "IAI *", 0, 0, (void*)&_wrap_class_IAI, 0};
static swig_type_info _swigt__p_IDamage = {"_p_IDamage", "IDamage *", 0, 0, (void*)&_wrap_class_IDamage, 0};
static swig_type_info _swigt__p_IGame = {"_p_IGame", "IGame *", 0, 0, (void*)&_wrap_class_IGame, 0};
static swig_type_info _swigt__p_IMap = {"_p_IMap", "IMap *", 0, 0, (void*)&_wrap_class_IMap, 0};
static swig_type_info _swigt__p_IMapFeature = {"_p_IMapFeature", "IMapFeature *", 0, 0, (void*)&_wrap_class_IMapFeature, 0};
static swig_type_info _swigt__p_IUnit = {"_p_IUnit", "IUnit *", 0, 0, (void*)&_wrap_class_IUnit, 0};
static swig_type_info _swigt__p_IUnitType = {"_p_IUnitType", "IUnitType *", 0, 0, (void*)&_wrap_class_IUnitType, 0};
static swig_type_info _swigt__p_Position = {"_p_Position", "Position *", 0, 0, (void*)&_wrap_class_Position, 0};
static swig_type_info _swigt__p_Ptr = {"_p_Ptr", "Ptr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_SResourceData = {"_p_SResourceData", "SResourceData *", 0, 0, (void*)&_wrap_class_SResourceData, 0};
static swig_type_info _swigt__p_SResourceTransfer = {"_p_SResourceTransfer", "SResourceTransfer *", 0, 0, (void*)&_wrap_class_SResourceTransfer, 0};
static swig_type_info _swigt__p_std__shared_ptrT_IDamage_t = {"_p_std__shared_ptrT_IDamage_t", "std::shared_ptr< IDamage > *|IDamage::Ptr *", 0, 0, (void*)&_wrap_class_std_shared_ptr_Sl_IDamage_Sg_, 0};
static swig_type_info _swigt__p_std__shared_ptrT_IUnit_t = {"_p_std__shared_ptrT_IUnit_t", "std::shared_ptr< IUnit > *", 0, 0, (void*)&_wrap_class_std_shared_ptr_Sl_IUnit_Sg_, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)&_wrap_class_std_string, 0};
static swig_type_info _swigt__p_std__vectorT_IMapFeature_p_t = {"_p_std__vectorT_IMapFeature_p_t", "std::vector< IMapFeature * > *", 0, 0, (void*)&_wrap_class_std_vector_Sl_IMapFeature_Sm__Sg_, 0};
static swig_type_info _swigt__p_std__vectorT_IUnitType_p_t = {"_p_std__vectorT_IUnitType_p_t", "std::vector< IUnitType * > *", 0, 0, (void*)&_wrap_class_std_vector_Sl_IUnitType_Sm__Sg_, 0};
static swig_type_info _swigt__p_std__vectorT_IUnit_p_t = {"_p_std__vectorT_IUnit_p_t", "std::vector< IUnit * > *", 0, 0, (void*)&_wrap_class_std_vector_Sl_IUnit_Sm__Sg_, 0};
static swig_type_info _swigt__p_std__vectorT_Position_t = {"_p_std__vectorT_Position_t", "std::vector< Position > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_float_t = {"_p_std__vectorT_float_t", "std::vector< float > *", 0, 0, (void*)&_wrap_class_std_vector_Sl_float_Sg_, 0};
static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< int > *", 0, 0, (void*)&_wrap_class_std_vector_Sl_int_Sg_, 0};
static swig_type_info _swigt__p_std__vectorT_std__string_t = {"_p_std__vectorT_std__string_t", "std::vector< std::string > *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_IAI,
  &_swigt__p_IDamage,
  &_swigt__p_IGame,
  &_swigt__p_IMap,
  &_swigt__p_IMapFeature,
  &_swigt__p_IUnit,
  &_swigt__p_IUnitType,
  &_swigt__p_Position,
  &_swigt__p_Ptr,
  &_swigt__p_SResourceData,
  &_swigt__p_SResourceTransfer,
  &_swigt__p_std__shared_ptrT_IDamage_t,
  &_swigt__p_std__shared_ptrT_IUnit_t,
  &_swigt__p_std__string,
  &_swigt__p_std__vectorT_IMapFeature_p_t,
  &_swigt__p_std__vectorT_IUnitType_p_t,
  &_swigt__p_std__vectorT_IUnit_p_t,
  &_swigt__p_std__vectorT_Position_t,
  &_swigt__p_std__vectorT_float_t,
  &_swigt__p_std__vectorT_int_t,
  &_swigt__p_std__vectorT_std__string_t,
};

static swig_cast_info _swigc__p_IAI[] = {  {&_swigt__p_IAI, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IDamage[] = {  {&_swigt__p_IDamage, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IGame[] = {  {&_swigt__p_IGame, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IMap[] = {  {&_swigt__p_IMap, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IMapFeature[] = {  {&_swigt__p_IMapFeature, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IUnit[] = {  {&_swigt__p_IUnit, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IUnitType[] = {  {&_swigt__p_IUnitType, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Position[] = {  {&_swigt__p_Position, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Ptr[] = {  {&_swigt__p_Ptr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SResourceData[] = {  {&_swigt__p_SResourceData, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SResourceTransfer[] = {  {&_swigt__p_SResourceTransfer, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_IDamage_t[] = {  {&_swigt__p_std__shared_ptrT_IDamage_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__shared_ptrT_IUnit_t[] = {  {&_swigt__p_std__shared_ptrT_IUnit_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_IMapFeature_p_t[] = {  {&_swigt__p_std__vectorT_IMapFeature_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_IUnitType_p_t[] = {  {&_swigt__p_std__vectorT_IUnitType_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_IUnit_p_t[] = {  {&_swigt__p_std__vectorT_IUnit_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Position_t[] = {  {&_swigt__p_std__vectorT_Position_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_float_t[] = {  {&_swigt__p_std__vectorT_float_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_int_t[] = {  {&_swigt__p_std__vectorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__string_t[] = {  {&_swigt__p_std__vectorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_IAI,
  _swigc__p_IDamage,
  _swigc__p_IGame,
  _swigc__p_IMap,
  _swigc__p_IMapFeature,
  _swigc__p_IUnit,
  _swigc__p_IUnitType,
  _swigc__p_Position,
  _swigc__p_Ptr,
  _swigc__p_SResourceData,
  _swigc__p_SResourceTransfer,
  _swigc__p_std__shared_ptrT_IDamage_t,
  _swigc__p_std__shared_ptrT_IUnit_t,
  _swigc__p_std__string,
  _swigc__p_std__vectorT_IMapFeature_p_t,
  _swigc__p_std__vectorT_IUnitType_p_t,
  _swigc__p_std__vectorT_IUnit_p_t,
  _swigc__p_std__vectorT_Position_t,
  _swigc__p_std__vectorT_float_t,
  _swigc__p_std__vectorT_int_t,
  _swigc__p_std__vectorT_std__string_t,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;

  clientdata = clientdata;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpeters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
  
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
    
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
	if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
	  cast->type = ret;
	  ret = 0;
	} else {
	  /* Check for casting already in the list */
	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
	  if (!ocast) ret = 0;
	}
      }

      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{ /* c-mode */
#endif
}
#endif



/* Forward declaration of where the user's %init{} gets inserted */
void SWIG_init_user(lua_State* L );
    
#ifdef __cplusplus
extern "C" {
#endif
/* this is the initialization function
  added at the very end of the code
  the function is always called SWIG_init, but an eariler #define will rename it
*/
SWIGEXPORT int SWIG_init(lua_State* L)
{
  int i;
  /* start with global table */
  lua_pushvalue(L,LUA_GLOBALSINDEX);
  /* SWIG's internal initalisation */
  SWIG_InitializeModule((void*)L);
  SWIG_PropagateClientData();
  /* add a global fn */
  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
  /* begin the module (its a table with the same name as the module) */
  SWIG_Lua_module_begin(L,SWIG_name);
  /* add commands/functions */
  for (i = 0; swig_commands[i].name; i++){
    SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
  }
  /* add variables */
  for (i = 0; swig_variables[i].name; i++){
    SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
  }
  /* set up base class pointers (the hierachy) */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
  /* additional registration structs & classes in lua */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
  /* constants */
  SWIG_Lua_InstallConstants(L,swig_constants);
  /* invoke user-specific initialization */
  SWIG_init_user(L);
  /* end module */
  /* Note: We do not clean up the stack here (Lua will do this for us). At this
     point, we have the globals table and out module table on the stack. Returning
     one value makes the module table the result of the require command. */
  return 1;
}

#ifdef __cplusplus
}
#endif


const char* SWIG_LUACODE=
  "";

void SWIG_init_user(lua_State* L)
{
  /* exec Lua code if applicable */
  SWIG_Lua_dostring(L,SWIG_LUACODE);
}

