/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * 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.
 * ----------------------------------------------------------------------------- */

#include "config.h"
#include "glthread/thread.h"


#define TARGET_LANGUAGE_SELF void *
#define TARGET_LANGUAGE_OUTPUT_TYPE int *



#ifndef SWIGLUA
#define SWIGLUA
#endif

#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
#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 defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  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

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#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(r) (r)
#  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 equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  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) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
  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 = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(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 */

/* -----------------------------------------------------------------------------
 * Lua flavors
 * ----------------------------------------------------------------------------- */

#define SWIG_LUA_FLAVOR_LUA 1
#define SWIG_LUA_FLAVOR_ELUA 2
#define SWIG_LUA_FLAVOR_ELUAC 3

#if !defined(SWIG_LUA_TARGET)
# error SWIG_LUA_TARGET not defined
#endif

#if defined(SWIG_LUA_ELUA_EMULATE)

struct swig_elua_entry;

typedef struct swig_elua_key {
  int type;
  union {
    const char* strkey;
    lua_Number numkey;
  } key;
} swig_elua_key;

typedef struct swig_elua_val {
  int type;
  union {
    lua_Number number;
    const struct swig_elua_entry *table;
    const char *string;
    lua_CFunction function;
    struct {
      char member;
      long lvalue;
      void *pvalue;
      swig_type_info **ptype;
    } userdata;
  } value;
} swig_elua_val;

typedef struct swig_elua_entry {
  swig_elua_key key;
  swig_elua_val value;
} swig_elua_entry;

#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
#define LNILKEY {LUA_TNIL, {.strkey = 0} }

#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
#define LROVAL(x) {LUA_TTABLE, {.table = x} }
#define LNILVAL {LUA_TNIL, {.string = 0} }
#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }

#define LUA_REG_TYPE swig_elua_entry

#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"

#define lua_pushrotable(L,p)\
  lua_newtable(L);\
  assert(p);\
  SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));

#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
  LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }

#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
  LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
#  define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
#  define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
    /* Those two types of constants are not supported in elua */

#ifndef SWIG_LUA_CONSTTAB_POINTER
#warning eLua does not support pointers as constants. By default, nil will be used as value
#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
#endif

#ifndef SWIG_LUA_CONSTTAB_BINARY
#warning eLua does not support pointers to member as constants. By default, nil will be used as value
#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
#endif
#else /* SWIG_LUA_FLAVOR_LUA */
#  define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
#  define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
#  define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
       SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
#  define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
       SWIG_LUA_BINARY,  (char *)B, S, 0, (void *)C, &D
#endif

#ifndef SWIG_LUA_ELUA_EMULATE
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
#  define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
#  define LSTRVAL LRO_STRVAL
#endif
#endif /* SWIG_LUA_ELUA_EMULATE*/

#ifndef SWIG_LUA_ELUA_EMULATE
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)

#ifndef MIN_OPT_LEVEL
#define MIN_OPT_LEVEL 2
#endif

#include "lrodefs.h"
#include "lrotable.h"
#endif
#endif /* SWIG_LUA_ELUA_EMULATE*/
/* -----------------------------------------------------------------------------
 * compatibility defines
 * ----------------------------------------------------------------------------- */

/* History of Lua C API length functions:  In Lua 5.0 (and before?)
   there was "lua_strlen".  In Lua 5.1, this was renamed "lua_objlen",
   but a compatibility define of "lua_strlen" was added.  In Lua 5.2,
   this function was again renamed, to "lua_rawlen" (to emphasize that
   it doesn't call the "__len" metamethod), and the compatibility
   define of lua_strlen was removed.  All SWIG uses have been updated
   to "lua_rawlen", and we add our own defines of that here for older
   versions of Lua.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
# define lua_rawlen lua_strlen
#elif LUA_VERSION_NUM == 501
# define lua_rawlen lua_objlen
#endif


/* lua_pushglobaltable is the recommended "future-proof" way to get
   the global table for Lua 5.2 and later.  Here we define
   lua_pushglobaltable ourselves for Lua versions before 5.2.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
#endif

/* lua_absindex was introduced in Lua 5.2 */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
#endif

/* lua_rawsetp was introduced in Lua 5.2 */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
#define lua_rawsetp(L,index,ptr)\
  lua_pushlightuserdata(L,(void*)(ptr));\
  lua_insert(L,-2);\
  lua_rawset(L,index);

#define lua_rawgetp(L,index,ptr)\
  lua_pushlightuserdata(L,(void*)(ptr));\
  lua_rawget(L,index);

#endif

/* --------------------------------------------------------------------------
 * Helper functions for error handling
 * -------------------------------------------------------------------------- */

/* Push the string STR on the Lua stack, like lua_pushstring, but
   prefixed with the the location of the innermost Lua call-point
   (as formated by luaL_where).  */
SWIGRUNTIME void
SWIG_Lua_pusherrstring (lua_State *L, const char *str)
{
  luaL_where (L, 1);
  lua_pushstring (L, str);
  lua_concat (L, 2);
}

/* Push a formatted string generated from FMT and following args on
   the Lua stack, like lua_pushfstring, but prefixed with the the
   location of the innermost Lua call-point (as formated by luaL_where).  */
SWIGRUNTIME void
SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
{
  va_list argp;
  va_start(argp, fmt);
  luaL_where(L, 1);
  lua_pushvfstring(L, fmt, argp);
  va_end(argp);
  lua_concat(L, 2);
}


/* -----------------------------------------------------------------------------
 * 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;

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
typedef const LUA_REG_TYPE swig_lua_method;
typedef const LUA_REG_TYPE swig_lua_const_info;
#else /* Normal lua */
typedef luaL_Reg swig_lua_method;

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

#endif

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


struct swig_lua_class;
/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
typedef struct swig_lua_namespace {
  const char            *name;
  swig_lua_method       *ns_methods;
  swig_lua_attribute    *ns_attributes;
  swig_lua_const_info   *ns_constants;
  struct swig_lua_class        **ns_classes;
  struct swig_lua_namespace    **ns_namespaces;
} swig_lua_namespace;

typedef struct swig_lua_class {
  const char    *name; /* Name that this class has in Lua */
  const char    *fqname; /* Fully qualified name - Scope + class name */
  swig_type_info   **type;
  lua_CFunction  constructor;
  void    (*destructor)(void *);
  swig_lua_method   *methods;
  swig_lua_attribute     *attributes;
  swig_lua_namespace    *cls_static;
  swig_lua_method   *metatable; /* 0 for -eluac */
  struct swig_lua_class **bases;
  const char **base_names;
} swig_lua_class;

/* this is the struct for wrapping 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 arbitrary 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)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else


/* helper #defines */
#define SWIG_fail {goto fail;}
#define SWIG_fail_arg(func_name,argnum,type) \
  {SWIG_Lua_pushferrstring(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) \
  {SWIG_Lua_pushferrstring(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))

#define SWIG_Lua_add_boolean(L,n,b) \
  (lua_pushstring(L, n), \
      lua_pushboolean(L, b), \
      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 action 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 */
  luaL_error(L,"This variable is immutable");
#endif
    return 0;   /* should not return anything */
}

#ifdef SWIG_LUA_ELUA_EMULATE

SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
static int swig_lua_elua_emulate_unique_key;

/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
{
  int i, table_parsed, parsed_tables_array, target_table;
  assert(lua_istable(L,-1));
  target_table = lua_gettop(L);
  /* Get the registry where we put all parsed tables to avoid loops */
  lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
  if(lua_isnil(L,-1)) {
    lua_pop(L,1);
    lua_newtable(L);
    lua_pushvalue(L,-1);
    lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
  }
  parsed_tables_array = lua_gettop(L);
  lua_pushvalue(L,target_table);
  lua_rawsetp(L, parsed_tables_array, table);
  table_parsed = 0;
  const int SWIGUNUSED pairs_start = lua_gettop(L);
  for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
  {
    const swig_elua_entry *entry = table + i;
    int is_metatable = 0;
    switch(entry->key.type) {
      case LUA_TSTRING:
        lua_pushstring(L,entry->key.key.strkey);
        if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
          is_metatable = 1;
        break;
      case  LUA_TNUMBER:
        lua_pushnumber(L,entry->key.key.numkey);
        break;
      case LUA_TNIL:
        lua_pushnil(L);
        break;
      default:
        assert(0);
    }
    switch(entry->value.type) {
      case LUA_TSTRING:
        lua_pushstring(L,entry->value.value.string);
        break;
      case  LUA_TNUMBER:
        lua_pushnumber(L,entry->value.value.number);
        break;
      case LUA_TFUNCTION:
        lua_pushcfunction(L,entry->value.value.function);
        break;
      case LUA_TTABLE:
        lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
        table_parsed = !lua_isnil(L,-1);
        if(!table_parsed) {
          lua_pop(L,1); /*remove nil */
          lua_newtable(L);
          SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
        } 
        if(is_metatable) {
          assert(lua_istable(L,-1));
          lua_pushvalue(L,-1);
          lua_setmetatable(L,target_table);
        }

        break;
      case LUA_TUSERDATA:
        if(entry->value.value.userdata.member) 
          SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
              entry->value.value.userdata.lvalue,
              *(entry->value.value.userdata.ptype));
        else 
          SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
              *(entry->value.value.userdata.ptype),0);
        break;
      case LUA_TNIL:
        lua_pushnil(L);
        break;
      default:
        assert(0);
    }
    assert(lua_gettop(L) == pairs_start + 2);
    lua_rawset(L,target_table);
  }
  lua_pop(L,1); /* Removing parsed tables storage */
  assert(lua_gettop(L) == target_table);
}

SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
{
  lua_pushnil(L);
  lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
}

SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);

SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
{
  SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
  SWIG_Lua_get_class_registry(L);
  lua_getfield(L,-1,"lua_getmetatable");
  lua_remove(L,-2); /* remove the registry*/
  assert(!lua_isnil(L,-1));
  lua_pushvalue(L,1);
  assert(lua_gettop(L) == 3); /* object | function | object again */
  lua_call(L,1,1);
  if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
    return 1;
  /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
  assert(lua_gettop(L) == 2);
  if(lua_istable(L,-2)) {
    lua_pop(L,1); /*remove the nil*/
    lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
  }
  assert(lua_gettop(L) == 2);
  return 1;
  
fail:
  lua_error(L);
  return 0;
}

SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
{
  SWIG_Lua_get_class_registry(L);
  lua_pushglobaltable(L);
  lua_pushstring(L,"lua_getmetatable");
  lua_getfield(L,-2,"getmetatable");
  assert(!lua_isnil(L,-1));
  lua_rawset(L,-4);
  lua_pushstring(L, "getmetatable");
  lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
  lua_rawset(L,-3);
  lua_pop(L,2);
      
}
/* END OF REMOVE */

#endif
/* -----------------------------------------------------------------------------
 * global variable support code: namespaces and modules (which are the same thing)
 * ----------------------------------------------------------------------------- */

SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
{
/*  there should be 2 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
*/
  assert(lua_istable(L,-2));  /* just in case */
  lua_getmetatable(L,-2);
  assert(lua_istable(L,-1));
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));
  /* 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_call(L,0,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: whether it's 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 */
  return 0;
}

SWIGINTERN int SWIG_Lua_namespace_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
*/

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

  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,3);  /* value */
      lua_call(L,1,0);
      return 0;
    }
    lua_pop(L,1);  /* remove the value */
  }
  lua_pop(L,1);  /* remove the value .set table */
  lua_pop(L,1); /* remote metatable */
  lua_rawset(L,-3);
  return 0;
}

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
SWIGINTERN void  SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
SWIGINTERN void  SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);

/* helper function - register namespace methods and attributes into namespace */
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
{
  int i;
  /* There must be namespace table (not metatable) at the top of the stack */
  assert(lua_istable(L,-1));
  SWIG_Lua_InstallConstants(L, ns->ns_constants);

  /* add methods to the namespace/module table */
  for(i=0;ns->ns_methods[i].name;i++){
    SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
  }
  lua_getmetatable(L,-1);

  /* add fns */
  for(i=0;ns->ns_attributes[i].name;i++){
    SWIG_Lua_add_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod);
  }

  /* clear stack - remove metatble */
  lua_pop(L,1);
  return 0;
}

/* Register all classes in the namespace */
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
{
  swig_lua_class **classes;

  /* There must be a module/namespace table at the top of the stack */
  assert(lua_istable(L,-1));

  classes = ns->ns_classes;

  if( classes != 0 ) {
    while(*classes != 0) {
      SWIG_Lua_class_register(L, *classes);
      classes++;
    }
  }
}

/* Helper function. Creates namespace table and adds it to module table
   if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
   when function is called).
   Function always returns newly registered table on top of the stack.
*/
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
{
  swig_lua_namespace **sub_namespace;
  /* 1 argument - table on the top of the stack */
  const int SWIGUNUSED begin = lua_gettop(L);
  assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
  lua_checkstack(L,5);
  lua_newtable(L); /* namespace itself */
  lua_newtable(L); /* metatable for namespace */

  /* 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_namespace_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set);

  lua_setmetatable(L,-2); /* set metatable */

  /* Register all functions, variables etc */
  SWIG_Lua_add_namespace_details(L,ns);
  /* Register classes */
  SWIG_Lua_add_namespace_classes(L,ns);

  sub_namespace = ns->ns_namespaces;
  if( sub_namespace != 0) {
    while(*sub_namespace != 0) {
      SWIG_Lua_namespace_register(L, *sub_namespace, 1);
      lua_pop(L,1); /* removing sub-namespace table */
      sub_namespace++;
    }
  }

  if (reg) {
    lua_pushstring(L,ns->name);
    lua_pushvalue(L,-2);
    lua_rawset(L,-4); /* add namespace to module table */
  }
  assert(lua_gettop(L) == begin+1);
}
#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */

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

SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);

typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);

SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED swig_type,
  int first_arg, swig_lua_base_iterator_func func, int  *const ret)
{
    /* first_arg - position of the object in stack. Everything that is above are arguments
     * and is passed to every evocation of the func */
    int last_arg = lua_gettop(L);/* position of last argument */
    int original_metatable = last_arg + 1;
    size_t bases_count;
    int result = SWIG_ERROR;
    int bases_table;
    (void)swig_type;
    lua_getmetatable(L,first_arg);

    /* initialise base search */
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
    SWIG_Lua_get_table(L,".bases");
    assert(lua_istable(L,-1));
    bases_count = lua_rawlen(L,-1);
    bases_table = lua_gettop(L);
#else
    /* In elua .bases table doesn't exist. Use table from swig_lua_class */
    (void)bases_table;
    assert(swig_type!=0);
    swig_module_info *module=SWIG_GetModule(L);
    swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
    const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
    bases_count = 0;
    for(;base_names[bases_count];
      bases_count++);/* get length of bases */
#endif

    if(ret)
      *ret = 0;
    if(bases_count>0)
    {
      int to_remove;
      size_t i;
      int j;
      int subcall_last_arg;
      int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
      int valid = 1;
      swig_type_info *base_swig_type = 0;
      for(j=first_arg;j<=last_arg;j++)
        lua_pushvalue(L,j);
      subcall_last_arg = lua_gettop(L);

      /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
      for(i=0;i<bases_count;i++) {
        /* Iteration through class bases */
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
        lua_rawgeti(L,bases_table,i+1);
        base_swig_type = 0;
        if(lua_isnil(L,-1)) {
          valid = 0;
          lua_pop(L,1);
        } else {
          valid = 1;
        }
#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
        swig_lua_class *base_class = bases[i];
        if(!base_class) {
          valid = 0;
        } else {
          valid = 1;
          SWIG_Lua_get_class_metatable(L,base_class->fqname);
          base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
          assert(base_swig_type != 0);
        }
#endif

        if(!valid)
          continue;
        assert(lua_isuserdata(L, subcall_first_arg));
        assert(lua_istable(L,-1));
        lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
        assert(lua_gettop(L) == subcall_last_arg);
        result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
        if(result != SWIG_ERROR) {
          break;
        }
      }
      /* Restore original metatable */
      lua_pushvalue(L,original_metatable);
      lua_setmetatable(L,first_arg);
      /* Clear - remove everything between last_arg and subcall_last_arg including */
      to_remove = subcall_last_arg - last_arg;
      for(j=0;j<to_remove;j++)
        lua_remove(L,last_arg+1);
    } else {
      /* Remove everything after last_arg */
      lua_pop(L, lua_gettop(L) - last_arg);
    }
    if(ret) assert(lua_gettop(L) == last_arg + *ret);
    return result;
}

/* The class.get method helper, performs the lookup of class attributes.
 * It returns an error code. Number of function return values is passed inside 'ret'.
 * first_arg is not used in this function because function always has 2 arguments.
 */
SWIGINTERN int  SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  int bases_search_result;
  int substack_start = lua_gettop(L)-2;
  assert(first_arg == substack_start+1);
  lua_checkstack(L,5);
  assert(lua_isuserdata(L,-2));  /* just in case */
  lua_getmetatable(L,-2);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  /* 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,substack_start+1);  /* the userdata */
    lua_pushvalue(L,substack_start+2);  /* the parameter */
    lua_call(L,2,1);  /* 2 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    if(ret) *ret = 1;
    return SWIG_OK;
  }
  lua_pop(L,1);
  /* Remove the metatable */
  lua_pop(L,1);
  /* Search in base classes */
  bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
  return bases_search_result;  /* sorry not known */
}


/* The class.get method helper, performs the lookup of class attributes.
 * It returns an error code. Number of function return values is passed inside 'ret'.
 * first_arg is not used in this function because function always has 2 arguments.
 */
SWIGINTERN int  SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  int bases_search_result;
  int substack_start = lua_gettop(L)-2;
  assert(first_arg == substack_start+1);
  lua_checkstack(L,5);
  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,substack_start+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,substack_start+1);  /* the userdata */
    lua_call(L,1,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    if(ret)
      *ret = 1;
    return SWIG_OK;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,substack_start+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 */
    if(ret)
      *ret = 1;
    return SWIG_OK;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* Remove the metatable */
  lua_pop(L,1);
  /* Search in base classes */
  bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
  return bases_search_result;  /* sorry not known */
}

/* 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
*/
  int result;
  swig_lua_userdata *usr;
  swig_type_info *type;
  int ret = 0;
  assert(lua_isuserdata(L,1));
  usr=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  type = usr->type;
  result = SWIG_Lua_class_do_get(L,type,1,&ret);
  if(result == SWIG_OK)
    return ret;

  result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
  if(result == SWIG_OK)
    return ret;

  return 0;
}

/* helper for the class.set method, performs the lookup of class attributes
 * It returns error code. Number of function return values is passed inside 'ret'
 */
SWIGINTERN int  SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
{
/*  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
  */

  int bases_search_result;
  int substack_start = lua_gettop(L) - 3;
  lua_checkstack(L,5);
  assert(lua_isuserdata(L,substack_start+1));  /* just in case */
  lua_getmetatable(L,substack_start+1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  if(ret)
    *ret = 0; /* it is setter - number of return values is always 0 */

  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,substack_start+2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,-2); /* tidy stack, remove .set table */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,substack_start+1);  /* userdata */
      lua_pushvalue(L,substack_start+3);  /* value */
      lua_call(L,2,0);
      lua_remove(L,substack_start+4); /*remove metatable*/
      return SWIG_OK;
    }
    lua_pop(L,1);  /* remove the value */
  } else {
    lua_pop(L,1);  /* remove the answer for .set table request*/
  }
  /* 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,substack_start+1);  /* the userdata */
    lua_pushvalue(L,substack_start+2);  /* the parameter */
    lua_pushvalue(L,substack_start+3);  /* the value */
    lua_call(L,3,0);  /* 3 values in ,0 out */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return SWIG_OK;
  }
  lua_pop(L,1); /* remove value */

  lua_pop(L,1); /* remove metatable */
  /* Search among bases */
  bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
  if(ret)
    assert(*ret == 0);
  assert(lua_gettop(L) == substack_start + 3);
  return bases_search_result;
}

/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
 * handles return values.
 */
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
  */
  int ret = 0;
  int result;
  swig_lua_userdata *usr;
  swig_type_info *type;
  assert(lua_isuserdata(L,1));
  usr=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  type = usr->type;
  result = SWIG_Lua_class_do_set(L,type,1,&ret);
  if(result != SWIG_OK) {
   SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
   lua_error(L);
  } else {
    assert(ret==0);
  }
  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;
}

/* the class.__tostring method called by the interpreter and print */
SWIGINTERN int  SWIG_Lua_class_tostring(lua_State *L)
{
/*  there should be 1 param passed in
  (1) userdata (not the metatable) */
  const char *className;
  void* userData;
  assert(lua_isuserdata(L,1));  /* just in case */
  userData = lua_touserdata(L,1); /* get the userdata address for later */
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */

  lua_getfield(L, -1, ".type");
  className = lua_tostring(L, -1);

  lua_pushfstring(L, "<%s userdata: %p>", className, userData);
  return 1;
}

/* to manually disown some userdata */
SWIGINTERN int  SWIG_Lua_class_disown(lua_State *L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata *usr;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
  
  usr->own = 0; /* clear our ownership */
  return 0;
}

/* 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_class_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;
}

/* populate table at the top of the stack with metamethods that ought to be inherited */
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
{
  SWIG_Lua_add_boolean(L, "__add", 1);
  SWIG_Lua_add_boolean(L, "__sub", 1);
  SWIG_Lua_add_boolean(L, "__mul", 1);
  SWIG_Lua_add_boolean(L, "__div", 1);
  SWIG_Lua_add_boolean(L, "__mod", 1);
  SWIG_Lua_add_boolean(L, "__pow", 1);
  SWIG_Lua_add_boolean(L, "__unm", 1);
  SWIG_Lua_add_boolean(L, "__len", 1 );
  SWIG_Lua_add_boolean(L, "__concat", 1 );
  SWIG_Lua_add_boolean(L, "__eq", 1);
  SWIG_Lua_add_boolean(L, "__lt", 1);
  SWIG_Lua_add_boolean(L, "__le", 1);
  SWIG_Lua_add_boolean(L, "__call", 1);
  SWIG_Lua_add_boolean(L, "__tostring", 1);
  SWIG_Lua_add_boolean(L, "__gc", 0);
}

/* creates the swig registry */
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
{
  /* create main SWIG registry table */
  lua_pushstring(L,"SWIG");
  lua_newtable(L);
  /* populate it with some predefined data */

  /* .library table. Placeholder */
  lua_pushstring(L,".library");
  lua_newtable(L);
  {
    /* list of metamethods that class inherits from its bases */
    lua_pushstring(L,"inheritable_metamethods");
    lua_newtable(L);
    /* populate with list of metamethods */
    SWIG_Lua_populate_inheritable_metamethods(L);
    lua_rawset(L,-3);
  }
  lua_rawset(L,-3);

  lua_rawset(L,LUA_REGISTRYINDEX);
}

/* gets the swig 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 */
    SWIG_Lua_create_class_registry(L);
    /* then get it */
    lua_pushstring(L,"SWIG");
    lua_rawget(L,LUA_REGISTRYINDEX);
  }
}

SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
{
  SWIG_Lua_get_class_registry(L);
  lua_pushstring(L, ".library");
  lua_rawget(L,-2);
  assert( !lua_isnil(L,-1) );
  lua_pushstring(L, "inheritable_metamethods");
  lua_rawget(L,-2);

  /* Remove class registry and library table */
  lua_remove(L,-2);
  lua_remove(L,-2);
}

/* Helper function 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) */
}

/* 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;
    }
  }
}

#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
/* Merges two tables  */
SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
{
  /* iterating */
  lua_pushnil(L);
  while (lua_next(L,source) != 0) {
    /* -1 - value, -2 - index */
    /* have to copy to assign */
    lua_pushvalue(L,-2); /* copy of index */
    lua_pushvalue(L,-2); /* copy of value */
    lua_rawset(L, target);
    lua_pop(L,1);
    /* only key is left */
  }
}

/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
{
  /* push original[name], then base[name] */
  lua_pushstring(L,name);
  lua_rawget(L,original);
  int original_table = lua_gettop(L);
  lua_pushstring(L,name);
  lua_rawget(L,base);
  int base_table = lua_gettop(L);
  SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
  /* clearing stack */
  lua_pop(L,2);
}

/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
{
  /* There is one parameter - original, i.e. 'derived' class metatable */
  assert(lua_istable(L,-1));
  int original = lua_gettop(L);
  SWIG_Lua_get_class_metatable(L,base_cls->fqname);
  int base = lua_gettop(L);
  SWIG_Lua_merge_tables(L, ".fn", original, base );
  SWIG_Lua_merge_tables(L, ".set", original, base );
  SWIG_Lua_merge_tables(L, ".get", original, base );
  lua_pop(L,1);
}

/* Function squashes all symbols from 'clss' bases into itself */
SWIGINTERN void  SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
{
  int i;
  SWIG_Lua_get_class_metatable(L,clss->fqname);
  for(i=0;clss->base_names[i];i++)
  {
    if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
      continue;
    /* Thing is: all bases are already registered. Thus they have already executed
     * this function. So we just need to squash them into us, because their bases
     * are already squashed into them. No need for recursion here!
     */
    SWIG_Lua_class_squash_base(L, clss->bases[i]);
  }
  lua_pop(L,1); /*tidy stack*/
}
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
/* helper add a variable to a registered class */
SWIGINTERN void  SWIG_Lua_add_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 static details (static attributes, operations and constants) */
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
{
  int i = 0;
  /* The class namespace table must be on the top of the stack */
  assert(lua_istable(L,-1));
  /* call all the base classes first: we can then override these later: */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_add_class_static_details(L,clss->bases[i]);
  }

  SWIG_Lua_add_namespace_details(L, clss->cls_static);
}

SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */

/* helper to recursively add class details (attributes & operations) */
SWIGINTERN void  SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
{
  int i;
  size_t bases_count = 0;
  /* Add bases to .bases table */
  SWIG_Lua_get_table(L,".bases");
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname);
    /* Base class must be already registered */
    assert(lua_istable(L,-1));
    lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
    bases_count++;
  }
  assert(lua_rawlen(L,-1) == bases_count);
  lua_pop(L,1); /* remove .bases table */
  /* add attributes */
  for(i=0;clss->attributes[i].name;i++){
    SWIG_Lua_add_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].func);
  }
  lua_pop(L,1);       /* tidy stack (remove table) */
  /* add operator overloads
    This adds methods from metatable array to metatable. Can mess up garbage
    collectind if someone defines __gc method
    */
  if(clss->metatable) {
    for(i=0;clss->metatable[i].name;i++) {
      SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
    }
  }

#if !defined(SWIG_LUA_SQUASH_BASES)
  /* Adding metamethods that are defined in base classes. If bases were squashed
   * then it is obviously unnecessary
   */
  SWIG_Lua_add_class_user_metamethods(L, clss);
#endif
}

/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
   for the following issue: Lua runtime checks for metamethod existence with rawget function
   ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
   search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
   in metatable and not in object).
   Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
   are automatically given a special proxy __x that calls the real __x method.
   Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
   those changes must be reflected in all descendants.
*/

SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/

/* The real function that resolves a metamethod.
 * Function searches given class and all it's bases(recursively) for first instance of something that is
 * not equal to SWIG_Lua_resolve_metatmethod. (Almost always this 'something' is actual metamethod implementation
 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
 * answer.
 * Returns 1 if found, 0 otherwise.
 * clss is class which metatable we will search for method
 * metamethod_name_idx is index in L where metamethod name (as string) lies
 * skip_check allows to skip searching metamethod in givel clss and immideatelly go to searching in bases. skip_check
 * is not caried to subsequent recursive calls - false is always passed. It is set to true only at first call from
 * SWIG_Lua_resolve_metamethod
 * */
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
    int skip_check)
{
  /* This function is called recursively */
  int result = 0;
  int i = 0;

  if (!skip_check) {
    SWIG_Lua_get_class_metatable(L, clss->fqname);
    lua_pushvalue(L, metamethod_name_idx);
    lua_rawget(L,-2);
    /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
     * this isn't the function we are looking for :)
     * lua_tocfunction will return NULL if not cfunction
     */
    if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
      lua_remove(L,-2); /* removing class metatable */
      return 1;
    }
    lua_pop(L,2); /* remove class metatable and query result */
  }

  /* Forwarding calls to bases */
  for(i=0;clss->bases[i];i++)
  {
    result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
    if (result)
      break;
  }

  return result;
}

/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
 * and calls it */
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
{
  int numargs;
  int metamethod_name_idx;
  const swig_lua_class* clss;
  int result;

  lua_checkstack(L,5);
  numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
  
  /* Get upvalues from closure */
  lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
  metamethod_name_idx = lua_gettop(L);
  
  lua_pushvalue(L, lua_upvalueindex(2));
  clss = (const swig_lua_class*)(lua_touserdata(L,-1));
  lua_pop(L,1); /* remove lightuserdata with clss from stack */

  /* Actual work */
  result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
  if (!result) {
   SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
   lua_error(L);
   return 0;
  }

  lua_remove(L,-2); /* remove metamethod key */
  lua_insert(L,1); /* move function to correct position */
  lua_call(L, numargs, LUA_MULTRET);
  return lua_gettop(L); /* return all results */
}


/* If given metamethod must be present in given class, then creates appropriate proxy
 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
 * if method is defined in the class metatable itself
 */
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
{
  int key_index;
  int success = 0;
  int i = 0;

  /* metamethod name - on the top of the stack */
  assert(lua_isstring(L,-1));
  
  key_index = lua_gettop(L);

  /* Check whether method is already defined in metatable */
  lua_pushvalue(L,key_index); /* copy of the key */
  lua_gettable(L,metatable_index);
  if( !lua_isnil(L,-1) ) {
    lua_pop(L,1);
    return -1;
  }
  lua_pop(L,1); 

  /* Iterating over immediate bases */
  for(i=0;clss->bases[i];i++)
  {
    const swig_lua_class *base = clss->bases[i];
    SWIG_Lua_get_class_metatable(L, base->fqname);
    lua_pushvalue(L, key_index);
    lua_rawget(L, -2);
    if( !lua_isnil(L,-1) ) {
      lua_pushvalue(L, key_index); 

      /* Add proxy function */
      lua_pushvalue(L, key_index); /* first closure value is function name */
      lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
      lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
      
      lua_rawset(L, metatable_index);
      success = 1;
    }
    lua_pop(L,1); /* remove function or nil */
    lua_pop(L,1); /* remove base class metatable */

    if( success )
      break;
  }

  return success; 
}

SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
{
  int metatable_index;
  int metamethods_info_index;
  int tostring_undefined;
  int eq_undefined = 0;

  SWIG_Lua_get_class_metatable(L, clss->fqname);
  metatable_index = lua_gettop(L);
  SWIG_Lua_get_inheritable_metamethods(L);
  assert(lua_istable(L,-1));
  metamethods_info_index = lua_gettop(L);
  lua_pushnil(L); /* first key */
  while(lua_next(L, metamethods_info_index) != 0 ) {
    /* key at index -2, value at index -1 */
    const int is_inheritable = lua_toboolean(L,-2);
    lua_pop(L,1); /* remove value - we don't need it anymore */

    if(is_inheritable) { /* if metamethod is inheritable */
      SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
    }
  }

  lua_pop(L,1); /* remove inheritable metatmethods table */

  /* Special handling for __tostring method */
  lua_pushstring(L, "__tostring");
  lua_pushvalue(L,-1);
  lua_rawget(L,metatable_index);
  tostring_undefined = lua_isnil(L,-1);
  lua_pop(L,1);
  if( tostring_undefined ) {
    lua_pushcfunction(L, SWIG_Lua_class_tostring);
    lua_rawset(L, metatable_index);
  } else {
    lua_pop(L,1); /* remove copy of the key */
  }

  /* Special handling for __eq method */
  lua_pushstring(L, "__eq");
  lua_pushvalue(L,-1);
  lua_rawget(L,metatable_index);
  eq_undefined = lua_isnil(L,-1);
  lua_pop(L,1);
  if( eq_undefined ) {
    lua_pushcfunction(L, SWIG_Lua_class_equal);
    lua_rawset(L, metatable_index);
  } else {
    lua_pop(L,1); /* remove copy of the key */
  }
  /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
   * a __getitem/__setitem method should be defined
   */
  lua_pop(L,1); /* pop class metatable */
}

/* Register class static methods,attributes etc as well as constructor proxy */
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
{
  const int SWIGUNUSED begin = lua_gettop(L);
  lua_checkstack(L,5); /* just in case */
  assert(lua_istable(L,-1));  /* just in case */
  assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */

  SWIG_Lua_namespace_register(L,clss->cls_static, 1);

  assert(lua_istable(L,-1)); /* just in case */

  /*  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)
  {
    lua_getmetatable(L,-1);
    assert(lua_istable(L,-1)); /* just in case */
    SWIG_Lua_add_function(L,"__call", clss->constructor);
    lua_pop(L,1);
  }

  assert(lua_istable(L,-1)); /* just in case */
  SWIG_Lua_add_class_static_details(L, clss);

  /* clear stack */
  lua_pop(L,1);
  assert( lua_gettop(L) == begin );
}

/* Performs the instance (non-static) class registration process. Metatable for class is created
 * and added to the class registry.
 */
SWIGINTERN void  SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *clss)
{
  const int SWIGUNUSED begin = lua_gettop(L);
  int i;
  /* if name already there (class is already registered) then do nothing */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  lua_rawget(L,-2);
  if(!lua_isnil(L,-1)) {
    lua_pop(L,2);
    assert(lua_gettop(L)==begin);
    return;
  }
  lua_pop(L,2); /* tidy stack */
  /* Recursively initialize all bases */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_class_register_instance(L,clss->bases[i]);
  }
  /* Again, get registry and push name */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  lua_newtable(L);    /* create the metatable */
#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
  /* If squashing is requested, then merges all bases metatable into this one.
   * It would get us all special methods: __getitem, __add etc.
   * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
   */
  {
    int new_metatable_index = lua_absindex(L,-1);
    for(i=0;clss->bases[i];i++)
    {
      int base_metatable;
      SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname);
      base_metatable = lua_absindex(L,-1);
      SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
      lua_pop(L,1);
    }
  }
  /* And now we will overwrite all incorrectly set data */
#endif
  /* add string of class name called ".type" */
  lua_pushstring(L,".type");
  lua_pushstring(L,clss->fqname);
  lua_rawset(L,-3);
  /* add a table called bases */
  lua_pushstring(L,".bases");
  lua_newtable(L);
  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);
  /* add manual disown method */
  SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
  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) */
  assert(lua_gettop(L) == begin);

#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
  /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
  SWIG_Lua_class_squash_bases(L,clss);
#endif
  SWIG_Lua_get_class_metatable(L,clss->fqname);
  SWIG_Lua_add_class_instance_details(L,clss);  /* recursive adding of details (atts & ops) */
  lua_pop(L,1);      /* tidy stack (remove class metatable) */
  assert( lua_gettop(L) == begin );
}

SWIGINTERN void  SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
{
  int SWIGUNUSED begin;
  assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
  SWIG_Lua_class_register_instance(L,clss);
  SWIG_Lua_class_register_static(L,clss);

  /* Add links from static part to instance part and vice versa */
  /* [SWIG registry]                                   [Module]
   *    "MyClass" ----> [MyClass metatable] <=====     "MyClass" -+> [static part]
   *                     ".get" ----> ...        |                |     getmetatable()----|
   *                     ".set" ----> ...        |                |                       |
   *                     ".static" --------------)----------------/           [static part metatable]
   *                                             |                                ".get" --> ...
   *                                             |                                ".set" --> ....
   *                                             |=============================== ".instance"
   */
  begin = lua_gettop(L);
  lua_pushstring(L,clss->cls_static->name);
  lua_rawget(L,-2); /* get class static table */
  assert(lua_istable(L,-1));
  lua_getmetatable(L,-1);
  assert(lua_istable(L,-1)); /* get class static metatable */
  lua_pushstring(L,".instance"); /* prepare key */

  SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
  assert(lua_istable(L,-1));
  lua_pushstring(L,".static"); /* prepare key */
  lua_pushvalue(L, -4); /* push static class TABLE */
  assert(lua_istable(L,-1));
  lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
  lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
  lua_pop(L,2);
  assert(lua_gettop(L) == begin);
}
#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
{
  const int SWIGUNUSED begin = lua_gettop(L);
  int i;
  /* if name already there (class is already registered) then do nothing */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  lua_rawget(L,-2);
  if(!lua_isnil(L,-1)) {
    lua_pop(L,2);
    assert(lua_gettop(L)==begin);
    return;
  }
  lua_pop(L,2); /* tidy stack */
  /* Recursively initialize all bases */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
  }
  /* Again, get registry and push name */
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->fqname);  /* get the name */
  assert(clss->metatable);
  lua_pushrotable(L, (void*)(clss->metatable));    /* create the metatable */
  lua_rawset(L,-3);
  lua_pop(L,1);
  assert(lua_gettop(L) == begin);
}
#endif /* elua && eluac */

/* -----------------------------------------------------------------------------
 * 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))->fqname);
    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;
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  SWIG_Lua_AddMetatable(L,type); /* add metatable */
#endif
}

/* 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))){
    luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
		func_name,(type && type->str)?type->str:"void*",argnum);
  }
  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;
}

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

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
/* 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_pushinteger(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);
      {
        char c = constants[i].lvalue;
        lua_pushlstring(L,&c,1);
      }
      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;
    }
  }
}
#endif

/* -----------------------------------------------------------------------------
 * 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 which is a really simple way of calling lua from C
Unfortunately lua keeps changing its APIs, so we need a conditional compile
In lua 5.0.X it's lua_dostring()
In lua 5.1.X it's 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_Prelude__Client swig_types[0]
#define SWIGTYPE_p_Prelude__ClientEasy swig_types[1]
#define SWIGTYPE_p_Prelude__ClientProfile swig_types[2]
#define SWIGTYPE_p_Prelude__Connection swig_types[3]
#define SWIGTYPE_p_Prelude__ConnectionPool swig_types[4]
#define SWIGTYPE_p_Prelude__IDMEF swig_types[5]
#define SWIGTYPE_p_Prelude__IDMEFClass swig_types[6]
#define SWIGTYPE_p_Prelude__IDMEFCriteria swig_types[7]
#define SWIGTYPE_p_Prelude__IDMEFCriterion swig_types[8]
#define SWIGTYPE_p_Prelude__IDMEFPath swig_types[9]
#define SWIGTYPE_p_Prelude__IDMEFTime swig_types[10]
#define SWIGTYPE_p_Prelude__IDMEFValue swig_types[11]
#define SWIGTYPE_p_Prelude__PreludeError swig_types[12]
#define SWIGTYPE_p_Prelude__PreludeLog swig_types[13]
#define SWIGTYPE_p_char swig_types[14]
#define SWIGTYPE_p_difference_type swig_types[15]
#define SWIGTYPE_p_f_int_p_q_const__char__void swig_types[16]
#define SWIGTYPE_p_idmef_criteria_t swig_types[17]
#define SWIGTYPE_p_idmef_criterion_operator_t swig_types[18]
#define SWIGTYPE_p_idmef_object_t swig_types[19]
#define SWIGTYPE_p_idmef_path_t swig_types[20]
#define SWIGTYPE_p_idmef_time_t swig_types[21]
#define SWIGTYPE_p_idmef_value_t swig_types[22]
#define SWIGTYPE_p_int swig_types[23]
#define SWIGTYPE_p_key_type swig_types[24]
#define SWIGTYPE_p_long_long swig_types[25]
#define SWIGTYPE_p_mapped_type swig_types[26]
#define SWIGTYPE_p_prelude_client_profile_t swig_types[27]
#define SWIGTYPE_p_prelude_client_t swig_types[28]
#define SWIGTYPE_p_prelude_connection_pool_t swig_types[29]
#define SWIGTYPE_p_prelude_connection_t swig_types[30]
#define SWIGTYPE_p_short swig_types[31]
#define SWIGTYPE_p_size_type swig_types[32]
#define SWIGTYPE_p_std__exception swig_types[33]
#define SWIGTYPE_p_std__mapT_std__string_std__string_t swig_types[34]
#define SWIGTYPE_p_std__string swig_types[35]
#define SWIGTYPE_p_std__vectorT_Prelude__Connection_t swig_types[36]
#define SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t swig_types[37]
#define SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t swig_types[38]
#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[39]
#define SWIGTYPE_p_timeval swig_types[40]
#define SWIGTYPE_p_unsigned_char swig_types[41]
#define SWIGTYPE_p_unsigned_int swig_types[42]
#define SWIGTYPE_p_unsigned_long_long swig_types[43]
#define SWIGTYPE_p_unsigned_short swig_types[44]
#define SWIGTYPE_p_void swig_types[45]
static swig_type_info *swig_types[47];
static swig_module_info swig_module = {swig_types, 46, 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      "prelude"
#define SWIG_init      luaopen_prelude
#define SWIG_init_user luaopen_prelude_user

#define SWIG_LUACODE   luaopen_prelude_luacode

namespace swig {
typedef struct{} LANGUAGE_OBJ;
}


#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 <typeinfo>
#include <stdexcept>


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


#include <typeinfo>
#include <stdexcept>


#include <map>
#include <algorithm>
#include <stdexcept>


#pragma GCC diagnostic ignored "-Wunused-variable"

#include <list>
#include <sstream>

#include "prelude.hxx"
#include "prelude-log.hxx"
#include "prelude-error.hxx"
#include "prelude-connection.hxx"
#include "prelude-connection-pool.hxx"
#include "prelude-client-profile.hxx"
#include "prelude-client.hxx"
#include "prelude-client-easy.hxx"
#include "idmef-criteria.hxx"
#include "idmef-value.hxx"
#include "idmef-path.hxx"
#include "idmef-time.hxx"
#include "idmef.hxx"

using namespace Prelude;


        char *my_strdup(const char *in)
        {
                char *out = new char[strlen(in) + 1];
                strcpy(out, in);
                return out;
        }


int integer2lua(lua_State *L, lua_Number result)
{
        lua_pushnumber(L, (lua_Number) result);
        return 0;
}

int str2lua(lua_State *L, const char *str)
{
        lua_pushstring(L, str);
        return 0;
}

int strsize2lua(lua_State *L, const char *str, size_t len)
{
        lua_pushlstring(L, str, len);
        return 0;
}


int _SWIG_Prelude_NewPointerObj(lua_State *L, void *obj, swig_type_info *objtype, int val)
{
        SWIG_NewPointerObj(L, obj, objtype, val);
        return 0;
}


static int __prelude_log_func;
static lua_State *__lua_state = NULL;
static gl_thread_t __initial_thread;

static void _cb_lua_log(int level, const char *str)
{
        if ( (gl_thread_t) gl_thread_self() != __initial_thread )
                return;

        lua_rawgeti(__lua_state, LUA_REGISTRYINDEX, __prelude_log_func);
        lua_pushnumber(__lua_state, level);
        lua_pushstring(__lua_state, str);
        lua_call(__lua_state, 2, 0);
}


static int _cb_lua_write(prelude_msgbuf_t *fd, prelude_msg_t *msg)
{
        size_t ret;
        FILE *f = (FILE *) prelude_msgbuf_get_data(fd);

        ret = fwrite((const char *)prelude_msg_get_message_data(msg), 1, prelude_msg_get_len(msg), f);
        if ( ret != prelude_msg_get_len(msg) )
                return prelude_error_from_errno(errno);

        prelude_msg_recycle(msg);
        return 0;
}


static ssize_t _cb_lua_read(prelude_io_t *fd, void *buf, size_t size)
{
        ssize_t ret;
        FILE *f = (FILE *) prelude_io_get_fdptr(fd);

        ret = fread(buf, 1, size, f);
        if ( ret < 0 )
                ret = prelude_error_from_errno(errno);

        else if ( ret == 0 )
                ret = prelude_error(PRELUDE_ERROR_EOF);

        return ret;
}


SWIGINTERN char *Prelude_IDMEFCriteria___str__(Prelude::IDMEFCriteria *self){ return my_strdup(self->toString().c_str()); }




























int IDMEFValue_to_SWIG(TARGET_LANGUAGE_SELF self, const Prelude::IDMEFValue &result, void *extra, TARGET_LANGUAGE_OUTPUT_TYPE ret);

int IDMEFValueList_to_SWIG(TARGET_LANGUAGE_SELF self, const Prelude::IDMEFValue &value, void *extra)
{
        bool is_list;
        int index = 0, ret, unused;
        std::vector<Prelude::IDMEFValue> result = value;
        std::vector<Prelude::IDMEFValue>::const_iterator i;

        lua_newtable((lua_State *) extra);

        for ( i = result.begin(); i != result.end(); i++ ) {
                ret = lua_checkstack((lua_State *) extra, 2);
                if ( ret < 0 )
                        return ret;

                if ( (*i).isNull() ) {
                        lua_pushnil((lua_State *) extra);
                        lua_rawseti((lua_State *) extra, -2, ++index);
                } else {
                        is_list = (i->getType() == IDMEFValue::TYPE_LIST);
                        if ( is_list )
                                lua_pushnumber((lua_State *) extra, ++index);

                        ret = IDMEFValue_to_SWIG(&unused, *i, extra, &unused);
                        if ( ret < 0 )
                                return -1;

                        if ( is_list )
                                lua_settable((lua_State *) extra, -3);
                        else
                                lua_rawseti((lua_State *) extra, -2, ++index);
                }
        }

        return 1;
}



int IDMEFValue_to_SWIG(TARGET_LANGUAGE_SELF self, const Prelude::IDMEFValue &result, void *extra, TARGET_LANGUAGE_OUTPUT_TYPE ret)
{
        idmef_value_t *value = result;
        Prelude::IDMEFValue::IDMEFValueTypeEnum type = result.getType();

        if ( type == Prelude::IDMEFValue::TYPE_STRING ) {
                prelude_string_t *str = idmef_value_get_string(value);
                *ret = strsize2lua((lua_State *) extra, prelude_string_get_string(str), prelude_string_get_len(str));
        }

        else if ( type == Prelude::IDMEFValue::TYPE_INT8 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_int8(value));

        else if ( type == Prelude::IDMEFValue::TYPE_UINT8 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_uint8(value));

        else if ( type == Prelude::IDMEFValue::TYPE_INT16 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_int16(value));

        else if ( type == Prelude::IDMEFValue::TYPE_UINT16 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_uint16(value));

        else if ( type == Prelude::IDMEFValue::TYPE_INT32 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_int32(value));

        else if ( type == Prelude::IDMEFValue::TYPE_UINT32 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_uint32(value));

        else if ( type == Prelude::IDMEFValue::TYPE_INT64 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_int64(value));

        else if ( type == Prelude::IDMEFValue::TYPE_UINT64 )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_uint64(value));

        else if ( type == Prelude::IDMEFValue::TYPE_FLOAT )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_float(value));

        else if ( type == Prelude::IDMEFValue::TYPE_DOUBLE )
                *ret = integer2lua((lua_State *) extra, idmef_value_get_double(value));

        else if ( type == Prelude::IDMEFValue::TYPE_ENUM ) {
                const char *s = idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value));
                *ret = str2lua((lua_State *) extra, s);
        }

        else if ( type == Prelude::IDMEFValue::TYPE_TIME ) {
                Prelude::IDMEFTime t = result;
                *ret = _SWIG_Prelude_NewPointerObj((lua_State *) extra, new Prelude::IDMEFTime(t), SWIGTYPE_p_Prelude__IDMEFTime, 1);;
        }

        else if ( type == Prelude::IDMEFValue::TYPE_LIST )
                *ret = IDMEFValueList_to_SWIG(self, result, extra);

        else if ( type == Prelude::IDMEFValue::TYPE_DATA ) {
                idmef_data_t *d = idmef_value_get_data(value);
                idmef_data_type_t t = idmef_data_get_type(d);

                if ( t == IDMEF_DATA_TYPE_BYTE || t == IDMEF_DATA_TYPE_BYTE_STRING )
                        *ret = strsize2lua((lua_State *) extra, (const char *)idmef_data_get_data(d), idmef_data_get_len(d));

                else if ( t == IDMEF_DATA_TYPE_CHAR )
                        *ret = strsize2lua((lua_State *) extra, (const char *)idmef_data_get_data(d), idmef_data_get_len(d));

                else if ( t == IDMEF_DATA_TYPE_CHAR_STRING )
                        *ret = strsize2lua((lua_State *) extra, (const char *)idmef_data_get_data(d), idmef_data_get_len(d) - 1);

                else if ( t == IDMEF_DATA_TYPE_FLOAT )
                        *ret = integer2lua((lua_State *) extra, idmef_data_get_float(d));

                else if ( t == IDMEF_DATA_TYPE_UINT32 || IDMEF_DATA_TYPE_INT )
                        *ret = integer2lua((lua_State *) extra, idmef_data_get_int(d));
        }

        else if ( type == Prelude::IDMEFValue::TYPE_CLASS ) {
                idmef_object_t *obj = (idmef_object_t *) idmef_value_get_object(value);
                *ret = _SWIG_Prelude_NewPointerObj((lua_State *) extra, new Prelude::IDMEF(idmef_object_ref(obj)), SWIGTYPE_p_Prelude__IDMEF, 1);;
        }

        else return -1;

        return 1;
}

SWIGINTERN Prelude::IDMEFValue Prelude_IDMEFPath_get(Prelude::IDMEFPath *self,Prelude::IDMEF &message){
                Prelude::IDMEFValue value;

                value = self->get(message);
                if ( value.isNull() && self->isAmbiguous() ) {
                        std::vector<Prelude::IDMEFValue> v;
                        return Prelude::IDMEFValue(v);
                }

                return value;
        }
SWIGINTERN char *Prelude_IDMEFTime___str__(Prelude::IDMEFTime *self){ return my_strdup(self->toString().c_str()); }
SWIGINTERN char *Prelude_IDMEF___str__(Prelude::IDMEF *self){ return my_strdup(self->toString().c_str()); }
SWIGINTERN void Prelude_IDMEF_write(Prelude::IDMEF *self,void *nocast_p){
                self->_genericWrite(_cb_lua_write, nocast_p);
        }
SWIGINTERN int Prelude_IDMEF_read(Prelude::IDMEF *self,void *nocast_p){
                self->_genericRead(_cb_lua_read, nocast_p);
                return 1;
        }
SWIGINTERN Prelude::IDMEFValue Prelude_IDMEF_get(Prelude::IDMEF *self,char const *path){
                Prelude::IDMEFValue value;
                Prelude::IDMEFPath ipath = Prelude::IDMEFPath(*self, path);

                value = ipath.get(*self);
                if ( value.isNull() && ipath.isAmbiguous() ) {
                        std::vector<Prelude::IDMEFValue> v;
                        return Prelude::IDMEFValue(v);
                }

                return value;
        }
#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);
    }
  }
  
  SWIG_Lua_pusherrstring(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 int _proxy__wrap_new_string(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_string);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_string_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_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_method swig_string_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_string_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_string_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_string_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_string_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_string_Sf_SwigStatic = {
    "string",
    swig_string_Sf_SwigStatic_methods,
    swig_string_Sf_SwigStatic_attributes,
    swig_string_Sf_SwigStatic_constants,
    swig_string_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_string_bases[] = {0};
static const char *swig_string_base_names[] = {0};
static swig_lua_class _wrap_class_string = { "string", "string", &SWIGTYPE_p_std__string,_proxy__wrap_new_string, swig_delete_string, swig_string_methods, swig_string_attributes, &swig_string_Sf_SwigStatic, swig_string_meta, swig_string_bases, swig_string_base_names };

static int _wrap_checkVersion__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::checkVersion",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::checkVersion",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (char *)Prelude::checkVersion((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_checkVersion__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::checkVersion",0,0)
  {
    try {
      result = (char *)Prelude::checkVersion();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_checkVersion(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_checkVersion__SWIG_1(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_checkVersion__SWIG_0(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'checkVersion'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::checkVersion(char const *)\n"
    "    Prelude::checkVersion()\n");
  lua_error(L);return 0;
}


static int _wrap_new_ClientProfile__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::ClientProfile",0,0)
  {
    try {
      result = (Prelude::ClientProfile *)new Prelude::ClientProfile();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientProfile__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::ClientProfile *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::ClientProfile",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientProfile::ClientProfile",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::ClientProfile *)new Prelude::ClientProfile((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientProfile__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  prelude_client_profile_t *arg1 = (prelude_client_profile_t *) 0 ;
  Prelude::ClientProfile *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::ClientProfile",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::ClientProfile",1,"prelude_client_profile_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_client_profile_t,0))){
    SWIG_fail_ptr("new_ClientProfile",1,SWIGTYPE_p_prelude_client_profile_t);
  }
  
  {
    try {
      result = (Prelude::ClientProfile *)new Prelude::ClientProfile(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientProfile__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = 0 ;
  Prelude::ClientProfile *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::ClientProfile",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::ClientProfile::ClientProfile",1,"Prelude::ClientProfile const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("new_ClientProfile",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (Prelude::ClientProfile *)new Prelude::ClientProfile((Prelude::ClientProfile const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientProfile,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientProfile(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_ClientProfile__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_client_profile_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_ClientProfile__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ClientProfile, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_ClientProfile__SWIG_3(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_ClientProfile__SWIG_1(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_ClientProfile'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::ClientProfile::ClientProfile()\n"
    "    Prelude::ClientProfile::ClientProfile(char const *)\n"
    "    Prelude::ClientProfile::ClientProfile(prelude_client_profile_t *)\n"
    "    Prelude::ClientProfile::ClientProfile(Prelude::ClientProfile const &)\n");
  lua_error(L);return 0;
}


static int _wrap_ClientProfile_getUid(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getUid",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getUid",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getUid",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (int)(arg1)->getUid();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getGid(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getGid",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getGid",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getGid",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (int)(arg1)->getGid();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getName(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::getName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getName",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getName",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (char *)(arg1)->getName();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_setName(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::ClientProfile::setName",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::setName",1,"Prelude::ClientProfile *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::ClientProfile::setName",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_setName",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      result = (int)(arg1)->setName((char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getAnalyzerId(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  uint64_t result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getAnalyzerId",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getAnalyzerId",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getAnalyzerId",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (uint64_t)(arg1)->getAnalyzerId();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_setAnalyzerId(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  uint64_t arg2 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::setAnalyzerId",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::setAnalyzerId",1,"Prelude::ClientProfile *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientProfile::setAnalyzerId",2,"uint64_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_setAnalyzerId",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  arg2 = (uint64_t)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setAnalyzerId(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ClientProfile_getConfigFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getConfigFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getConfigFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getConfigFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getConfigFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getAnalyzeridFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getAnalyzeridFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getAnalyzeridFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getAnalyzeridFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getAnalyzeridFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getTlsKeyFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getTlsKeyFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getTlsKeyFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getTlsKeyFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getTlsKeyFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getTlsServerCaCertFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getTlsServerCaCertFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getTlsServerCaCertFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getTlsServerCaCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getTlsServerCaCertFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getTlsServerKeyCertFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getTlsServerKeyCertFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getTlsServerKeyCertFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getTlsServerKeyCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getTlsServerKeyCertFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getTlsServerCrlFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getTlsServerCrlFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getTlsServerCrlFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getTlsServerCrlFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getTlsServerCrlFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getTlsClientKeyCertFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getTlsClientKeyCertFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getTlsClientKeyCertFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getTlsClientKeyCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getTlsClientKeyCertFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getTlsClientTrustedCertFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getTlsClientTrustedCertFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getTlsClientTrustedCertFilename",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getTlsClientTrustedCertFilename",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getTlsClientTrustedCertFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getBackupDirname(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getBackupDirname",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getBackupDirname",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getBackupDirname",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getBackupDirname();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_getProfileDirname(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getProfileDirname",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getProfileDirname",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getProfileDirname",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getProfileDirname();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ClientProfile_setPrefix(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("Prelude::ClientProfile::setPrefix",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::setPrefix",1,"Prelude::ClientProfile *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::ClientProfile::setPrefix",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_setPrefix",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      (arg1)->setPrefix((char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ClientProfile_getPrefix(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::ClientProfile::getPrefix",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ClientProfile::getPrefix",1,"Prelude::ClientProfile *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("ClientProfile_getPrefix",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  {
    try {
      result = (arg1)->getPrefix();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_ClientProfile(void *obj) {
Prelude::ClientProfile *arg1 = (Prelude::ClientProfile *) obj;
delete arg1;
}
static int _proxy__wrap_new_ClientProfile(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_ClientProfile);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_ClientProfile_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ClientProfile_methods[]= {
    { "getUid", _wrap_ClientProfile_getUid},
    { "getGid", _wrap_ClientProfile_getGid},
    { "getName", _wrap_ClientProfile_getName},
    { "setName", _wrap_ClientProfile_setName},
    { "getAnalyzerId", _wrap_ClientProfile_getAnalyzerId},
    { "setAnalyzerId", _wrap_ClientProfile_setAnalyzerId},
    { "getConfigFilename", _wrap_ClientProfile_getConfigFilename},
    { "getAnalyzeridFilename", _wrap_ClientProfile_getAnalyzeridFilename},
    { "getTlsKeyFilename", _wrap_ClientProfile_getTlsKeyFilename},
    { "getTlsServerCaCertFilename", _wrap_ClientProfile_getTlsServerCaCertFilename},
    { "getTlsServerKeyCertFilename", _wrap_ClientProfile_getTlsServerKeyCertFilename},
    { "getTlsServerCrlFilename", _wrap_ClientProfile_getTlsServerCrlFilename},
    { "getTlsClientKeyCertFilename", _wrap_ClientProfile_getTlsClientKeyCertFilename},
    { "getTlsClientTrustedCertFilename", _wrap_ClientProfile_getTlsClientTrustedCertFilename},
    { "getBackupDirname", _wrap_ClientProfile_getBackupDirname},
    { "getProfileDirname", _wrap_ClientProfile_getProfileDirname},
    { "setPrefix", _wrap_ClientProfile_setPrefix},
    { "getPrefix", _wrap_ClientProfile_getPrefix},
    {0,0}
};
static swig_lua_method swig_ClientProfile_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_ClientProfile_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_ClientProfile_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_ClientProfile_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_ClientProfile_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_ClientProfile_Sf_SwigStatic = {
    "ClientProfile",
    swig_ClientProfile_Sf_SwigStatic_methods,
    swig_ClientProfile_Sf_SwigStatic_attributes,
    swig_ClientProfile_Sf_SwigStatic_constants,
    swig_ClientProfile_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_ClientProfile_bases[] = {0};
static const char *swig_ClientProfile_base_names[] = {0};
static swig_lua_class _wrap_class_ClientProfile = { "ClientProfile", "ClientProfile", &SWIGTYPE_p_Prelude__ClientProfile,_proxy__wrap_new_ClientProfile, swig_delete_ClientProfile, swig_ClientProfile_methods, swig_ClientProfile_attributes, &swig_ClientProfile_Sf_SwigStatic, swig_ClientProfile_meta, swig_ClientProfile_bases, swig_ClientProfile_base_names };

static int _wrap_new_Connection__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::Connection",0,0)
  {
    try {
      result = (Prelude::Connection *)new Prelude::Connection();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Connection__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::Connection *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::Connection",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::Connection::Connection",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::Connection *)new Prelude::Connection((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Connection__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = 0 ;
  Prelude::Connection *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::Connection",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::Connection::Connection",1,"Prelude::Connection const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("new_Connection",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (Prelude::Connection *)new Prelude::Connection((Prelude::Connection const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Connection__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  prelude_connection_t *arg1 = (prelude_connection_t *) 0 ;
  bool arg2 ;
  Prelude::Connection *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::Connection",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::Connection",1,"prelude_connection_t *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("Prelude::Connection::Connection",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_connection_t,0))){
    SWIG_fail_ptr("new_Connection",1,SWIGTYPE_p_prelude_connection_t);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  {
    try {
      result = (Prelude::Connection *)new Prelude::Connection(arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Connection__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  prelude_connection_t *arg1 = (prelude_connection_t *) 0 ;
  Prelude::Connection *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::Connection",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::Connection",1,"prelude_connection_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_connection_t,0))){
    SWIG_fail_ptr("new_Connection",1,SWIGTYPE_p_prelude_connection_t);
  }
  
  {
    try {
      result = (Prelude::Connection *)new Prelude::Connection(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Connection,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Connection(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Connection__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_Prelude__Connection, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_Connection__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_connection_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_Connection__SWIG_4(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_Connection__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_connection_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isboolean(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_Connection__SWIG_3(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Connection'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::Connection::Connection()\n"
    "    Prelude::Connection::Connection(char const *)\n"
    "    Prelude::Connection::Connection(Prelude::Connection const &)\n"
    "    Prelude::Connection::Connection(prelude_connection_t *,bool)\n"
    "    Prelude::Connection::Connection(prelude_connection_t *)\n");
  lua_error(L);return 0;
}


static int _wrap_Connection_getConnection(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  prelude_connection_t *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::getConnection",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getConnection",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getConnection",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (prelude_connection_t *)((Prelude::Connection const *)arg1)->getConnection();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_prelude_connection_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_close(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  
  SWIG_check_num_args("Prelude::Connection::close",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::close",1,"Prelude::Connection *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_close",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      (arg1)->close();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_connect(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  Prelude::ClientProfile *arg2 = 0 ;
  int arg3 ;
  
  SWIG_check_num_args("Prelude::Connection::connect",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::connect",1,"Prelude::Connection *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::Connection::connect",2,"Prelude::ClientProfile &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::Connection::connect",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_connect",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("Connection_connect",2,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  {
    try {
      (arg1)->connect(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_setState(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Prelude::Connection::setState",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::setState",1,"Prelude::Connection *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::Connection::setState",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_setState",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setState(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_getState(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::Connection::getState",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getState",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getState",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (int)((Prelude::Connection const *)arg1)->getState();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_setData(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  void *arg2 = (void *) 0 ;
  
  SWIG_check_num_args("Prelude::Connection::setData",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::setData",1,"Prelude::Connection *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::Connection::setData",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_setData",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"Connection_setData");
  {
    try {
      (arg1)->setData(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_getData(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::getData",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getData",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getData",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (void *)((Prelude::Connection const *)arg1)->getData();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_getPermission(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::Connection::getPermission",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getPermission",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getPermission",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (int)((Prelude::Connection const *)arg1)->getPermission();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_setPeerAnalyzerid(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  uint64_t arg2 ;
  
  SWIG_check_num_args("Prelude::Connection::setPeerAnalyzerid",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::setPeerAnalyzerid",1,"Prelude::Connection *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::Connection::setPeerAnalyzerid",2,"uint64_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_setPeerAnalyzerid",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  arg2 = (uint64_t)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setPeerAnalyzerid(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Connection_getPeerAnalyzerid(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  uint64_t result;
  
  SWIG_check_num_args("Prelude::Connection::getPeerAnalyzerid",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getPeerAnalyzerid",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getPeerAnalyzerid",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (uint64_t)((Prelude::Connection const *)arg1)->getPeerAnalyzerid();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_getLocalAddr(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::getLocalAddr",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getLocalAddr",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getLocalAddr",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (char *)((Prelude::Connection const *)arg1)->getLocalAddr();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_getLocalPort(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Prelude::Connection::getLocalPort",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getLocalPort",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getLocalPort",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (unsigned int)((Prelude::Connection const *)arg1)->getLocalPort();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_getPeerAddr(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::Connection::getPeerAddr",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getPeerAddr",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getPeerAddr",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (char *)((Prelude::Connection const *)arg1)->getPeerAddr();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_getPeerPort(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Prelude::Connection::getPeerPort",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getPeerPort",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getPeerPort",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (unsigned int)((Prelude::Connection const *)arg1)->getPeerPort();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_isAlive(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::Connection::isAlive",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::isAlive",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_isAlive",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (bool)((Prelude::Connection const *)arg1)->isAlive();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_getFd(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::Connection::getFd",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::getFd",1,"Prelude::Connection const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_getFd",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (int)((Prelude::Connection const *)arg1)->getFd();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Connection_recvIDMEF(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Connection *arg1 = (Prelude::Connection *) 0 ;
  Prelude::IDMEF result;
  
  SWIG_check_num_args("Prelude::Connection::recvIDMEF",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Connection::recvIDMEF",1,"Prelude::Connection *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("Connection_recvIDMEF",1,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      result = (arg1)->recvIDMEF();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEF * resultptr = new Prelude::IDMEF((const Prelude::IDMEF &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Connection(void *obj) {
Prelude::Connection *arg1 = (Prelude::Connection *) obj;
delete arg1;
}
static int _proxy__wrap_new_Connection(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_Connection);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_Connection_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Connection_methods[]= {
    { "getConnection", _wrap_Connection_getConnection},
    { "close", _wrap_Connection_close},
    { "connect", _wrap_Connection_connect},
    { "setState", _wrap_Connection_setState},
    { "getState", _wrap_Connection_getState},
    { "setData", _wrap_Connection_setData},
    { "getData", _wrap_Connection_getData},
    { "getPermission", _wrap_Connection_getPermission},
    { "setPeerAnalyzerid", _wrap_Connection_setPeerAnalyzerid},
    { "getPeerAnalyzerid", _wrap_Connection_getPeerAnalyzerid},
    { "getLocalAddr", _wrap_Connection_getLocalAddr},
    { "getLocalPort", _wrap_Connection_getLocalPort},
    { "getPeerAddr", _wrap_Connection_getPeerAddr},
    { "getPeerPort", _wrap_Connection_getPeerPort},
    { "isAlive", _wrap_Connection_isAlive},
    { "getFd", _wrap_Connection_getFd},
    { "recvIDMEF", _wrap_Connection_recvIDMEF},
    {0,0}
};
static swig_lua_method swig_Connection_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_Connection_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_Connection_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_Connection_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_Connection_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_Connection_Sf_SwigStatic = {
    "Connection",
    swig_Connection_Sf_SwigStatic_methods,
    swig_Connection_Sf_SwigStatic_attributes,
    swig_Connection_Sf_SwigStatic_constants,
    swig_Connection_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_Connection_bases[] = {0};
static const char *swig_Connection_base_names[] = {0};
static swig_lua_class _wrap_class_Connection = { "Connection", "Connection", &SWIGTYPE_p_Prelude__Connection,_proxy__wrap_new_Connection, swig_delete_Connection, swig_Connection_methods, swig_Connection_attributes, &swig_Connection_Sf_SwigStatic, swig_Connection_meta, swig_Connection_bases, swig_Connection_base_names };

static int _wrap_new_ConnectionPool__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *result = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::ConnectionPool",0,0)
  {
    try {
      result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ConnectionPool__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  prelude_connection_pool_t *arg1 = (prelude_connection_pool_t *) 0 ;
  Prelude::ConnectionPool *result = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::ConnectionPool",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::ConnectionPool",1,"prelude_connection_pool_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_prelude_connection_pool_t,0))){
    SWIG_fail_ptr("new_ConnectionPool",1,SWIGTYPE_p_prelude_connection_pool_t);
  }
  
  {
    try {
      result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ConnectionPool__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = 0 ;
  Prelude::ConnectionPool *result = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::ConnectionPool",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::ConnectionPool",1,"Prelude::ConnectionPool const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("new_ConnectionPool",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  {
    try {
      result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool((Prelude::ConnectionPool const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ConnectionPool__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ClientProfile *arg1 = 0 ;
  int arg2 ;
  Prelude::ConnectionPool *result = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::ConnectionPool",2,2)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::ConnectionPool",1,"Prelude::ClientProfile &");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::ConnectionPool",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ClientProfile,0))){
    SWIG_fail_ptr("new_ConnectionPool",1,SWIGTYPE_p_Prelude__ClientProfile);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (Prelude::ConnectionPool *)new Prelude::ConnectionPool(*arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ConnectionPool(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_ConnectionPool__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_prelude_connection_pool_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_ConnectionPool__SWIG_1(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ConnectionPool, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_ConnectionPool__SWIG_2(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__ClientProfile, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_ConnectionPool__SWIG_3(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_ConnectionPool'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::ConnectionPool::ConnectionPool()\n"
    "    Prelude::ConnectionPool::ConnectionPool(prelude_connection_pool_t *)\n"
    "    Prelude::ConnectionPool::ConnectionPool(Prelude::ConnectionPool const &)\n"
    "    Prelude::ConnectionPool::ConnectionPool(Prelude::ClientProfile &,int)\n");
  lua_error(L);return 0;
}


static int _wrap_ConnectionPool_init(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::init",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::init",1,"Prelude::ConnectionPool *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_init",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  {
    try {
      (arg1)->init();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_setConnectionString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::setConnectionString",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::setConnectionString",1,"Prelude::ConnectionPool *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::setConnectionString",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_setConnectionString",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      (arg1)->setConnectionString((char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_getConnectionString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::getConnectionString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::getConnectionString",1,"Prelude::ConnectionPool const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_getConnectionString",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  {
    try {
      result = (char *)((Prelude::ConnectionPool const *)arg1)->getConnectionString();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ConnectionPool_getConnectionList(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  std::vector< Prelude::Connection > result;
  
  SWIG_check_num_args("Prelude::ConnectionPool::getConnectionList",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::getConnectionList",1,"Prelude::ConnectionPool const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_getConnectionList",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  {
    try {
      result = ((Prelude::ConnectionPool const *)arg1)->getConnectionList();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    std::vector< Prelude::Connection > * resultptr = new std::vector< Prelude::Connection >((const std::vector< Prelude::Connection > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_Prelude__Connection_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_setFlags(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::setFlags",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::setFlags",1,"Prelude::ConnectionPool *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::setFlags",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_setFlags",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setFlags(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_getFlags(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::ConnectionPool::getFlags",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::getFlags",1,"Prelude::ConnectionPool const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_getFlags",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  {
    try {
      result = (int)((Prelude::ConnectionPool const *)arg1)->getFlags();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_ConnectionPool_setData(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  void *arg2 = (void *) 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::setData",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::setData",1,"Prelude::ConnectionPool *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::setData",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_setData",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"ConnectionPool_setData");
  {
    try {
      (arg1)->setData(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_getData(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::getData",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::getData",1,"Prelude::ConnectionPool const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_getData",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  {
    try {
      result = (void *)((Prelude::ConnectionPool const *)arg1)->getData();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_addConnection(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  Prelude::Connection arg2 ;
  Prelude::Connection *argp2 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::addConnection",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::addConnection",1,"Prelude::ConnectionPool *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::addConnection",2,"Prelude::Connection");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_addConnection",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("ConnectionPool_addConnection",2,SWIGTYPE_p_Prelude__Connection);
  }
  arg2 = *argp2;
  
  {
    try {
      (arg1)->addConnection(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_delConnection(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  Prelude::Connection arg2 ;
  Prelude::Connection *argp2 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::delConnection",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::delConnection",1,"Prelude::ConnectionPool *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::delConnection",2,"Prelude::Connection");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_delConnection",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("ConnectionPool_delConnection",2,SWIGTYPE_p_Prelude__Connection);
  }
  arg2 = *argp2;
  
  {
    try {
      (arg1)->delConnection(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_setConnectionAlive(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  Prelude::Connection *arg2 = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::setConnectionAlive",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::setConnectionAlive",1,"Prelude::ConnectionPool *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::setConnectionAlive",2,"Prelude::Connection &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_setConnectionAlive",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("ConnectionPool_setConnectionAlive",2,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      (arg1)->setConnectionAlive(*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_setConnectionDead(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  Prelude::Connection *arg2 = 0 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::setConnectionDead",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::setConnectionDead",1,"Prelude::ConnectionPool *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::setConnectionDead",2,"Prelude::Connection &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_setConnectionDead",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__Connection,0))){
    SWIG_fail_ptr("ConnectionPool_setConnectionDead",2,SWIGTYPE_p_Prelude__Connection);
  }
  
  {
    try {
      (arg1)->setConnectionDead(*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ConnectionPool_setRequiredPermission(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Prelude::ConnectionPool::setRequiredPermission",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::ConnectionPool::setRequiredPermission",1,"Prelude::ConnectionPool *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ConnectionPool::setRequiredPermission",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("ConnectionPool_setRequiredPermission",1,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setRequiredPermission(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_ConnectionPool(void *obj) {
Prelude::ConnectionPool *arg1 = (Prelude::ConnectionPool *) obj;
delete arg1;
}
static int _proxy__wrap_new_ConnectionPool(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_ConnectionPool);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_ConnectionPool_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ConnectionPool_methods[]= {
    { "init", _wrap_ConnectionPool_init},
    { "setConnectionString", _wrap_ConnectionPool_setConnectionString},
    { "getConnectionString", _wrap_ConnectionPool_getConnectionString},
    { "getConnectionList", _wrap_ConnectionPool_getConnectionList},
    { "setFlags", _wrap_ConnectionPool_setFlags},
    { "getFlags", _wrap_ConnectionPool_getFlags},
    { "setData", _wrap_ConnectionPool_setData},
    { "getData", _wrap_ConnectionPool_getData},
    { "addConnection", _wrap_ConnectionPool_addConnection},
    { "delConnection", _wrap_ConnectionPool_delConnection},
    { "setConnectionAlive", _wrap_ConnectionPool_setConnectionAlive},
    { "setConnectionDead", _wrap_ConnectionPool_setConnectionDead},
    { "setRequiredPermission", _wrap_ConnectionPool_setRequiredPermission},
    {0,0}
};
static swig_lua_method swig_ConnectionPool_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_ConnectionPool_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_ConnectionPool_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_ConnectionPool_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_ConnectionPool_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_ConnectionPool_Sf_SwigStatic = {
    "ConnectionPool",
    swig_ConnectionPool_Sf_SwigStatic_methods,
    swig_ConnectionPool_Sf_SwigStatic_attributes,
    swig_ConnectionPool_Sf_SwigStatic_constants,
    swig_ConnectionPool_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_ConnectionPool_bases[] = {0};
static const char *swig_ConnectionPool_base_names[] = {0};
static swig_lua_class _wrap_class_ConnectionPool = { "ConnectionPool", "ConnectionPool", &SWIGTYPE_p_Prelude__ConnectionPool,_proxy__wrap_new_ConnectionPool, swig_delete_ConnectionPool, swig_ConnectionPool_methods, swig_ConnectionPool_attributes, &swig_ConnectionPool_Sf_SwigStatic, swig_ConnectionPool_meta, swig_ConnectionPool_bases, swig_ConnectionPool_base_names };

static int _wrap_new_Client__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::Client *result = 0 ;
  
  SWIG_check_num_args("Prelude::Client::Client",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::Client::Client",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::Client *)new Prelude::Client((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Client,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Client__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = 0 ;
  Prelude::Client *result = 0 ;
  
  SWIG_check_num_args("Prelude::Client::Client",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::Client::Client",1,"Prelude::Client const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("new_Client",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      result = (Prelude::Client *)new Prelude::Client((Prelude::Client const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Client,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Client(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__Client, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_Client__SWIG_1(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_Client__SWIG_0(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Client'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::Client::Client(char const *)\n"
    "    Prelude::Client::Client(Prelude::Client const &)\n");
  lua_error(L);return 0;
}


static int _wrap_Client_start(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  
  SWIG_check_num_args("Prelude::Client::start",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::start",1,"Prelude::Client *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_start",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      (arg1)->start();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_init(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  
  SWIG_check_num_args("Prelude::Client::init",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::init",1,"Prelude::Client *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_init",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      (arg1)->init();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_getClient(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  prelude_client_t *result = 0 ;
  
  SWIG_check_num_args("Prelude::Client::getClient",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::getClient",1,"Prelude::Client const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_getClient",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      result = (prelude_client_t *)((Prelude::Client const *)arg1)->getClient();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_prelude_client_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_sendIDMEF(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  
  SWIG_check_num_args("Prelude::Client::sendIDMEF",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::sendIDMEF",1,"Prelude::Client *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::Client::sendIDMEF",2,"Prelude::IDMEF const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_sendIDMEF",1,SWIGTYPE_p_Prelude__Client);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("Client_sendIDMEF",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      (arg1)->sendIDMEF((Prelude::IDMEF const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_recvIDMEF__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  int arg3 ;
  int result;
  
  SWIG_check_num_args("Prelude::Client::recvIDMEF",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::recvIDMEF",1,"Prelude::Client *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::Client::recvIDMEF",2,"Prelude::IDMEF &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::Client::recvIDMEF",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_recvIDMEF",1,SWIGTYPE_p_Prelude__Client);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("Client_recvIDMEF",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  {
    try {
      result = (int)(arg1)->recvIDMEF(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Client_recvIDMEF__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::Client::recvIDMEF",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::recvIDMEF",1,"Prelude::Client *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::Client::recvIDMEF",2,"Prelude::IDMEF &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_recvIDMEF",1,SWIGTYPE_p_Prelude__Client);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("Client_recvIDMEF",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (int)(arg1)->recvIDMEF(*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Client_recvIDMEF(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  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_Prelude__Client, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_Client_recvIDMEF__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_Prelude__Client, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Client_recvIDMEF__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Client_recvIDMEF'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::Client::recvIDMEF(Prelude::IDMEF &,int)\n"
    "    Prelude::Client::recvIDMEF(Prelude::IDMEF &)\n");
  lua_error(L);return 0;
}


static int _wrap_Client_getFlags(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::Client::getFlags",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::getFlags",1,"Prelude::Client const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_getFlags",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      result = (int)((Prelude::Client const *)arg1)->getFlags();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Client_setFlags(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Prelude::Client::setFlags",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::setFlags",1,"Prelude::Client *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::Client::setFlags",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_setFlags",1,SWIGTYPE_p_Prelude__Client);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setFlags(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_getRequiredPermission(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::Client::getRequiredPermission",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::getRequiredPermission",1,"Prelude::Client const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_getRequiredPermission",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      result = (int)((Prelude::Client const *)arg1)->getRequiredPermission();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Client_setRequiredPermission(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Prelude::Client::setRequiredPermission",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::setRequiredPermission",1,"Prelude::Client *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::Client::setRequiredPermission",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_setRequiredPermission",1,SWIGTYPE_p_Prelude__Client);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setRequiredPermission(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_getConfigFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::Client::getConfigFilename",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::getConfigFilename",1,"Prelude::Client const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_getConfigFilename",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      result = (char *)((Prelude::Client const *)arg1)->getConfigFilename();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_Client_setConfigFilename(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("Prelude::Client::setConfigFilename",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::setConfigFilename",1,"Prelude::Client *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::Client::setConfigFilename",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_setConfigFilename",1,SWIGTYPE_p_Prelude__Client);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      (arg1)->setConfigFilename((char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_getConnectionPool(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  Prelude::ConnectionPool *result = 0 ;
  
  SWIG_check_num_args("Prelude::Client::getConnectionPool",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::getConnectionPool",1,"Prelude::Client *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_getConnectionPool",1,SWIGTYPE_p_Prelude__Client);
  }
  
  {
    try {
      result = (Prelude::ConnectionPool *) &(arg1)->getConnectionPool();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ConnectionPool,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_setConnectionPool(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = (Prelude::Client *) 0 ;
  Prelude::ConnectionPool arg2 ;
  Prelude::ConnectionPool *argp2 ;
  
  SWIG_check_num_args("Prelude::Client::setConnectionPool",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::Client::setConnectionPool",1,"Prelude::Client *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::Client::setConnectionPool",2,"Prelude::ConnectionPool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_setConnectionPool",1,SWIGTYPE_p_Prelude__Client);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_Prelude__ConnectionPool,0))){
    SWIG_fail_ptr("Client_setConnectionPool",2,SWIGTYPE_p_Prelude__ConnectionPool);
  }
  arg2 = *argp2;
  
  {
    try {
      (arg1)->setConnectionPool(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Client_setRecvTimeout(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::Client *arg1 = 0 ;
  int arg2 ;
  Prelude::Client *result = 0 ;
  
  SWIG_check_num_args("Prelude::Client::setRecvTimeout",2,2)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::Client::setRecvTimeout",1,"Prelude::Client &");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::Client::setRecvTimeout",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__Client,0))){
    SWIG_fail_ptr("Client_setRecvTimeout",1,SWIGTYPE_p_Prelude__Client);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (Prelude::Client *) &Prelude::Client::setRecvTimeout(*arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__Client,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Client(void *obj) {
Prelude::Client *arg1 = (Prelude::Client *) obj;
delete arg1;
}
static int _proxy__wrap_new_Client(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_Client);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_Client_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Client_methods[]= {
    { "start", _wrap_Client_start},
    { "init", _wrap_Client_init},
    { "getClient", _wrap_Client_getClient},
    { "sendIDMEF", _wrap_Client_sendIDMEF},
    { "recvIDMEF", _wrap_Client_recvIDMEF},
    { "getFlags", _wrap_Client_getFlags},
    { "setFlags", _wrap_Client_setFlags},
    { "getRequiredPermission", _wrap_Client_getRequiredPermission},
    { "setRequiredPermission", _wrap_Client_setRequiredPermission},
    { "getConfigFilename", _wrap_Client_getConfigFilename},
    { "setConfigFilename", _wrap_Client_setConfigFilename},
    { "getConnectionPool", _wrap_Client_getConnectionPool},
    { "setConnectionPool", _wrap_Client_setConnectionPool},
    {0,0}
};
static swig_lua_method swig_Client_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_Client_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_Client_Sf_SwigStatic_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("ASYNC_SEND", Prelude::Client::ASYNC_SEND)},
    {SWIG_LUA_CONSTTAB_INT("FLAGS_ASYNC_SEND", Prelude::Client::FLAGS_ASYNC_SEND)},
    {SWIG_LUA_CONSTTAB_INT("ASYNC_TIMER", Prelude::Client::ASYNC_TIMER)},
    {SWIG_LUA_CONSTTAB_INT("FLAGS_ASYNC_TIMER", Prelude::Client::FLAGS_ASYNC_TIMER)},
    {SWIG_LUA_CONSTTAB_INT("HEARTBEAT", Prelude::Client::HEARTBEAT)},
    {SWIG_LUA_CONSTTAB_INT("FLAGS_HEARTBEAT", Prelude::Client::FLAGS_HEARTBEAT)},
    {SWIG_LUA_CONSTTAB_INT("CONNECT", Prelude::Client::CONNECT)},
    {SWIG_LUA_CONSTTAB_INT("FLAGS_CONNECT", Prelude::Client::FLAGS_CONNECT)},
    {SWIG_LUA_CONSTTAB_INT("AUTOCONFIG", Prelude::Client::AUTOCONFIG)},
    {SWIG_LUA_CONSTTAB_INT("FLAGS_AUTOCONFIG", Prelude::Client::FLAGS_AUTOCONFIG)},
    {SWIG_LUA_CONSTTAB_INT("IDMEF_READ", Prelude::Client::IDMEF_READ)},
    {SWIG_LUA_CONSTTAB_INT("PERMISSION_IDMEF_READ", Prelude::Client::PERMISSION_IDMEF_READ)},
    {SWIG_LUA_CONSTTAB_INT("ADMIN_READ", Prelude::Client::ADMIN_READ)},
    {SWIG_LUA_CONSTTAB_INT("PERMISSION_ADMIN_READ", Prelude::Client::PERMISSION_ADMIN_READ)},
    {SWIG_LUA_CONSTTAB_INT("IDMEF_WRITE", Prelude::Client::IDMEF_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("PERMISSION_IDMEF_WRITE", Prelude::Client::PERMISSION_IDMEF_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("ADMIN_WRITE", Prelude::Client::ADMIN_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("PERMISSION_ADMIN_WRITE", Prelude::Client::PERMISSION_ADMIN_WRITE)},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_Client_Sf_SwigStatic_methods[]= {
    { "setRecvTimeout", _wrap_Client_setRecvTimeout},
    {0,0}
};
static swig_lua_class* swig_Client_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_Client_Sf_SwigStatic = {
    "Client",
    swig_Client_Sf_SwigStatic_methods,
    swig_Client_Sf_SwigStatic_attributes,
    swig_Client_Sf_SwigStatic_constants,
    swig_Client_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_Client_bases[] = {0,0};
static const char *swig_Client_base_names[] = {"Prelude::ClientProfile *",0};
static swig_lua_class _wrap_class_Client = { "Client", "Client", &SWIGTYPE_p_Prelude__Client,_proxy__wrap_new_Client, swig_delete_Client, swig_Client_methods, swig_Client_attributes, &swig_Client_Sf_SwigStatic, swig_Client_meta, swig_Client_bases, swig_Client_base_names };

static int _wrap_PreludeLog_setLevel(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  
  SWIG_check_num_args("Prelude::PreludeLog::setLevel",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeLog::setLevel",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  {
    try {
      Prelude::PreludeLog::setLevel(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PreludeLog_setDebugLevel(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  
  SWIG_check_num_args("Prelude::PreludeLog::setDebugLevel",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeLog::setDebugLevel",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  {
    try {
      Prelude::PreludeLog::setDebugLevel(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PreludeLog_setFlags(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  
  SWIG_check_num_args("Prelude::PreludeLog::setFlags",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeLog::setFlags",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  {
    try {
      Prelude::PreludeLog::setFlags(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PreludeLog_getFlags(lua_State* L) {
  int SWIG_arg = 0;
  int result;
  
  SWIG_check_num_args("Prelude::PreludeLog::getFlags",0,0)
  {
    try {
      result = (int)Prelude::PreludeLog::getFlags();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_PreludeLog_setLogfile(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  
  SWIG_check_num_args("Prelude::PreludeLog::setLogfile",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::PreludeLog::setLogfile",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      Prelude::PreludeLog::setLogfile((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PreludeLog_setCallback(lua_State* L) {
  int SWIG_arg = 0;
  void (*arg1)(int,char const *) = (void (*)(int,char const *)) 0 ;
  
  SWIG_check_num_args("Prelude::PreludeLog::setCallback",1,1)
  {
    if ( ! lua_isfunction(L, -1) )
    SWIG_exception(SWIG_ValueError, "Argument should be a function");
    
    if ( __lua_state )
    luaL_unref(L, LUA_REGISTRYINDEX, __prelude_log_func);
    
    __prelude_log_func = luaL_ref(L, LUA_REGISTRYINDEX);
    arg1 = _cb_lua_log;
    __lua_state = L;
  }
  {
    try {
      Prelude::PreludeLog::setCallback(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_PreludeLog(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::PreludeLog *result = 0 ;
  
  SWIG_check_num_args("Prelude::PreludeLog::PreludeLog",0,0)
  {
    try {
      result = (Prelude::PreludeLog *)new Prelude::PreludeLog();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeLog,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_PreludeLog(void *obj) {
Prelude::PreludeLog *arg1 = (Prelude::PreludeLog *) obj;
delete arg1;
}
static int _proxy__wrap_new_PreludeLog(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_PreludeLog);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_PreludeLog_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_PreludeLog_methods[]= {
    {0,0}
};
static swig_lua_method swig_PreludeLog_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_PreludeLog_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_PreludeLog_Sf_SwigStatic_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("DEBUG", Prelude::PreludeLog::DEBUG)},
    {SWIG_LUA_CONSTTAB_INT("INFO", Prelude::PreludeLog::INFO)},
    {SWIG_LUA_CONSTTAB_INT("WARNING", Prelude::PreludeLog::WARNING)},
    {SWIG_LUA_CONSTTAB_INT("ERROR", Prelude::PreludeLog::ERROR)},
    {SWIG_LUA_CONSTTAB_INT("CRITICAL", Prelude::PreludeLog::CRITICAL)},
    {SWIG_LUA_CONSTTAB_INT("QUIET", Prelude::PreludeLog::QUIET)},
    {SWIG_LUA_CONSTTAB_INT("SYSLOG", Prelude::PreludeLog::SYSLOG)},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_PreludeLog_Sf_SwigStatic_methods[]= {
    { "setLevel", _wrap_PreludeLog_setLevel},
    { "setDebugLevel", _wrap_PreludeLog_setDebugLevel},
    { "setFlags", _wrap_PreludeLog_setFlags},
    { "getFlags", _wrap_PreludeLog_getFlags},
    { "setLogfile", _wrap_PreludeLog_setLogfile},
    { "setCallback", _wrap_PreludeLog_setCallback},
    {0,0}
};
static swig_lua_class* swig_PreludeLog_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_PreludeLog_Sf_SwigStatic = {
    "PreludeLog",
    swig_PreludeLog_Sf_SwigStatic_methods,
    swig_PreludeLog_Sf_SwigStatic_attributes,
    swig_PreludeLog_Sf_SwigStatic_constants,
    swig_PreludeLog_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_PreludeLog_bases[] = {0};
static const char *swig_PreludeLog_base_names[] = {0};
static swig_lua_class _wrap_class_PreludeLog = { "PreludeLog", "PreludeLog", &SWIGTYPE_p_Prelude__PreludeLog,_proxy__wrap_new_PreludeLog, swig_delete_PreludeLog, swig_PreludeLog_methods, swig_PreludeLog_attributes, &swig_PreludeLog_Sf_SwigStatic, swig_PreludeLog_meta, swig_PreludeLog_bases, swig_PreludeLog_base_names };

static int _wrap_new_PreludeError__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::PreludeError *result = 0 ;
  
  SWIG_check_num_args("Prelude::PreludeError::PreludeError",0,0)
  {
    try {
      result = (Prelude::PreludeError *)new Prelude::PreludeError();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeError,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_PreludeError__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  Prelude::PreludeError *result = 0 ;
  
  SWIG_check_num_args("Prelude::PreludeError::PreludeError",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::PreludeError::PreludeError",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  {
    try {
      result = (Prelude::PreludeError *)new Prelude::PreludeError(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeError,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_PreludeError__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = 0 ;
  std::string temp1 ;
  Prelude::PreludeError *result = 0 ;
  
  SWIG_check_num_args("Prelude::PreludeError::PreludeError",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::PreludeError::PreludeError",1,"std::string const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    try {
      result = (Prelude::PreludeError *)new Prelude::PreludeError((std::string const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__PreludeError,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_PreludeError(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_PreludeError__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_PreludeError__SWIG_1(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_PreludeError__SWIG_2(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_PreludeError'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::PreludeError::PreludeError()\n"
    "    Prelude::PreludeError::PreludeError(int)\n"
    "    Prelude::PreludeError::PreludeError(std::string const &)\n");
  lua_error(L);return 0;
}


static int _wrap_PreludeError_getCode(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::PreludeError::getCode",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::PreludeError::getCode",1,"Prelude::PreludeError const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__PreludeError,0))){
    SWIG_fail_ptr("PreludeError_getCode",1,SWIGTYPE_p_Prelude__PreludeError);
  }
  
  {
    try {
      result = (int)((Prelude::PreludeError const *)arg1)->getCode();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_PreludeError_what(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::PreludeError::what",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::PreludeError::what",1,"Prelude::PreludeError const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__PreludeError,0))){
    SWIG_fail_ptr("PreludeError_what",1,SWIGTYPE_p_Prelude__PreludeError);
  }
  
  {
    try {
      result = (char *)((Prelude::PreludeError const *)arg1)->what();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_PreludeError___str__(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::PreludeError *arg1 = (Prelude::PreludeError *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::PreludeError::operator const char*",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::PreludeError::operator const char*",1,"Prelude::PreludeError const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__PreludeError,0))){
    SWIG_fail_ptr("PreludeError___str__",1,SWIGTYPE_p_Prelude__PreludeError);
  }
  
  {
    try {
      result = (char *)((Prelude::PreludeError const *)arg1)->operator const char*();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_PreludeError(void *obj) {
Prelude::PreludeError *arg1 = (Prelude::PreludeError *) obj;
delete arg1;
}
static int _proxy__wrap_new_PreludeError(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_PreludeError);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_PreludeError_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_PreludeError_methods[]= {
    { "getCode", _wrap_PreludeError_getCode},
    { "what", _wrap_PreludeError_what},
    { "__str__", _wrap_PreludeError___str__},
    {0,0}
};
static swig_lua_method swig_PreludeError_meta[] = {
    { "__str__", _wrap_PreludeError___str__},
    {0,0}
};

static swig_lua_attribute swig_PreludeError_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_PreludeError_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_PreludeError_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_PreludeError_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_PreludeError_Sf_SwigStatic = {
    "PreludeError",
    swig_PreludeError_Sf_SwigStatic_methods,
    swig_PreludeError_Sf_SwigStatic_attributes,
    swig_PreludeError_Sf_SwigStatic_constants,
    swig_PreludeError_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_PreludeError_bases[] = {0};
static const char *swig_PreludeError_base_names[] = {0};
static swig_lua_class _wrap_class_PreludeError = { "PreludeError", "PreludeError", &SWIGTYPE_p_Prelude__PreludeError,_proxy__wrap_new_PreludeError, swig_delete_PreludeError, swig_PreludeError_methods, swig_PreludeError_attributes, &swig_PreludeError_Sf_SwigStatic, swig_PreludeError_meta, swig_PreludeError_bases, swig_PreludeError_base_names };

static int _wrap_new_ClientEasy__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  Prelude::ClientEasy *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientEasy::ClientEasy",6,6)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",1,"char const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",2,"int");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",3,"char const *");
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",4,"char const *");
  if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",5,"char const *");
  if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",6,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  arg4 = (char *)lua_tostring(L, 4);
  arg5 = (char *)lua_tostring(L, 5);
  arg6 = (char *)lua_tostring(L, 6);
  {
    try {
      result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientEasy__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  Prelude::ClientEasy *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientEasy::ClientEasy",5,5)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",1,"char const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",2,"int");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",3,"char const *");
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",4,"char const *");
  if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",5,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  arg4 = (char *)lua_tostring(L, 4);
  arg5 = (char *)lua_tostring(L, 5);
  {
    try {
      result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientEasy__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  Prelude::ClientEasy *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientEasy::ClientEasy",4,4)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",1,"char const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",2,"int");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",3,"char const *");
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",4,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  arg4 = (char *)lua_tostring(L, 4);
  {
    try {
      result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientEasy__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  Prelude::ClientEasy *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientEasy::ClientEasy",3,3)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",1,"char const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",2,"int");
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",3,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (char *)lua_tostring(L, 3);
  {
    try {
      result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2,(char const *)arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientEasy__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  Prelude::ClientEasy *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientEasy::ClientEasy",2,2)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",1,"char const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",2,"int");
  arg1 = (char *)lua_tostring(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientEasy__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::ClientEasy *result = 0 ;
  
  SWIG_check_num_args("Prelude::ClientEasy::ClientEasy",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::ClientEasy::ClientEasy",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::ClientEasy *)new Prelude::ClientEasy((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__ClientEasy,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ClientEasy(lua_State* L) {
  int argc;
  int argv[7]={
    1,2,3,4,5,6,7
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_ClientEasy__SWIG_5(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_ClientEasy__SWIG_4(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_ClientEasy__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          {
            _v = SWIG_lua_isnilstring(L,argv[3]);
          }
          if (_v) {
            return _wrap_new_ClientEasy__SWIG_2(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          {
            _v = SWIG_lua_isnilstring(L,argv[3]);
          }
          if (_v) {
            {
              _v = SWIG_lua_isnilstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_new_ClientEasy__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = SWIG_lua_isnilstring(L,argv[2]);
        }
        if (_v) {
          {
            _v = SWIG_lua_isnilstring(L,argv[3]);
          }
          if (_v) {
            {
              _v = SWIG_lua_isnilstring(L,argv[4]);
            }
            if (_v) {
              {
                _v = SWIG_lua_isnilstring(L,argv[5]);
              }
              if (_v) {
                return _wrap_new_ClientEasy__SWIG_0(L);
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_ClientEasy'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::ClientEasy::ClientEasy(char const *,int,char const *,char const *,char const *,char const *)\n"
    "    Prelude::ClientEasy::ClientEasy(char const *,int,char const *,char const *,char const *)\n"
    "    Prelude::ClientEasy::ClientEasy(char const *,int,char const *,char const *)\n"
    "    Prelude::ClientEasy::ClientEasy(char const *,int,char const *)\n"
    "    Prelude::ClientEasy::ClientEasy(char const *,int)\n"
    "    Prelude::ClientEasy::ClientEasy(char const *)\n");
  lua_error(L);return 0;
}


static void swig_delete_ClientEasy(void *obj) {
Prelude::ClientEasy *arg1 = (Prelude::ClientEasy *) obj;
delete arg1;
}
static int _proxy__wrap_new_ClientEasy(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_ClientEasy);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_ClientEasy_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ClientEasy_methods[]= {
    {0,0}
};
static swig_lua_method swig_ClientEasy_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_ClientEasy_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_ClientEasy_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_ClientEasy_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_ClientEasy_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_ClientEasy_Sf_SwigStatic = {
    "ClientEasy",
    swig_ClientEasy_Sf_SwigStatic_methods,
    swig_ClientEasy_Sf_SwigStatic_attributes,
    swig_ClientEasy_Sf_SwigStatic_constants,
    swig_ClientEasy_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_ClientEasy_bases[] = {0,0};
static const char *swig_ClientEasy_base_names[] = {"Prelude::Client *",0};
static swig_lua_class _wrap_class_ClientEasy = { "ClientEasy", "ClientEasy", &SWIGTYPE_p_Prelude__ClientEasy,_proxy__wrap_new_ClientEasy, swig_delete_ClientEasy, swig_ClientEasy_methods, swig_ClientEasy_attributes, &swig_ClientEasy_Sf_SwigStatic, swig_ClientEasy_meta, swig_ClientEasy_bases, swig_ClientEasy_base_names };

static int _wrap_new_IDMEFCriterion(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriterion *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriterion::IDMEFCriterion",0,0)
  {
    try {
      result = (Prelude::IDMEFCriterion *)new Prelude::IDMEFCriterion();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriterion,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDMEFCriterion(void *obj) {
Prelude::IDMEFCriterion *arg1 = (Prelude::IDMEFCriterion *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEFCriterion(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEFCriterion);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEFCriterion_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEFCriterion_methods[]= {
    {0,0}
};
static swig_lua_method swig_IDMEFCriterion_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_IDMEFCriterion_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEFCriterion_Sf_SwigStatic_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT", Prelude::IDMEFCriterion::OPERATOR_NOT)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_EQUAL", Prelude::IDMEFCriterion::OPERATOR_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_EQUAL_NOCASE", Prelude::IDMEFCriterion::OPERATOR_EQUAL_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_EQUAL", Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_EQUAL_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_LESSER", Prelude::IDMEFCriterion::OPERATOR_LESSER)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_LESSER_OR_EQUAL", Prelude::IDMEFCriterion::OPERATOR_LESSER_OR_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_GREATER", Prelude::IDMEFCriterion::OPERATOR_GREATER)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_GREATER_OR_EQUAL", Prelude::IDMEFCriterion::OPERATOR_GREATER_OR_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_SUBSTR", Prelude::IDMEFCriterion::OPERATOR_SUBSTR)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_SUBSTR_NOCASE", Prelude::IDMEFCriterion::OPERATOR_SUBSTR_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_SUBSTR", Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_SUBSTR_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_REGEX", Prelude::IDMEFCriterion::OPERATOR_REGEX)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_REGEX_NOCASE", Prelude::IDMEFCriterion::OPERATOR_REGEX_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_REGEX", Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_REGEX_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NULL", Prelude::IDMEFCriterion::OPERATOR_NULL)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT_NULL", Prelude::IDMEFCriterion::OPERATOR_NOT_NULL)},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEFCriterion_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEFCriterion_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEFCriterion_Sf_SwigStatic = {
    "IDMEFCriterion",
    swig_IDMEFCriterion_Sf_SwigStatic_methods,
    swig_IDMEFCriterion_Sf_SwigStatic_attributes,
    swig_IDMEFCriterion_Sf_SwigStatic_constants,
    swig_IDMEFCriterion_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEFCriterion_bases[] = {0};
static const char *swig_IDMEFCriterion_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEFCriterion = { "IDMEFCriterion", "IDMEFCriterion", &SWIGTYPE_p_Prelude__IDMEFCriterion,_proxy__wrap_new_IDMEFCriterion, swig_delete_IDMEFCriterion, swig_IDMEFCriterion_methods, swig_IDMEFCriterion_attributes, &swig_IDMEFCriterion_Sf_SwigStatic, swig_IDMEFCriterion_meta, swig_IDMEFCriterion_bases, swig_IDMEFCriterion_base_names };

static int _wrap_new_IDMEFCriteria__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::IDMEFCriteria",0,0)
  {
    try {
      result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFCriteria__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = 0 ;
  Prelude::IDMEFCriteria *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::IDMEFCriteria",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::IDMEFCriteria",1,"Prelude::IDMEFCriteria const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("new_IDMEFCriteria",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  {
    try {
      result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((Prelude::IDMEFCriteria const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFCriteria__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::IDMEFCriteria *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::IDMEFCriteria",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::IDMEFCriteria",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFCriteria__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  idmef_criteria_t *arg1 = (idmef_criteria_t *) 0 ;
  Prelude::IDMEFCriteria *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::IDMEFCriteria",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::IDMEFCriteria",1,"idmef_criteria_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_criteria_t,0))){
    SWIG_fail_ptr("new_IDMEFCriteria",1,SWIGTYPE_p_idmef_criteria_t);
  }
  
  {
    try {
      result = (Prelude::IDMEFCriteria *)new Prelude::IDMEFCriteria(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFCriteria(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_IDMEFCriteria__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_Prelude__IDMEFCriteria, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFCriteria__SWIG_1(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_criteria_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFCriteria__SWIG_3(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFCriteria__SWIG_2(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IDMEFCriteria'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFCriteria::IDMEFCriteria()\n"
    "    Prelude::IDMEFCriteria::IDMEFCriteria(Prelude::IDMEFCriteria const &)\n"
    "    Prelude::IDMEFCriteria::IDMEFCriteria(char const *)\n"
    "    Prelude::IDMEFCriteria::IDMEFCriteria(idmef_criteria_t *)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFCriteria_match(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ;
  Prelude::IDMEF *arg2 = (Prelude::IDMEF *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::match",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::match",1,"Prelude::IDMEFCriteria const *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFCriteria::match",2,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_match",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFCriteria_match",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (int)((Prelude::IDMEFCriteria const *)arg1)->match(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFCriteria_clone(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ;
  Prelude::IDMEFCriteria result;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::clone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::clone",1,"Prelude::IDMEFCriteria const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_clone",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  {
    try {
      result = ((Prelude::IDMEFCriteria const *)arg1)->clone();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFCriteria * resultptr = new Prelude::IDMEFCriteria((const Prelude::IDMEFCriteria &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFCriteria,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFCriteria_andCriteria(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ;
  Prelude::IDMEFCriteria *arg2 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::andCriteria",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::andCriteria",1,"Prelude::IDMEFCriteria *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFCriteria::andCriteria",2,"Prelude::IDMEFCriteria const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_andCriteria",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_andCriteria",2,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  {
    try {
      (arg1)->andCriteria((Prelude::IDMEFCriteria const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFCriteria_orCriteria(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ;
  Prelude::IDMEFCriteria *arg2 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::orCriteria",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::orCriteria",1,"Prelude::IDMEFCriteria *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFCriteria::orCriteria",2,"Prelude::IDMEFCriteria const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_orCriteria",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_orCriteria",2,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  {
    try {
      (arg1)->orCriteria((Prelude::IDMEFCriteria const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFCriteria_toString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::toString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::toString",1,"Prelude::IDMEFCriteria const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria_toString",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  {
    try {
      result = ((Prelude::IDMEFCriteria const *)arg1)->toString();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFCriteria___tostring(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFCriteria::__str__",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFCriteria::__str__",1,"Prelude::IDMEFCriteria *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFCriteria,0))){
    SWIG_fail_ptr("IDMEFCriteria___tostring",1,SWIGTYPE_p_Prelude__IDMEFCriteria);
  }
  
  {
    try {
      result = (char *)Prelude_IDMEFCriteria___str__(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  delete [] result;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDMEFCriteria(void *obj) {
Prelude::IDMEFCriteria *arg1 = (Prelude::IDMEFCriteria *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEFCriteria(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEFCriteria);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEFCriteria_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEFCriteria_methods[]= {
    { "match", _wrap_IDMEFCriteria_match},
    { "clone", _wrap_IDMEFCriteria_clone},
    { "andCriteria", _wrap_IDMEFCriteria_andCriteria},
    { "orCriteria", _wrap_IDMEFCriteria_orCriteria},
    { "toString", _wrap_IDMEFCriteria_toString},
    { "__tostring", _wrap_IDMEFCriteria___tostring},
    {0,0}
};
static swig_lua_method swig_IDMEFCriteria_meta[] = {
    { "__tostring", _wrap_IDMEFCriteria___tostring},
    {0,0}
};

static swig_lua_attribute swig_IDMEFCriteria_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEFCriteria_Sf_SwigStatic_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_NOT", Prelude::IDMEFCriteria::OPERATOR_NOT)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_AND", Prelude::IDMEFCriteria::OPERATOR_AND)},
    {SWIG_LUA_CONSTTAB_INT("OPERATOR_OR", Prelude::IDMEFCriteria::OPERATOR_OR)},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEFCriteria_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEFCriteria_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEFCriteria_Sf_SwigStatic = {
    "IDMEFCriteria",
    swig_IDMEFCriteria_Sf_SwigStatic_methods,
    swig_IDMEFCriteria_Sf_SwigStatic_attributes,
    swig_IDMEFCriteria_Sf_SwigStatic_constants,
    swig_IDMEFCriteria_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEFCriteria_bases[] = {0};
static const char *swig_IDMEFCriteria_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEFCriteria = { "IDMEFCriteria", "IDMEFCriteria", &SWIGTYPE_p_Prelude__IDMEFCriteria,_proxy__wrap_new_IDMEFCriteria, swig_delete_IDMEFCriteria, swig_IDMEFCriteria_methods, swig_IDMEFCriteria_attributes, &swig_IDMEFCriteria_Sf_SwigStatic, swig_IDMEFCriteria_meta, swig_IDMEFCriteria_bases, swig_IDMEFCriteria_base_names };

static int _wrap_IDMEFValue_getType(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  Prelude::IDMEFValue::IDMEFValueTypeEnum result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::getType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::getType",1,"Prelude::IDMEFValue const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue_getType",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue::IDMEFValueTypeEnum)((Prelude::IDMEFValue const *)arg1)->getType();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFValue_isNull(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::isNull",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::isNull",1,"Prelude::IDMEFValue const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue_isNull",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFValue const *)arg1)->isNull();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_new_IDMEFValue__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",0,0)
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< Prelude::IDMEF > *arg1 = 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"std::vector< Prelude::IDMEF > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t,0))){
    SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((std::vector< Prelude::IDMEF > const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"Prelude::IDMEFValue const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((Prelude::IDMEFValue const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  std::vector< Prelude::IDMEFValue > *arg1 = 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"std::vector< Prelude::IDMEFValue > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){
    SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((std::vector< Prelude::IDMEFValue > const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  idmef_value_t *arg1 = (idmef_value_t *) 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"idmef_value_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_value_t,0))){
    SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_idmef_value_t);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_6(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = 0 ;
  Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ;
  std::string temp1 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"std::string const &");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",2,"Prelude::IDMEFPath *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("new_IDMEFValue",2,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((std::string const &)*arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_7(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = 0 ;
  std::string temp1 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"std::string const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((std::string const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_8(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",2,2)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"char const *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",2,"Prelude::IDMEFPath *");
  arg1 = (char *)lua_tostring(L, 1);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("new_IDMEFValue",2,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue((char const *)arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_9(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"double");
  arg1 = (double)lua_tonumber(L, 1);
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue__SWIG_10(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = 0 ;
  Prelude::IDMEFValue *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFValue::IDMEFValue",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::IDMEFValue",1,"Prelude::IDMEFTime &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("new_IDMEFValue",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue *)new Prelude::IDMEFValue(*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFValue,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFValue(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_IDMEFValue__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_1(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_Prelude__IDMEF_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_3(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_Prelude__IDMEFValue_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_4(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_value_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_5(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_10(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_9(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFValue__SWIG_7(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_new_IDMEFValue__SWIG_6(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_new_IDMEFValue__SWIG_8(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IDMEFValue'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFValue::IDMEFValue()\n"
    "    Prelude::IDMEFValue::IDMEFValue(Prelude::IDMEF *)\n"
    "    Prelude::IDMEFValue::IDMEFValue(std::vector< Prelude::IDMEF > const &)\n"
    "    Prelude::IDMEFValue::IDMEFValue(Prelude::IDMEFValue const &)\n"
    "    Prelude::IDMEFValue::IDMEFValue(std::vector< Prelude::IDMEFValue > const &)\n"
    "    Prelude::IDMEFValue::IDMEFValue(idmef_value_t *)\n"
    "    Prelude::IDMEFValue::IDMEFValue(std::string const &,Prelude::IDMEFPath *)\n"
    "    Prelude::IDMEFValue::IDMEFValue(std::string const &)\n"
    "    Prelude::IDMEFValue::IDMEFValue(char const *,Prelude::IDMEFPath *)\n"
    "    Prelude::IDMEFValue::IDMEFValue(double)\n"
    "    Prelude::IDMEFValue::IDMEFValue(Prelude::IDMEFTime &)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFValue_match(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  Prelude::IDMEFValue *arg2 = 0 ;
  int arg3 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::match",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::match",1,"Prelude::IDMEFValue const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::match",2,"Prelude::IDMEFValue const &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFValue::match",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue_match",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue_match",2,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  {
    try {
      result = (int)((Prelude::IDMEFValue const *)arg1)->match((Prelude::IDMEFValue const &)*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFValue_clone(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  Prelude::IDMEFValue result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::clone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::clone",1,"Prelude::IDMEFValue const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue_clone",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = ((Prelude::IDMEFValue const *)arg1)->clone();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int ret, unused;
    
    if ( (&result)->isNull() ) {
      lua_pushnil(L);
      SWIG_arg = 1;
    } else {
      SWIG_arg = IDMEFValue_to_SWIG(&unused, result, L, &unused);
      if ( SWIG_arg < 0 ) {
        std::stringstream s;
        s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((idmef_value_type_id_t) (&result)->getType()) << "'";
        SWIG_exception(SWIG_ValueError, s.str().c_str());
      }
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFValue_toString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::toString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::toString",1,"Prelude::IDMEFValue const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue_toString",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = ((Prelude::IDMEFValue const *)arg1)->toString();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFValue___eq__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  std::vector< Prelude::IDMEFValue > *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::operator ==",1,"Prelude::IDMEFValue const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::operator ==",2,"std::vector< Prelude::IDMEFValue > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___eq",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){
    SWIG_fail_ptr("IDMEFValue___eq",2,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFValue const *)arg1)->operator ==((std::vector< Prelude::IDMEFValue > const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFValue___le(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  Prelude::IDMEFValue *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::operator <=",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::operator <=",1,"Prelude::IDMEFValue const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::operator <=",2,"Prelude::IDMEFValue const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___le",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___le",2,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFValue const *)arg1)->operator <=((Prelude::IDMEFValue const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFValue___lt(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  Prelude::IDMEFValue *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::operator <",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::operator <",1,"Prelude::IDMEFValue const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::operator <",2,"Prelude::IDMEFValue const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___lt",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___lt",2,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFValue const *)arg1)->operator <((Prelude::IDMEFValue const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFValue___eq__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) 0 ;
  Prelude::IDMEFValue *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFValue::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFValue::operator ==",1,"Prelude::IDMEFValue const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFValue::operator ==",2,"Prelude::IDMEFValue const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___eq",1,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFValue___eq",2,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFValue const *)arg1)->operator ==((Prelude::IDMEFValue const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFValue___eq(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_Prelude__IDMEFValue, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IDMEFValue___eq__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_Prelude__IDMEFValue, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IDMEFValue___eq__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFValue___eq'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFValue::operator ==(std::vector< Prelude::IDMEFValue > const &) const\n"
    "    Prelude::IDMEFValue::operator ==(Prelude::IDMEFValue const &) const\n");
  lua_error(L);return 0;
}


static void swig_delete_IDMEFValue(void *obj) {
Prelude::IDMEFValue *arg1 = (Prelude::IDMEFValue *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEFValue(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEFValue);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEFValue_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEFValue_methods[]= {
    { "getType", _wrap_IDMEFValue_getType},
    { "isNull", _wrap_IDMEFValue_isNull},
    { "match", _wrap_IDMEFValue_match},
    { "clone", _wrap_IDMEFValue_clone},
    { "toString", _wrap_IDMEFValue_toString},
    { "__le", _wrap_IDMEFValue___le},
    { "__lt", _wrap_IDMEFValue___lt},
    { "__eq", _wrap_IDMEFValue___eq},
    {0,0}
};
static swig_lua_method swig_IDMEFValue_meta[] = {
    { "__le", _wrap_IDMEFValue___le},
    { "__lt", _wrap_IDMEFValue___lt},
    { "__eq", _wrap_IDMEFValue___eq},
    {0,0}
};

static swig_lua_attribute swig_IDMEFValue_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEFValue_Sf_SwigStatic_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("TYPE_UNKNOWN", Prelude::IDMEFValue::TYPE_UNKNOWN)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_INT8", Prelude::IDMEFValue::TYPE_INT8)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_UINT8", Prelude::IDMEFValue::TYPE_UINT8)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_INT16", Prelude::IDMEFValue::TYPE_INT16)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_UINT16", Prelude::IDMEFValue::TYPE_UINT16)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_INT32", Prelude::IDMEFValue::TYPE_INT32)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_UINT32", Prelude::IDMEFValue::TYPE_UINT32)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_INT64", Prelude::IDMEFValue::TYPE_INT64)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_UINT64", Prelude::IDMEFValue::TYPE_UINT64)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_FLOAT", Prelude::IDMEFValue::TYPE_FLOAT)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_DOUBLE", Prelude::IDMEFValue::TYPE_DOUBLE)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_STRING", Prelude::IDMEFValue::TYPE_STRING)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_TIME", Prelude::IDMEFValue::TYPE_TIME)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_DATA", Prelude::IDMEFValue::TYPE_DATA)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_ENUM", Prelude::IDMEFValue::TYPE_ENUM)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_LIST", Prelude::IDMEFValue::TYPE_LIST)},
    {SWIG_LUA_CONSTTAB_INT("TYPE_CLASS", Prelude::IDMEFValue::TYPE_CLASS)},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEFValue_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEFValue_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEFValue_Sf_SwigStatic = {
    "IDMEFValue",
    swig_IDMEFValue_Sf_SwigStatic_methods,
    swig_IDMEFValue_Sf_SwigStatic_attributes,
    swig_IDMEFValue_Sf_SwigStatic_constants,
    swig_IDMEFValue_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEFValue_bases[] = {0};
static const char *swig_IDMEFValue_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEFValue = { "IDMEFValue", "IDMEFValue", &SWIGTYPE_p_Prelude__IDMEFValue,_proxy__wrap_new_IDMEFValue, swig_delete_IDMEFValue, swig_IDMEFValue_methods, swig_IDMEFValue_attributes, &swig_IDMEFValue_Sf_SwigStatic, swig_IDMEFValue_meta, swig_IDMEFValue_bases, swig_IDMEFValue_base_names };

static int _wrap_new_IDMEFPath__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::IDMEFPath *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::IDMEFPath",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::IDMEFPath",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFPath__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = 0 ;
  char *arg2 = (char *) 0 ;
  Prelude::IDMEFPath *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::IDMEFPath",2,2)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::IDMEFPath",1,"Prelude::IDMEF &");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::IDMEFPath",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("new_IDMEFPath",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath(*arg1,(char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFPath__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  idmef_path_t *arg1 = (idmef_path_t *) 0 ;
  Prelude::IDMEFPath *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::IDMEFPath",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::IDMEFPath",1,"idmef_path_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_path_t,0))){
    SWIG_fail_ptr("new_IDMEFPath",1,SWIGTYPE_p_idmef_path_t);
  }
  
  {
    try {
      result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFPath__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = 0 ;
  Prelude::IDMEFPath *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::IDMEFPath",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::IDMEFPath",1,"Prelude::IDMEFPath const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("new_IDMEFPath",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (Prelude::IDMEFPath *)new Prelude::IDMEFPath((Prelude::IDMEFPath const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFPath(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_idmef_path_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFPath__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFPath__SWIG_3(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFPath__SWIG_0(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_IDMEFPath__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IDMEFPath'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::IDMEFPath(char const *)\n"
    "    Prelude::IDMEFPath::IDMEFPath(Prelude::IDMEF &,char const *)\n"
    "    Prelude::IDMEFPath::IDMEFPath(idmef_path_t *)\n"
    "    Prelude::IDMEFPath::IDMEFPath(Prelude::IDMEFPath const &)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_set__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  std::vector< Prelude::IDMEF > *arg3 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"std::vector< Prelude::IDMEF > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t,0))){
    SWIG_fail_ptr("IDMEFPath_set",3,SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t);
  }
  
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,(std::vector< Prelude::IDMEF > const &)*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  Prelude::IDMEF *arg3 = (Prelude::IDMEF *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",3,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  std::vector< Prelude::IDMEFValue > *arg3 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"std::vector< Prelude::IDMEFValue > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){
    SWIG_fail_ptr("IDMEFPath_set",3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t);
  }
  
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,(std::vector< Prelude::IDMEFValue > const &)*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"Prelude::IDMEFValue *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEFPath_set",3,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  Prelude::IDMEFTime *arg3 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"Prelude::IDMEFTime &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFPath_set",3,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"std::string const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  temp3.assign(lua_tostring(L,3),lua_rawlen(L,3)); arg3=&temp3;
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,(std::string const &)*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_6(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  int32_t arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"int32_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg3 = (int32_t)lua_tonumber(L, 3);
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_7(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  int64_t arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"int64_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg3 = (int64_t)lua_tonumber(L, 3);
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_8(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  uint64_t arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"uint64_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg3 = (uint64_t)lua_tonumber(L, 3);
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_9(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg3 = (float)lua_tonumber(L, 3);
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set__SWIG_10(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  double arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::set",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::set",2,"Prelude::IDMEF &");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::set",3,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_set",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_set",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg3 = (double)lua_tonumber(L, 3);
  {
    try {
      ((Prelude::IDMEFPath const *)arg1)->set(*arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_set(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 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_std__vectorT_Prelude__IDMEF_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEFPath_set__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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 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_std__vectorT_Prelude__IDMEFValue_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEFPath_set__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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 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_Prelude__IDMEFTime, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_4(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_6(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_7(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_8(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_9(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_10(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_set__SWIG_5(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_set'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,std::vector< Prelude::IDMEF > const &) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,Prelude::IDMEF *) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,std::vector< Prelude::IDMEFValue > const &) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,Prelude::IDMEFValue *) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,Prelude::IDMEFTime &) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,std::string const &) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,int32_t) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,int64_t) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,uint64_t) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,float) const\n"
    "    Prelude::IDMEFPath::set(Prelude::IDMEF &,double) const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_getClass__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int arg2 ;
  Prelude::IDMEFClass result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getClass",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getClass",1,"Prelude::IDMEFPath const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::getClass",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getClass",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = ((Prelude::IDMEFPath const *)arg1)->getClass(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFClass * resultptr = new Prelude::IDMEFClass((const Prelude::IDMEFClass &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_getClass__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEFClass result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getClass",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getClass",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getClass",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = ((Prelude::IDMEFPath const *)arg1)->getClass();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFClass * resultptr = new Prelude::IDMEFClass((const Prelude::IDMEFClass &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_getClass(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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFPath_getClass__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_getClass__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_getClass'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::getClass(int) const\n"
    "    Prelude::IDMEFPath::getClass() const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_getValueType__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int arg2 ;
  Prelude::IDMEFValue::IDMEFValueTypeEnum result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getValueType",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getValueType",1,"Prelude::IDMEFPath const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::getValueType",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getValueType",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (Prelude::IDMEFValue::IDMEFValueTypeEnum)((Prelude::IDMEFPath const *)arg1)->getValueType(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_getValueType__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEFValue::IDMEFValueTypeEnum result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getValueType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getValueType",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getValueType",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue::IDMEFValueTypeEnum)((Prelude::IDMEFPath const *)arg1)->getValueType();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_getValueType(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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFPath_getValueType__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_getValueType__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_getValueType'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::getValueType(int) const\n"
    "    Prelude::IDMEFPath::getValueType() const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_setIndex__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  unsigned int arg2 ;
  int arg3 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::setIndex",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::setIndex",1,"Prelude::IDMEFPath *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::setIndex",2,"unsigned int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::setIndex",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_setIndex",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  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 {
      result = (int)(arg1)->setIndex(arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_setIndex__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  unsigned int arg2 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::setIndex",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::setIndex",1,"Prelude::IDMEFPath *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::setIndex",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_setIndex",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  {
    try {
      result = (int)(arg1)->setIndex(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_setIndex(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_setIndex__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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_setIndex__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_setIndex'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::setIndex(unsigned int,int)\n"
    "    Prelude::IDMEFPath::setIndex(unsigned int)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_undefineIndex__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int arg2 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::undefineIndex",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::undefineIndex",1,"Prelude::IDMEFPath *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::undefineIndex",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_undefineIndex",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (int)(arg1)->undefineIndex(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_undefineIndex__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::undefineIndex",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::undefineIndex",1,"Prelude::IDMEFPath *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_undefineIndex",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (int)(arg1)->undefineIndex();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_undefineIndex(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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFPath_undefineIndex__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_undefineIndex__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_undefineIndex'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::undefineIndex(int)\n"
    "    Prelude::IDMEFPath::undefineIndex()\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_getIndex__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int arg2 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getIndex",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getIndex",1,"Prelude::IDMEFPath const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::getIndex",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getIndex",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (int)((Prelude::IDMEFPath const *)arg1)->getIndex(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_getIndex__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getIndex",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getIndex",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getIndex",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (int)((Prelude::IDMEFPath const *)arg1)->getIndex();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_getIndex(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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFPath_getIndex__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_getIndex__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_getIndex'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::getIndex(int) const\n"
    "    Prelude::IDMEFPath::getIndex() const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_makeChild(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  char *arg2 = (char *) 0 ;
  unsigned int arg3 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::makeChild",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::makeChild",1,"Prelude::IDMEFPath *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::makeChild",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::makeChild",3,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_makeChild",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative")
  arg3 = (unsigned int)lua_tonumber(L, 3);
  {
    try {
      result = (int)(arg1)->makeChild((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_makeParent(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::makeParent",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::makeParent",1,"Prelude::IDMEFPath *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_makeParent",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (int)(arg1)->makeParent();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_compare__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ;
  int arg3 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::compare",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::compare",1,"Prelude::IDMEFPath const *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::compare",2,"Prelude::IDMEFPath *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFPath::compare",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_compare",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_compare",2,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  {
    try {
      result = (int)((Prelude::IDMEFPath const *)arg1)->compare(arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_compare__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEFPath *arg2 = (Prelude::IDMEFPath *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::compare",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::compare",1,"Prelude::IDMEFPath const *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::compare",2,"Prelude::IDMEFPath *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_compare",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_compare",2,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (int)((Prelude::IDMEFPath const *)arg1)->compare(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_compare(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  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_Prelude__IDMEFPath, 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_Prelude__IDMEFPath, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IDMEFPath_compare__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_Prelude__IDMEFPath, 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_Prelude__IDMEFPath, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFPath_compare__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_compare'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::compare(Prelude::IDMEFPath *,int) const\n"
    "    Prelude::IDMEFPath::compare(Prelude::IDMEFPath *) const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_clone(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  SwigValueWrapper< Prelude::IDMEFPath > result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::clone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::clone",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_clone",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = ((Prelude::IDMEFPath const *)arg1)->clone();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFPath * resultptr = new Prelude::IDMEFPath((const Prelude::IDMEFPath &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFPath,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_checkOperator(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  idmef_criterion_operator_t arg2 ;
  idmef_criterion_operator_t *argp2 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::checkOperator",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::checkOperator",1,"Prelude::IDMEFPath const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::checkOperator",2,"idmef_criterion_operator_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_checkOperator",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_idmef_criterion_operator_t,0))){
    SWIG_fail_ptr("IDMEFPath_checkOperator",2,SWIGTYPE_p_idmef_criterion_operator_t);
  }
  arg2 = *argp2;
  
  {
    try {
      result = (int)((Prelude::IDMEFPath const *)arg1)->checkOperator(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_getApplicableOperators(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  idmef_criterion_operator_t result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getApplicableOperators",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getApplicableOperators",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getApplicableOperators",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = ((Prelude::IDMEFPath const *)arg1)->getApplicableOperators();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    idmef_criterion_operator_t * resultptr = new idmef_criterion_operator_t((const idmef_criterion_operator_t &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_idmef_criterion_operator_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFPath_getName__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getName",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getName",1,"Prelude::IDMEFPath const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::getName",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getName",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (char *)((Prelude::IDMEFPath const *)arg1)->getName(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_getName__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getName",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getName",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (char *)((Prelude::IDMEFPath const *)arg1)->getName();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_getName(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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFPath_getName__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_getName__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_getName'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::getName(int) const\n"
    "    Prelude::IDMEFPath::getName() const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_isAmbiguous(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::isAmbiguous",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::isAmbiguous",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_isAmbiguous",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFPath const *)arg1)->isAmbiguous();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_hasLists(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::hasLists",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::hasLists",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_hasLists",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (int)((Prelude::IDMEFPath const *)arg1)->hasLists();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_isList__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  int arg2 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::isList",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::isList",1,"Prelude::IDMEFPath const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::isList",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_isList",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (bool)((Prelude::IDMEFPath const *)arg1)->isList(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_isList__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::isList",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::isList",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_isList",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFPath const *)arg1)->isList();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_isList(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_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFPath_isList__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFPath_isList__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFPath_isList'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFPath::isList(int) const\n"
    "    Prelude::IDMEFPath::isList() const\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFPath_getDepth(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::getDepth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::getDepth",1,"Prelude::IDMEFPath const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_getDepth",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (unsigned int)((Prelude::IDMEFPath const *)arg1)->getDepth();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFPath_get(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) 0 ;
  Prelude::IDMEF *arg2 = 0 ;
  Prelude::IDMEFValue result;
  
  SWIG_check_num_args("Prelude::IDMEFPath::get",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFPath::get",1,"Prelude::IDMEFPath *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFPath::get",2,"Prelude::IDMEF &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("IDMEFPath_get",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEFPath_get",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = Prelude_IDMEFPath_get(arg1,*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int ret, unused;
    
    if ( (&result)->isNull() ) {
      lua_pushnil(L);
      SWIG_arg = 1;
    } else {
      SWIG_arg = IDMEFValue_to_SWIG(&unused, result, L, &unused);
      if ( SWIG_arg < 0 ) {
        std::stringstream s;
        s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((idmef_value_type_id_t) (&result)->getType()) << "'";
        SWIG_exception(SWIG_ValueError, s.str().c_str());
      }
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDMEFPath(void *obj) {
Prelude::IDMEFPath *arg1 = (Prelude::IDMEFPath *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEFPath(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEFPath);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEFPath_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEFPath_methods[]= {
    { "set", _wrap_IDMEFPath_set},
    { "getClass", _wrap_IDMEFPath_getClass},
    { "getValueType", _wrap_IDMEFPath_getValueType},
    { "setIndex", _wrap_IDMEFPath_setIndex},
    { "undefineIndex", _wrap_IDMEFPath_undefineIndex},
    { "getIndex", _wrap_IDMEFPath_getIndex},
    { "makeChild", _wrap_IDMEFPath_makeChild},
    { "makeParent", _wrap_IDMEFPath_makeParent},
    { "compare", _wrap_IDMEFPath_compare},
    { "clone", _wrap_IDMEFPath_clone},
    { "checkOperator", _wrap_IDMEFPath_checkOperator},
    { "getApplicableOperators", _wrap_IDMEFPath_getApplicableOperators},
    { "getName", _wrap_IDMEFPath_getName},
    { "isAmbiguous", _wrap_IDMEFPath_isAmbiguous},
    { "hasLists", _wrap_IDMEFPath_hasLists},
    { "isList", _wrap_IDMEFPath_isList},
    { "getDepth", _wrap_IDMEFPath_getDepth},
    { "get", _wrap_IDMEFPath_get},
    {0,0}
};
static swig_lua_method swig_IDMEFPath_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_IDMEFPath_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEFPath_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEFPath_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEFPath_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEFPath_Sf_SwigStatic = {
    "IDMEFPath",
    swig_IDMEFPath_Sf_SwigStatic_methods,
    swig_IDMEFPath_Sf_SwigStatic_attributes,
    swig_IDMEFPath_Sf_SwigStatic_constants,
    swig_IDMEFPath_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEFPath_bases[] = {0};
static const char *swig_IDMEFPath_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEFPath = { "IDMEFPath", "IDMEFPath", &SWIGTYPE_p_Prelude__IDMEFPath,_proxy__wrap_new_IDMEFPath, swig_delete_IDMEFPath, swig_IDMEFPath_methods, swig_IDMEFPath_attributes, &swig_IDMEFPath_Sf_SwigStatic, swig_IDMEFPath_meta, swig_IDMEFPath_bases, swig_IDMEFPath_base_names };

static int _wrap_new_IDMEFTime__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::IDMEFTime",0,0)
  {
    try {
      result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFTime__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  idmef_time_t *arg1 = (idmef_time_t *) 0 ;
  Prelude::IDMEFTime *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::IDMEFTime",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::IDMEFTime",1,"idmef_time_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_time_t,0))){
    SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_idmef_time_t);
  }
  
  {
    try {
      result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFTime__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  time_t arg1 ;
  Prelude::IDMEFTime *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::IDMEFTime",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::IDMEFTime",1,"time_t const");
  arg1 = (time_t const)lua_tonumber(L, 1);
  {
    try {
      result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFTime__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::IDMEFTime *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::IDMEFTime",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::IDMEFTime",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFTime__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  timeval *arg1 = (timeval *) 0 ;
  Prelude::IDMEFTime *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::IDMEFTime",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::IDMEFTime",1,"timeval const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_timeval,0))){
    SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_timeval);
  }
  
  {
    try {
      result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((timeval const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFTime__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = 0 ;
  Prelude::IDMEFTime *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::IDMEFTime",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::IDMEFTime",1,"Prelude::IDMEFTime const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("new_IDMEFTime",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (Prelude::IDMEFTime *)new Prelude::IDMEFTime((Prelude::IDMEFTime const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFTime(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_IDMEFTime__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_time_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFTime__SWIG_1(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_timeval, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFTime__SWIG_4(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFTime__SWIG_5(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFTime__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFTime__SWIG_3(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IDMEFTime'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFTime::IDMEFTime()\n"
    "    Prelude::IDMEFTime::IDMEFTime(idmef_time_t *)\n"
    "    Prelude::IDMEFTime::IDMEFTime(time_t const)\n"
    "    Prelude::IDMEFTime::IDMEFTime(char const *)\n"
    "    Prelude::IDMEFTime::IDMEFTime(timeval const *)\n"
    "    Prelude::IDMEFTime::IDMEFTime(Prelude::IDMEFTime const &)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFTime_set__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::set",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::set",1,"Prelude::IDMEFTime *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_set",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      (arg1)->set();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_set__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  time_t *arg2 = (time_t *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::set",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::set",1,"Prelude::IDMEFTime *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::set",2,"time_t const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_set",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_long_long,0))){
    SWIG_fail_ptr("IDMEFTime_set",2,SWIGTYPE_p_long_long);
  }
  
  {
    try {
      (arg1)->set((time_t const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_set__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::set",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::set",1,"Prelude::IDMEFTime *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::set",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_set",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      (arg1)->set((char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_set__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  timeval *arg2 = (timeval *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::set",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::set",1,"Prelude::IDMEFTime *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::set",2,"timeval const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_set",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_timeval,0))){
    SWIG_fail_ptr("IDMEFTime_set",2,SWIGTYPE_p_timeval);
  }
  
  {
    try {
      (arg1)->set((timeval const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_set(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_Prelude__IDMEFTime, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFTime_set__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_Prelude__IDMEFTime, 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_long_long, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IDMEFTime_set__SWIG_1(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 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_timeval, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_IDMEFTime_set__SWIG_3(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFTime_set__SWIG_2(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFTime_set'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFTime::set()\n"
    "    Prelude::IDMEFTime::set(time_t const *)\n"
    "    Prelude::IDMEFTime::set(char const *)\n"
    "    Prelude::IDMEFTime::set(timeval const *)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFTime_setSec(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  uint32_t arg2 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::setSec",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::setSec",1,"Prelude::IDMEFTime *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::setSec",2,"uint32_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_setSec",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (uint32_t)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setSec(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_setUSec(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  uint32_t arg2 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::setUSec",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::setUSec",1,"Prelude::IDMEFTime *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::setUSec",2,"uint32_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_setUSec",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (uint32_t)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setUSec(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_setGmtOffset(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  int32_t arg2 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::setGmtOffset",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::setGmtOffset",1,"Prelude::IDMEFTime *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::setGmtOffset",2,"int32_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_setGmtOffset",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  arg2 = (int32_t)lua_tonumber(L, 2);
  {
    try {
      (arg1)->setGmtOffset(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_getSec(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  uint32_t result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::getSec",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::getSec",1,"Prelude::IDMEFTime const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_getSec",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->getSec();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime_getUSec(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  uint32_t result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::getUSec",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::getUSec",1,"Prelude::IDMEFTime const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_getUSec",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (uint32_t)((Prelude::IDMEFTime const *)arg1)->getUSec();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime_getGmtOffset(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  int32_t result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::getGmtOffset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::getGmtOffset",1,"Prelude::IDMEFTime const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_getGmtOffset",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (int32_t)((Prelude::IDMEFTime const *)arg1)->getGmtOffset();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime_getTime(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  double result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::getTime",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::getTime",1,"Prelude::IDMEFTime const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_getTime",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (double)((Prelude::IDMEFTime const *)arg1)->getTime();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime_clone(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  Prelude::IDMEFTime result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::clone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::clone",1,"Prelude::IDMEFTime const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_clone",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = ((Prelude::IDMEFTime const *)arg1)->clone();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFTime * resultptr = new Prelude::IDMEFTime((const Prelude::IDMEFTime &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFTime,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFTime_toString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::toString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::toString",1,"Prelude::IDMEFTime const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime_toString",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = ((Prelude::IDMEFTime const *)arg1)->toString();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime___le(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  Prelude::IDMEFTime *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::operator <=",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::operator <=",1,"Prelude::IDMEFTime const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::operator <=",2,"Prelude::IDMEFTime const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___le",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___le",2,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFTime const *)arg1)->operator <=((Prelude::IDMEFTime const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime___eq(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  Prelude::IDMEFTime *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::operator ==",1,"Prelude::IDMEFTime const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::operator ==",2,"Prelude::IDMEFTime const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___eq",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___eq",2,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFTime const *)arg1)->operator ==((Prelude::IDMEFTime const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime___lt(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  Prelude::IDMEFTime *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFTime::operator <",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::operator <",1,"Prelude::IDMEFTime const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Prelude::IDMEFTime::operator <",2,"Prelude::IDMEFTime const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___lt",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___lt",2,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (bool)((Prelude::IDMEFTime const *)arg1)->operator <((Prelude::IDMEFTime const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFTime___tostring(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFTime::__str__",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFTime::__str__",1,"Prelude::IDMEFTime *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEFTime___tostring",1,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      result = (char *)Prelude_IDMEFTime___str__(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  delete [] result;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDMEFTime(void *obj) {
Prelude::IDMEFTime *arg1 = (Prelude::IDMEFTime *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEFTime(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEFTime);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEFTime_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEFTime_methods[]= {
    { "set", _wrap_IDMEFTime_set},
    { "setSec", _wrap_IDMEFTime_setSec},
    { "setUSec", _wrap_IDMEFTime_setUSec},
    { "setGmtOffset", _wrap_IDMEFTime_setGmtOffset},
    { "getSec", _wrap_IDMEFTime_getSec},
    { "getUSec", _wrap_IDMEFTime_getUSec},
    { "getGmtOffset", _wrap_IDMEFTime_getGmtOffset},
    { "getTime", _wrap_IDMEFTime_getTime},
    { "clone", _wrap_IDMEFTime_clone},
    { "toString", _wrap_IDMEFTime_toString},
    { "__le", _wrap_IDMEFTime___le},
    { "__eq", _wrap_IDMEFTime___eq},
    { "__lt", _wrap_IDMEFTime___lt},
    { "__tostring", _wrap_IDMEFTime___tostring},
    {0,0}
};
static swig_lua_method swig_IDMEFTime_meta[] = {
    { "__le", _wrap_IDMEFTime___le},
    { "__eq", _wrap_IDMEFTime___eq},
    { "__lt", _wrap_IDMEFTime___lt},
    { "__tostring", _wrap_IDMEFTime___tostring},
    {0,0}
};

static swig_lua_attribute swig_IDMEFTime_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEFTime_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEFTime_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEFTime_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEFTime_Sf_SwigStatic = {
    "IDMEFTime",
    swig_IDMEFTime_Sf_SwigStatic_methods,
    swig_IDMEFTime_Sf_SwigStatic_attributes,
    swig_IDMEFTime_Sf_SwigStatic_constants,
    swig_IDMEFTime_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEFTime_bases[] = {0};
static const char *swig_IDMEFTime_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEFTime = { "IDMEFTime", "IDMEFTime", &SWIGTYPE_p_Prelude__IDMEFTime,_proxy__wrap_new_IDMEFTime, swig_delete_IDMEFTime, swig_IDMEFTime_methods, swig_IDMEFTime_attributes, &swig_IDMEFTime_Sf_SwigStatic, swig_IDMEFTime_meta, swig_IDMEFTime_bases, swig_IDMEFTime_base_names };

static int _wrap_new_IDMEFClass__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  idmef_class_id_t arg1 ;
  Prelude::IDMEFClass *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFClass::IDMEFClass",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::IDMEFClass",1,"idmef_class_id_t");
  arg1 = (idmef_class_id_t)lua_tonumber(L, 1);
  {
    try {
      result = (Prelude::IDMEFClass *)new Prelude::IDMEFClass(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFClass__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFClass::IDMEFClass",0,0)
  {
    try {
      result = (Prelude::IDMEFClass *)new Prelude::IDMEFClass();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFClass__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFPath *arg1 = 0 ;
  Prelude::IDMEFClass *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFClass::IDMEFClass",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::IDMEFClass",1,"Prelude::IDMEFPath const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFPath,0))){
    SWIG_fail_ptr("new_IDMEFClass",1,SWIGTYPE_p_Prelude__IDMEFPath);
  }
  
  {
    try {
      result = (Prelude::IDMEFClass *)new Prelude::IDMEFClass((Prelude::IDMEFPath const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFClass__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = 0 ;
  std::string temp1 ;
  Prelude::IDMEFClass *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEFClass::IDMEFClass",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::IDMEFClass",1,"std::string const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    try {
      result = (Prelude::IDMEFClass *)new Prelude::IDMEFClass((std::string const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEFClass(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_IDMEFClass__SWIG_1(L);
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFPath, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEFClass__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFClass__SWIG_0(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEFClass__SWIG_3(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IDMEFClass'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFClass::IDMEFClass(idmef_class_id_t)\n"
    "    Prelude::IDMEFClass::IDMEFClass()\n"
    "    Prelude::IDMEFClass::IDMEFClass(Prelude::IDMEFPath const &)\n"
    "    Prelude::IDMEFClass::IDMEFClass(std::string const &)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFClass_getDepth(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  size_t result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getDepth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getDepth",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getDepth",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->getDepth();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_get__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  int arg2 ;
  Prelude::IDMEFClass result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::get",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::get",1,"Prelude::IDMEFClass *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFClass::get",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_get",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (arg1)->get(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFClass * resultptr = new Prelude::IDMEFClass((const Prelude::IDMEFClass &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFClass_get__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  Prelude::IDMEFClass result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::get",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::get",1,"Prelude::IDMEFClass *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Prelude::IDMEFClass::get",2,"std::string const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_get",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2;
  {
    try {
      result = (arg1)->get((std::string const &)*arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEFClass * resultptr = new Prelude::IDMEFClass((const Prelude::IDMEFClass &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEFClass,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFClass_get(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_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFClass_get__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_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFClass_get__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFClass_get'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFClass::get(int)\n"
    "    Prelude::IDMEFClass::get(std::string const &)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFClass_getChildCount(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  size_t result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getChildCount",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getChildCount",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getChildCount",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->getChildCount();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_isList(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::isList",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::isList",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_isList",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (bool)(arg1)->isList();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_isKeyedList(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  bool result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::isKeyedList",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::isKeyedList",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_isKeyedList",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (bool)(arg1)->isKeyedList();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getName(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getName",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getName",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->getName();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_toString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::toString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::toString",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_toString",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->toString();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getValueType(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  Prelude::IDMEFValue::IDMEFValueTypeEnum result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getValueType",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getValueType",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getValueType",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (Prelude::IDMEFValue::IDMEFValueTypeEnum)(arg1)->getValueType();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFClass_getAttributes(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  std::map< std::string,std::string > result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getAttributes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getAttributes",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getAttributes",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->getAttributes();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    std::map< std::string,std::string > * resultptr = new std::map< std::string,std::string >((const std::map< std::string,std::string > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__mapT_std__string_std__string_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEFClass_getPath__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  int arg2 ;
  int arg3 ;
  std::string *arg4 = 0 ;
  std::string *arg5 = 0 ;
  std::string temp4 ;
  std::string temp5 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getPath",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",1,"Prelude::IDMEFClass *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",3,"int");
  if(!lua_isstring(L,4)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",4,"std::string const &");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",5,"std::string const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getPath",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  temp4.assign(lua_tostring(L,4),lua_rawlen(L,4)); arg4=&temp4;
  temp5.assign(lua_tostring(L,5),lua_rawlen(L,5)); arg5=&temp5;
  {
    try {
      result = (arg1)->getPath(arg2,arg3,(std::string const &)*arg4,(std::string const &)*arg5);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getPath__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  int arg2 ;
  int arg3 ;
  std::string *arg4 = 0 ;
  std::string temp4 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getPath",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",1,"Prelude::IDMEFClass *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",3,"int");
  if(!lua_isstring(L,4)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",4,"std::string const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getPath",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  temp4.assign(lua_tostring(L,4),lua_rawlen(L,4)); arg4=&temp4;
  {
    try {
      result = (arg1)->getPath(arg2,arg3,(std::string const &)*arg4);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getPath__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  int arg2 ;
  int arg3 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getPath",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",1,"Prelude::IDMEFClass *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getPath",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  {
    try {
      result = (arg1)->getPath(arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getPath__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  int arg2 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getPath",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",1,"Prelude::IDMEFClass *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getPath",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  {
    try {
      result = (arg1)->getPath(arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getPath__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getPath",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getPath",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getPath",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->getPath();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEFClass_getPath(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  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_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_IDMEFClass_getPath__SWIG_4(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_IDMEFClass_getPath__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_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEFClass_getPath__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_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isstring(L,argv[3]);
          }
          if (_v) {
            return _wrap_IDMEFClass_getPath__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_Prelude__IDMEFClass, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isstring(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_IDMEFClass_getPath__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEFClass_getPath'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEFClass::getPath(int,int,std::string const &,std::string const &)\n"
    "    Prelude::IDMEFClass::getPath(int,int,std::string const &)\n"
    "    Prelude::IDMEFClass::getPath(int,int)\n"
    "    Prelude::IDMEFClass::getPath(int)\n"
    "    Prelude::IDMEFClass::getPath()\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEFClass_getEnumValues(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  std::vector< std::string > result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getEnumValues",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getEnumValues",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getEnumValues",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (arg1)->getEnumValues();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    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 int _wrap_IDMEFClass_getApplicableOperator(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) 0 ;
  Prelude::IDMEFCriterion::IDMEFCriterionOperatorEnum result;
  
  SWIG_check_num_args("Prelude::IDMEFClass::getApplicableOperator",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEFClass::getApplicableOperator",1,"Prelude::IDMEFClass *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEFClass,0))){
    SWIG_fail_ptr("IDMEFClass_getApplicableOperator",1,SWIGTYPE_p_Prelude__IDMEFClass);
  }
  
  {
    try {
      result = (Prelude::IDMEFCriterion::IDMEFCriterionOperatorEnum)(arg1)->getApplicableOperator();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDMEFClass(void *obj) {
Prelude::IDMEFClass *arg1 = (Prelude::IDMEFClass *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEFClass(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEFClass);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEFClass_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEFClass_methods[]= {
    { "getDepth", _wrap_IDMEFClass_getDepth},
    { "get", _wrap_IDMEFClass_get},
    { "getChildCount", _wrap_IDMEFClass_getChildCount},
    { "isList", _wrap_IDMEFClass_isList},
    { "isKeyedList", _wrap_IDMEFClass_isKeyedList},
    { "getName", _wrap_IDMEFClass_getName},
    { "toString", _wrap_IDMEFClass_toString},
    { "getValueType", _wrap_IDMEFClass_getValueType},
    { "getAttributes", _wrap_IDMEFClass_getAttributes},
    { "getPath", _wrap_IDMEFClass_getPath},
    { "getEnumValues", _wrap_IDMEFClass_getEnumValues},
    { "getApplicableOperator", _wrap_IDMEFClass_getApplicableOperator},
    {0,0}
};
static swig_lua_method swig_IDMEFClass_meta[] = {
    {0,0}
};

static swig_lua_attribute swig_IDMEFClass_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEFClass_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEFClass_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEFClass_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEFClass_Sf_SwigStatic = {
    "IDMEFClass",
    swig_IDMEFClass_Sf_SwigStatic_methods,
    swig_IDMEFClass_Sf_SwigStatic_attributes,
    swig_IDMEFClass_Sf_SwigStatic_constants,
    swig_IDMEFClass_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEFClass_bases[] = {0};
static const char *swig_IDMEFClass_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEFClass = { "IDMEFClass", "IDMEFClass", &SWIGTYPE_p_Prelude__IDMEFClass,_proxy__wrap_new_IDMEFClass, swig_delete_IDMEFClass, swig_IDMEFClass_methods, swig_IDMEFClass_attributes, &swig_IDMEFClass_Sf_SwigStatic, swig_IDMEFClass_meta, swig_IDMEFClass_bases, swig_IDMEFClass_base_names };

static int _wrap_new_IDMEF__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::IDMEF",0,0)
  {
    try {
      result = (Prelude::IDMEF *)new Prelude::IDMEF();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEF__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  Prelude::IDMEF *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::IDMEF",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("Prelude::IDMEF::IDMEF",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  {
    try {
      result = (Prelude::IDMEF *)new Prelude::IDMEF((char const *)arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEF__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = 0 ;
  Prelude::IDMEF *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::IDMEF",1,1)
  if(!lua_isuserdata(L,1)) SWIG_fail_arg("Prelude::IDMEF::IDMEF",1,"Prelude::IDMEF const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("new_IDMEF",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (Prelude::IDMEF *)new Prelude::IDMEF((Prelude::IDMEF const &)*arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEF__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  idmef_object_t *arg1 = (idmef_object_t *) 0 ;
  Prelude::IDMEF *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::IDMEF",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::IDMEF",1,"idmef_object_t *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_idmef_object_t,0))){
    SWIG_fail_ptr("new_IDMEF",1,SWIGTYPE_p_idmef_object_t);
  }
  
  {
    try {
      result = (Prelude::IDMEF *)new Prelude::IDMEF(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IDMEF(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_IDMEF__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_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEF__SWIG_2(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_idmef_object_t, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_new_IDMEF__SWIG_3(L);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_IDMEF__SWIG_1(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IDMEF'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEF::IDMEF()\n"
    "    Prelude::IDMEF::IDMEF(char const *)\n"
    "    Prelude::IDMEF::IDMEF(Prelude::IDMEF const &)\n"
    "    Prelude::IDMEF::IDMEF(idmef_object_t *)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEF_set__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  std::vector< Prelude::IDMEF > *arg3 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"std::vector< Prelude::IDMEF > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t,0))){
    SWIG_fail_ptr("IDMEF_set",3,SWIGTYPE_p_std__vectorT_Prelude__IDMEF_t);
  }
  
  {
    try {
      (arg1)->set((char const *)arg2,(std::vector< Prelude::IDMEF > const &)*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  Prelude::IDMEF *arg3 = (Prelude::IDMEF *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",3,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  std::vector< Prelude::IDMEFValue > *arg3 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"std::vector< Prelude::IDMEFValue > const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t,0))){
    SWIG_fail_ptr("IDMEF_set",3,SWIGTYPE_p_std__vectorT_Prelude__IDMEFValue_t);
  }
  
  {
    try {
      (arg1)->set((char const *)arg2,(std::vector< Prelude::IDMEFValue > const &)*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"std::string const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  temp3.assign(lua_tostring(L,3),lua_rawlen(L,3)); arg3=&temp3;
  {
    try {
      (arg1)->set((char const *)arg2,(std::string const &)*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  Prelude::IDMEFValue *arg3 = (Prelude::IDMEFValue *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"Prelude::IDMEFValue *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFValue,0))){
    SWIG_fail_ptr("IDMEF_set",3,SWIGTYPE_p_Prelude__IDMEFValue);
  }
  
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  Prelude::IDMEFTime *arg3 = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"Prelude::IDMEFTime &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Prelude__IDMEFTime,0))){
    SWIG_fail_ptr("IDMEF_set",3,SWIGTYPE_p_Prelude__IDMEFTime);
  }
  
  {
    try {
      (arg1)->set((char const *)arg2,*arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_6(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  int32_t arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"int32_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (int32_t)lua_tonumber(L, 3);
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_7(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  int64_t arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"int64_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (int64_t)lua_tonumber(L, 3);
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_8(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  uint64_t arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"uint64_t");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (uint64_t)lua_tonumber(L, 3);
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_9(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set__SWIG_10(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  
  SWIG_check_num_args("Prelude::IDMEF::set",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::set",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::set",2,"char const *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Prelude::IDMEF::set",3,"double");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_set",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (double)lua_tonumber(L, 3);
  {
    try {
      (arg1)->set((char const *)arg2,arg3);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_set(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  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_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(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_Prelude__IDMEF_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEF_set__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_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(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_Prelude__IDMEFValue_t, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFValue, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_4(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEFTime, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_5(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_6(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_7(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_8(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_9(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_10(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Prelude__IDMEF, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = SWIG_lua_isnilstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_IDMEF_set__SWIG_3(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'IDMEF_set'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Prelude::IDMEF::set(char const *,std::vector< Prelude::IDMEF > const &)\n"
    "    Prelude::IDMEF::set(char const *,Prelude::IDMEF *)\n"
    "    Prelude::IDMEF::set(char const *,std::vector< Prelude::IDMEFValue > const &)\n"
    "    Prelude::IDMEF::set(char const *,std::string const &)\n"
    "    Prelude::IDMEF::set(char const *,Prelude::IDMEFValue *)\n"
    "    Prelude::IDMEF::set(char const *,Prelude::IDMEFTime &)\n"
    "    Prelude::IDMEF::set(char const *,int32_t)\n"
    "    Prelude::IDMEF::set(char const *,int64_t)\n"
    "    Prelude::IDMEF::set(char const *,uint64_t)\n"
    "    Prelude::IDMEF::set(char const *,float)\n"
    "    Prelude::IDMEF::set(char const *,double)\n");
  lua_error(L);return 0;
}


static int _wrap_IDMEF_clone(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  Prelude::IDMEF result;
  
  SWIG_check_num_args("Prelude::IDMEF::clone",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::clone",1,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_clone",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (arg1)->clone();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    Prelude::IDMEF * resultptr = new Prelude::IDMEF((const Prelude::IDMEF &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Prelude__IDMEF,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_getId(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  idmef_class_id_t result;
  
  SWIG_check_num_args("Prelude::IDMEF::getId",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::getId",1,"Prelude::IDMEF const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_getId",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (idmef_class_id_t)((Prelude::IDMEF const *)arg1)->getId();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEF_toString(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEF::toString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::toString",1,"Prelude::IDMEF const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_toString",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = ((Prelude::IDMEF const *)arg1)->toString();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEF_toJSON(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  std::string result;
  
  SWIG_check_num_args("Prelude::IDMEF::toJSON",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::toJSON",1,"Prelude::IDMEF const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_toJSON",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = ((Prelude::IDMEF const *)arg1)->toJSON();
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEF___eq(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  Prelude::IDMEF *arg2 = (Prelude::IDMEF *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEF::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::operator ==",1,"Prelude::IDMEF *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Prelude::IDMEF::operator ==",2,"Prelude::IDMEF const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF___eq",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF___eq",2,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (int)(arg1)->operator ==((Prelude::IDMEF const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  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_IDMEF___tostring(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::__str__",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::__str__",1,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF___tostring",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    try {
      result = (char *)Prelude_IDMEF___str__(arg1);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  delete [] result;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_write(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  void *arg2 = (void *) 0 ;
  
  SWIG_check_num_args("Prelude::IDMEF::write",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::write",1,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_write",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    FILE **pf;
    pf = (FILE **)lua_touserdata(L, 2);
    if (pf == NULL) {
      lua_pushstring(L,"Argument is not a file");
      SWIG_fail;
    }
    arg2 = *pf;
  }
  {
    try {
      Prelude_IDMEF_write(arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_IDMEF_read(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  void *arg2 = (void *) 0 ;
  int result;
  
  SWIG_check_num_args("Prelude::IDMEF::read",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::read",1,"Prelude::IDMEF *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_read",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  {
    FILE **pf;
    pf = (FILE **)lua_touserdata(L, 2);
    if (pf == NULL) {
      lua_pushstring(L,"Argument is not a file");
      SWIG_fail;
    }
    arg2 = *pf;
  }
  {
    try {
      result = (int)Prelude_IDMEF_read(arg1,arg2);
    } catch(Prelude::PreludeError &e) {
      if ( e.getCode() == PRELUDE_ERROR_EOF )
      return 0;
      else {
        SWIG_exception(SWIG_RuntimeError, e.what());
        SWIG_fail;
      }
    }
  }
  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_IDMEF_get(lua_State* L) {
  int SWIG_arg = 0;
  Prelude::IDMEF *arg1 = (Prelude::IDMEF *) 0 ;
  char *arg2 = (char *) 0 ;
  Prelude::IDMEFValue result;
  
  SWIG_check_num_args("Prelude::IDMEF::get",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Prelude::IDMEF::get",1,"Prelude::IDMEF *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("Prelude::IDMEF::get",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Prelude__IDMEF,0))){
    SWIG_fail_ptr("IDMEF_get",1,SWIGTYPE_p_Prelude__IDMEF);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  {
    try {
      result = Prelude_IDMEF_get(arg1,(char const *)arg2);
    } catch(Prelude::PreludeError &e) {
      SWIG_exception(SWIG_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int ret, unused;
    
    if ( (&result)->isNull() ) {
      lua_pushnil(L);
      SWIG_arg = 1;
    } else {
      SWIG_arg = IDMEFValue_to_SWIG(&unused, result, L, &unused);
      if ( SWIG_arg < 0 ) {
        std::stringstream s;
        s << "IDMEFValue typemap does not handle value of type '" << idmef_value_type_to_string((idmef_value_type_id_t) (&result)->getType()) << "'";
        SWIG_exception(SWIG_ValueError, s.str().c_str());
      }
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IDMEF(void *obj) {
Prelude::IDMEF *arg1 = (Prelude::IDMEF *) obj;
delete arg1;
}
static int _proxy__wrap_new_IDMEF(lua_State *L) {
    assert(lua_istable(L,1));
    lua_pushcfunction(L,_wrap_new_IDMEF);
    assert(!lua_isnil(L,-1));
    lua_replace(L,1); /* replace our table with real constructor */
    lua_call(L,lua_gettop(L)-1,1);
    return 1;
}
static swig_lua_attribute swig_IDMEF_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_IDMEF_methods[]= {
    { "set", _wrap_IDMEF_set},
    { "clone", _wrap_IDMEF_clone},
    { "getId", _wrap_IDMEF_getId},
    { "toString", _wrap_IDMEF_toString},
    { "toJSON", _wrap_IDMEF_toJSON},
    { "__eq", _wrap_IDMEF___eq},
    { "__tostring", _wrap_IDMEF___tostring},
    { "write", _wrap_IDMEF_write},
    { "read", _wrap_IDMEF_read},
    { "get", _wrap_IDMEF_get},
    {0,0}
};
static swig_lua_method swig_IDMEF_meta[] = {
    { "__eq", _wrap_IDMEF___eq},
    { "__tostring", _wrap_IDMEF___tostring},
    {0,0}
};

static swig_lua_attribute swig_IDMEF_Sf_SwigStatic_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_IDMEF_Sf_SwigStatic_constants[]= {
    {0,0,0,0,0,0}
};
static swig_lua_method swig_IDMEF_Sf_SwigStatic_methods[]= {
    {0,0}
};
static swig_lua_class* swig_IDMEF_Sf_SwigStatic_classes[]= {
    0
};

static swig_lua_namespace swig_IDMEF_Sf_SwigStatic = {
    "IDMEF",
    swig_IDMEF_Sf_SwigStatic_methods,
    swig_IDMEF_Sf_SwigStatic_attributes,
    swig_IDMEF_Sf_SwigStatic_constants,
    swig_IDMEF_Sf_SwigStatic_classes,
    0
};
static swig_lua_class *swig_IDMEF_bases[] = {0};
static const char *swig_IDMEF_base_names[] = {0};
static swig_lua_class _wrap_class_IDMEF = { "IDMEF", "IDMEF", &SWIGTYPE_p_Prelude__IDMEF,_proxy__wrap_new_IDMEF, swig_delete_IDMEF, swig_IDMEF_methods, swig_IDMEF_attributes, &swig_IDMEF_Sf_SwigStatic, swig_IDMEF_meta, swig_IDMEF_bases, swig_IDMEF_base_names };

static swig_lua_attribute swig_SwigModule_attributes[] = {
    {0,0,0}
};
static swig_lua_const_info swig_SwigModule_constants[]= {
    {SWIG_LUA_CONSTTAB_INT("Client_ASYNC_SEND", Prelude::Client::ASYNC_SEND)},
    {SWIG_LUA_CONSTTAB_INT("Client_FLAGS_ASYNC_SEND", Prelude::Client::FLAGS_ASYNC_SEND)},
    {SWIG_LUA_CONSTTAB_INT("Client_ASYNC_TIMER", Prelude::Client::ASYNC_TIMER)},
    {SWIG_LUA_CONSTTAB_INT("Client_FLAGS_ASYNC_TIMER", Prelude::Client::FLAGS_ASYNC_TIMER)},
    {SWIG_LUA_CONSTTAB_INT("Client_HEARTBEAT", Prelude::Client::HEARTBEAT)},
    {SWIG_LUA_CONSTTAB_INT("Client_FLAGS_HEARTBEAT", Prelude::Client::FLAGS_HEARTBEAT)},
    {SWIG_LUA_CONSTTAB_INT("Client_CONNECT", Prelude::Client::CONNECT)},
    {SWIG_LUA_CONSTTAB_INT("Client_FLAGS_CONNECT", Prelude::Client::FLAGS_CONNECT)},
    {SWIG_LUA_CONSTTAB_INT("Client_AUTOCONFIG", Prelude::Client::AUTOCONFIG)},
    {SWIG_LUA_CONSTTAB_INT("Client_FLAGS_AUTOCONFIG", Prelude::Client::FLAGS_AUTOCONFIG)},
    {SWIG_LUA_CONSTTAB_INT("Client_IDMEF_READ", Prelude::Client::IDMEF_READ)},
    {SWIG_LUA_CONSTTAB_INT("Client_PERMISSION_IDMEF_READ", Prelude::Client::PERMISSION_IDMEF_READ)},
    {SWIG_LUA_CONSTTAB_INT("Client_ADMIN_READ", Prelude::Client::ADMIN_READ)},
    {SWIG_LUA_CONSTTAB_INT("Client_PERMISSION_ADMIN_READ", Prelude::Client::PERMISSION_ADMIN_READ)},
    {SWIG_LUA_CONSTTAB_INT("Client_IDMEF_WRITE", Prelude::Client::IDMEF_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("Client_PERMISSION_IDMEF_WRITE", Prelude::Client::PERMISSION_IDMEF_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("Client_ADMIN_WRITE", Prelude::Client::ADMIN_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("Client_PERMISSION_ADMIN_WRITE", Prelude::Client::PERMISSION_ADMIN_WRITE)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_DEBUG", Prelude::PreludeLog::DEBUG)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_INFO", Prelude::PreludeLog::INFO)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_WARNING", Prelude::PreludeLog::WARNING)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_ERROR", Prelude::PreludeLog::ERROR)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_CRITICAL", Prelude::PreludeLog::CRITICAL)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_QUIET", Prelude::PreludeLog::QUIET)},
    {SWIG_LUA_CONSTTAB_INT("PreludeLog_SYSLOG", Prelude::PreludeLog::SYSLOG)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT", Prelude::IDMEFCriterion::OPERATOR_NOT)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_EQUAL", Prelude::IDMEFCriterion::OPERATOR_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_EQUAL_NOCASE", Prelude::IDMEFCriterion::OPERATOR_EQUAL_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_EQUAL", Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_EQUAL_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOT_EQUAL_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_LESSER", Prelude::IDMEFCriterion::OPERATOR_LESSER)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_LESSER_OR_EQUAL", Prelude::IDMEFCriterion::OPERATOR_LESSER_OR_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_GREATER", Prelude::IDMEFCriterion::OPERATOR_GREATER)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_GREATER_OR_EQUAL", Prelude::IDMEFCriterion::OPERATOR_GREATER_OR_EQUAL)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_SUBSTR", Prelude::IDMEFCriterion::OPERATOR_SUBSTR)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_SUBSTR_NOCASE", Prelude::IDMEFCriterion::OPERATOR_SUBSTR_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_SUBSTR", Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_SUBSTR_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOT_SUBSTR_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_REGEX", Prelude::IDMEFCriterion::OPERATOR_REGEX)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_REGEX_NOCASE", Prelude::IDMEFCriterion::OPERATOR_REGEX_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_REGEX", Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_REGEX_NOCASE", Prelude::IDMEFCriterion::OPERATOR_NOT_REGEX_NOCASE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NULL", Prelude::IDMEFCriterion::OPERATOR_NULL)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriterion_OPERATOR_NOT_NULL", Prelude::IDMEFCriterion::OPERATOR_NOT_NULL)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriteria_OPERATOR_NOT", Prelude::IDMEFCriteria::OPERATOR_NOT)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriteria_OPERATOR_AND", Prelude::IDMEFCriteria::OPERATOR_AND)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFCriteria_OPERATOR_OR", Prelude::IDMEFCriteria::OPERATOR_OR)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_UNKNOWN", Prelude::IDMEFValue::TYPE_UNKNOWN)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_INT8", Prelude::IDMEFValue::TYPE_INT8)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_UINT8", Prelude::IDMEFValue::TYPE_UINT8)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_INT16", Prelude::IDMEFValue::TYPE_INT16)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_UINT16", Prelude::IDMEFValue::TYPE_UINT16)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_INT32", Prelude::IDMEFValue::TYPE_INT32)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_UINT32", Prelude::IDMEFValue::TYPE_UINT32)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_INT64", Prelude::IDMEFValue::TYPE_INT64)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_UINT64", Prelude::IDMEFValue::TYPE_UINT64)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_FLOAT", Prelude::IDMEFValue::TYPE_FLOAT)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_DOUBLE", Prelude::IDMEFValue::TYPE_DOUBLE)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_STRING", Prelude::IDMEFValue::TYPE_STRING)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_TIME", Prelude::IDMEFValue::TYPE_TIME)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_DATA", Prelude::IDMEFValue::TYPE_DATA)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_ENUM", Prelude::IDMEFValue::TYPE_ENUM)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_LIST", Prelude::IDMEFValue::TYPE_LIST)},
    {SWIG_LUA_CONSTTAB_INT("IDMEFValue_TYPE_CLASS", Prelude::IDMEFValue::TYPE_CLASS)},
    {0,0,0,0,0,0}
};
static swig_lua_method swig_SwigModule_methods[]= {
    { "checkVersion", _wrap_checkVersion},
    { "Client_setRecvTimeout", _wrap_Client_setRecvTimeout},
    { "PreludeLog_setLevel", _wrap_PreludeLog_setLevel},
    { "PreludeLog_setDebugLevel", _wrap_PreludeLog_setDebugLevel},
    { "PreludeLog_setFlags", _wrap_PreludeLog_setFlags},
    { "PreludeLog_getFlags", _wrap_PreludeLog_getFlags},
    { "PreludeLog_setLogfile", _wrap_PreludeLog_setLogfile},
    { "PreludeLog_setCallback", _wrap_PreludeLog_setCallback},
    {0,0}
};
static swig_lua_class* swig_SwigModule_classes[]= {
&_wrap_class_string,
&_wrap_class_ClientProfile,
&_wrap_class_Connection,
&_wrap_class_ConnectionPool,
&_wrap_class_Client,
&_wrap_class_PreludeLog,
&_wrap_class_PreludeError,
&_wrap_class_ClientEasy,
&_wrap_class_IDMEFCriterion,
&_wrap_class_IDMEFCriteria,
&_wrap_class_IDMEFValue,
&_wrap_class_IDMEFPath,
&_wrap_class_IDMEFTime,
&_wrap_class_IDMEFClass,
&_wrap_class_IDMEF,
    0
};
static swig_lua_namespace* swig_SwigModule_namespaces[] = {
    0
};

static swig_lua_namespace swig_SwigModule = {
    "prelude",
    swig_SwigModule_methods,
    swig_SwigModule_attributes,
    swig_SwigModule_constants,
    swig_SwigModule_classes,
    swig_SwigModule_namespaces
};
#ifdef __cplusplus
}
#endif

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

static void *_p_Prelude__ClientTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Prelude::ClientProfile *)  ((Prelude::Client *) x));
}
static void *_p_Prelude__ClientEasyTo_p_Prelude__ClientProfile(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Prelude::ClientProfile *) (Prelude::Client *) ((Prelude::ClientEasy *) x));
}
static void *_p_Prelude__PreludeErrorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *)  ((Prelude::PreludeError *) x));
}
static void *_p_Prelude__ClientEasyTo_p_Prelude__Client(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Prelude::Client *)  ((Prelude::ClientEasy *) x));
}
static swig_type_info _swigt__p_Prelude__Client = {"_p_Prelude__Client", "Prelude::Client *", 0, 0, (void*)&_wrap_class_Client, 0};
static swig_type_info _swigt__p_Prelude__ClientEasy = {"_p_Prelude__ClientEasy", "Prelude::ClientEasy *", 0, 0, (void*)&_wrap_class_ClientEasy, 0};
static swig_type_info _swigt__p_Prelude__ClientProfile = {"_p_Prelude__ClientProfile", "Prelude::ClientProfile *", 0, 0, (void*)&_wrap_class_ClientProfile, 0};
static swig_type_info _swigt__p_Prelude__Connection = {"_p_Prelude__Connection", "Prelude::Connection *", 0, 0, (void*)&_wrap_class_Connection, 0};
static swig_type_info _swigt__p_Prelude__ConnectionPool = {"_p_Prelude__ConnectionPool", "Prelude::ConnectionPool *", 0, 0, (void*)&_wrap_class_ConnectionPool, 0};
static swig_type_info _swigt__p_Prelude__IDMEF = {"_p_Prelude__IDMEF", "Prelude::IDMEF *", 0, 0, (void*)&_wrap_class_IDMEF, 0};
static swig_type_info _swigt__p_Prelude__IDMEFClass = {"_p_Prelude__IDMEFClass", "Prelude::IDMEFClass *", 0, 0, (void*)&_wrap_class_IDMEFClass, 0};
static swig_type_info _swigt__p_Prelude__IDMEFCriteria = {"_p_Prelude__IDMEFCriteria", "Prelude::IDMEFCriteria *", 0, 0, (void*)&_wrap_class_IDMEFCriteria, 0};
static swig_type_info _swigt__p_Prelude__IDMEFCriterion = {"_p_Prelude__IDMEFCriterion", "Prelude::IDMEFCriterion *", 0, 0, (void*)&_wrap_class_IDMEFCriterion, 0};
static swig_type_info _swigt__p_Prelude__IDMEFPath = {"_p_Prelude__IDMEFPath", "Prelude::IDMEFPath *", 0, 0, (void*)&_wrap_class_IDMEFPath, 0};
static swig_type_info _swigt__p_Prelude__IDMEFTime = {"_p_Prelude__IDMEFTime", "Prelude::IDMEFTime *", 0, 0, (void*)&_wrap_class_IDMEFTime, 0};
static swig_type_info _swigt__p_Prelude__IDMEFValue = {"_p_Prelude__IDMEFValue", "Prelude::IDMEFValue *", 0, 0, (void*)&_wrap_class_IDMEFValue, 0};
static swig_type_info _swigt__p_Prelude__PreludeError = {"_p_Prelude__PreludeError", "Prelude::PreludeError *", 0, 0, (void*)&_wrap_class_PreludeError, 0};
static swig_type_info _swigt__p_Prelude__PreludeLog = {"_p_Prelude__PreludeLog", "Prelude::PreludeLog *", 0, 0, (void*)&_wrap_class_PreludeLog, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *|int8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_int_p_q_const__char__void = {"_p_f_int_p_q_const__char__void", "void (*)(int,char const *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_idmef_criteria_t = {"_p_idmef_criteria_t", "idmef_criteria_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_idmef_criterion_operator_t = {"_p_idmef_criterion_operator_t", "idmef_criterion_operator_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_idmef_object_t = {"_p_idmef_object_t", "idmef_object_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_idmef_path_t = {"_p_idmef_path_t", "idmef_path_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_idmef_time_t = {"_p_idmef_time_t", "idmef_time_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_idmef_value_t = {"_p_idmef_value_t", "idmef_value_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *|time_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_prelude_client_profile_t = {"_p_prelude_client_profile_t", "prelude_client_profile_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_prelude_client_t = {"_p_prelude_client_t", "prelude_client_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_prelude_connection_pool_t = {"_p_prelude_connection_pool_t", "prelude_connection_pool_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_prelude_connection_t = {"_p_prelude_connection_t", "prelude_connection_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__mapT_std__string_std__string_t = {"_p_std__mapT_std__string_std__string_t", "std::map< std::string,std::string > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)&_wrap_class_string, 0};
static swig_type_info _swigt__p_std__vectorT_Prelude__Connection_t = {"_p_std__vectorT_Prelude__Connection_t", "std::vector< Prelude::Connection > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_Prelude__IDMEFValue_t = {"_p_std__vectorT_Prelude__IDMEFValue_t", "std::vector< Prelude::IDMEFValue > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_Prelude__IDMEF_t = {"_p_std__vectorT_Prelude__IDMEF_t", "std::vector< Prelude::IDMEF > *", 0, 0, (void*)0, 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 _swigt__p_timeval = {"_p_timeval", "timeval *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|unsigned long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Prelude__Client,
  &_swigt__p_Prelude__ClientEasy,
  &_swigt__p_Prelude__ClientProfile,
  &_swigt__p_Prelude__Connection,
  &_swigt__p_Prelude__ConnectionPool,
  &_swigt__p_Prelude__IDMEF,
  &_swigt__p_Prelude__IDMEFClass,
  &_swigt__p_Prelude__IDMEFCriteria,
  &_swigt__p_Prelude__IDMEFCriterion,
  &_swigt__p_Prelude__IDMEFPath,
  &_swigt__p_Prelude__IDMEFTime,
  &_swigt__p_Prelude__IDMEFValue,
  &_swigt__p_Prelude__PreludeError,
  &_swigt__p_Prelude__PreludeLog,
  &_swigt__p_char,
  &_swigt__p_difference_type,
  &_swigt__p_f_int_p_q_const__char__void,
  &_swigt__p_idmef_criteria_t,
  &_swigt__p_idmef_criterion_operator_t,
  &_swigt__p_idmef_object_t,
  &_swigt__p_idmef_path_t,
  &_swigt__p_idmef_time_t,
  &_swigt__p_idmef_value_t,
  &_swigt__p_int,
  &_swigt__p_key_type,
  &_swigt__p_long_long,
  &_swigt__p_mapped_type,
  &_swigt__p_prelude_client_profile_t,
  &_swigt__p_prelude_client_t,
  &_swigt__p_prelude_connection_pool_t,
  &_swigt__p_prelude_connection_t,
  &_swigt__p_short,
  &_swigt__p_size_type,
  &_swigt__p_std__exception,
  &_swigt__p_std__mapT_std__string_std__string_t,
  &_swigt__p_std__string,
  &_swigt__p_std__vectorT_Prelude__Connection_t,
  &_swigt__p_std__vectorT_Prelude__IDMEFValue_t,
  &_swigt__p_std__vectorT_Prelude__IDMEF_t,
  &_swigt__p_std__vectorT_std__string_t,
  &_swigt__p_timeval,
  &_swigt__p_unsigned_char,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long_long,
  &_swigt__p_unsigned_short,
  &_swigt__p_void,
};

static swig_cast_info _swigc__p_Prelude__Client[] = {  {&_swigt__p_Prelude__Client, 0, 0, 0},  {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__Client, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__ClientEasy[] = {  {&_swigt__p_Prelude__ClientEasy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__ClientProfile[] = {  {&_swigt__p_Prelude__Client, _p_Prelude__ClientTo_p_Prelude__ClientProfile, 0, 0},  {&_swigt__p_Prelude__ClientProfile, 0, 0, 0},  {&_swigt__p_Prelude__ClientEasy, _p_Prelude__ClientEasyTo_p_Prelude__ClientProfile, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__Connection[] = {  {&_swigt__p_Prelude__Connection, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__ConnectionPool[] = {  {&_swigt__p_Prelude__ConnectionPool, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEF[] = {  {&_swigt__p_Prelude__IDMEF, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEFClass[] = {  {&_swigt__p_Prelude__IDMEFClass, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEFCriteria[] = {  {&_swigt__p_Prelude__IDMEFCriteria, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEFCriterion[] = {  {&_swigt__p_Prelude__IDMEFCriterion, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEFPath[] = {  {&_swigt__p_Prelude__IDMEFPath, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEFTime[] = {  {&_swigt__p_Prelude__IDMEFTime, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__IDMEFValue[] = {  {&_swigt__p_Prelude__IDMEFValue, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__PreludeError[] = {  {&_swigt__p_Prelude__PreludeError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Prelude__PreludeLog[] = {  {&_swigt__p_Prelude__PreludeLog, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_difference_type[] = {  {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_int_p_q_const__char__void[] = {  {&_swigt__p_f_int_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_idmef_criteria_t[] = {  {&_swigt__p_idmef_criteria_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_idmef_criterion_operator_t[] = {  {&_swigt__p_idmef_criterion_operator_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_idmef_object_t[] = {  {&_swigt__p_idmef_object_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_idmef_path_t[] = {  {&_swigt__p_idmef_path_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_idmef_time_t[] = {  {&_swigt__p_idmef_time_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_idmef_value_t[] = {  {&_swigt__p_idmef_value_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_key_type[] = {  {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_mapped_type[] = {  {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_prelude_client_profile_t[] = {  {&_swigt__p_prelude_client_profile_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_prelude_client_t[] = {  {&_swigt__p_prelude_client_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_prelude_connection_pool_t[] = {  {&_swigt__p_prelude_connection_pool_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_prelude_connection_t[] = {  {&_swigt__p_prelude_connection_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_type[] = {  {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__exception[] = {  {&_swigt__p_std__exception, 0, 0, 0},  {&_swigt__p_Prelude__PreludeError, _p_Prelude__PreludeErrorTo_p_std__exception, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__mapT_std__string_std__string_t[] = {  {&_swigt__p_std__mapT_std__string_std__string_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_Prelude__Connection_t[] = {  {&_swigt__p_std__vectorT_Prelude__Connection_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Prelude__IDMEFValue_t[] = {  {&_swigt__p_std__vectorT_Prelude__IDMEFValue_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Prelude__IDMEF_t[] = {  {&_swigt__p_std__vectorT_Prelude__IDMEF_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 _swigc__p_timeval[] = {  {&_swigt__p_timeval, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Prelude__Client,
  _swigc__p_Prelude__ClientEasy,
  _swigc__p_Prelude__ClientProfile,
  _swigc__p_Prelude__Connection,
  _swigc__p_Prelude__ConnectionPool,
  _swigc__p_Prelude__IDMEF,
  _swigc__p_Prelude__IDMEFClass,
  _swigc__p_Prelude__IDMEFCriteria,
  _swigc__p_Prelude__IDMEFCriterion,
  _swigc__p_Prelude__IDMEFPath,
  _swigc__p_Prelude__IDMEFTime,
  _swigc__p_Prelude__IDMEFValue,
  _swigc__p_Prelude__PreludeError,
  _swigc__p_Prelude__PreludeLog,
  _swigc__p_char,
  _swigc__p_difference_type,
  _swigc__p_f_int_p_q_const__char__void,
  _swigc__p_idmef_criteria_t,
  _swigc__p_idmef_criterion_operator_t,
  _swigc__p_idmef_object_t,
  _swigc__p_idmef_path_t,
  _swigc__p_idmef_time_t,
  _swigc__p_idmef_value_t,
  _swigc__p_int,
  _swigc__p_key_type,
  _swigc__p_long_long,
  _swigc__p_mapped_type,
  _swigc__p_prelude_client_profile_t,
  _swigc__p_prelude_client_t,
  _swigc__p_prelude_connection_pool_t,
  _swigc__p_prelude_connection_t,
  _swigc__p_short,
  _swigc__p_size_type,
  _swigc__p_std__exception,
  _swigc__p_std__mapT_std__string_std__string_t,
  _swigc__p_std__string,
  _swigc__p_std__vectorT_Prelude__Connection_t,
  _swigc__p_std__vectorT_Prelude__IDMEFValue_t,
  _swigc__p_std__vectorT_Prelude__IDMEF_t,
  _swigc__p_std__vectorT_std__string_t,
  _swigc__p_timeval,
  _swigc__p_unsigned_char,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long_long,
  _swigc__p_unsigned_short,
  _swigc__p_void,
};


/* -------- 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 statically 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 init;

  /* 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);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpreters 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 earlier #define will rename it
*/
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
LUALIB_API int SWIG_init(lua_State* L)
#else
SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
#endif
{
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
  int i;
  int globalRegister = 0;
  /* start with global table */
  lua_pushglobaltable (L);
  /* SWIG's internal initialisation */
  SWIG_InitializeModule((void*)L);
  SWIG_PropagateClientData();
#endif

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
  /* add a global fn */
  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_class_equal);
#endif

#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  /* set up base class pointers (the hierarchy) */
  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));
    }
  }
#ifdef SWIG_LUA_MODULE_GLOBAL
  globalRegister = 1;
#endif


#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
  SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
#endif

#if defined(SWIG_LUA_ELUA_EMULATE)
  lua_newtable(L);
  SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
  SWIG_Lua_elua_emulate_register_clear(L);
  if(globalRegister) {
    lua_pushstring(L,swig_SwigModule.name);
    lua_pushvalue(L,-2);
    lua_rawset(L,-4);
  }
#endif

#endif

#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  /* 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;
#else
  return 0;
#endif
}

#ifdef __cplusplus
}
#endif


const char* SWIG_LUACODE=
  "";

void SWIG_init_user(lua_State* L)
{
  int argc = 0, ret;
  static char *argv[1024];
  
  __initial_thread = (gl_thread_t) gl_thread_self();
  
  lua_getglobal(L, "arg");
  if ( ! lua_istable(L, -1) )
  return;
  
  lua_pushnil(L);
  
  while ( lua_next(L, -2) != 0 ) {
    int idx;
    const char *val;
    
    idx = lua_tonumber(L, -2);
    val = lua_tostring(L, -1);
    lua_pop(L, 1);
    
    if ( idx < 0 )
    continue;
    
    if ( idx >= ((sizeof(argv) / sizeof(char *)) - 1) )
    throw PreludeError("Argument index too large");
    
    argv[idx] = strdup(val);
    argc = ((idx) > (argc) ? (idx) : (argc));
  }
  
  argc++;
  argv[argc] = NULL;
  
  ret = prelude_init(&argc, argv);
  if ( ret < 0 )
  throw PreludeError(ret);
  
  /* exec Lua code if applicable */
  SWIG_Lua_dostring(L,SWIG_LUACODE);
}

